Numerical value of Determinant far from what it is supposed to beNumeric values from transformFindRoot for...

(Codewars) Linked Lists-Sorted Insert

Under what conditions can the right to remain silent be revoked in the USA?

Finding the minimum value of a function without using Calculus

Which country has more?

Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?

What does *dead* mean in *What do you mean, dead?*?

What is this tube in a jet engine's air intake?

Why does Central Limit Theorem break down in my simulation?

Writing text next to a table

Trocar background-image com delay via jQuery

How can a demon take control of a human body during REM sleep?

Logistic regression BIC: what's the right N?

Do Paladin Auras of Differing Oaths Stack?

Is this Paypal Github SDK reference really a dangerous site?

What do you call someone who likes to pick fights?

Professor forcing me to attend a conference, I can't afford even with 50% funding

How do you make a gun that shoots melee weapons and/or swords?

What is better: yes / no radio, or simple checkbox?

How do we create new idioms and use them in a novel?

Should we avoid writing fiction about historical events without extensive research?

Why aren't there more Gauls like Obelix?

PTIJ: Who was the sixth set of priestly clothes for?

How to write a chaotic neutral protagonist and prevent my readers from thinking they are evil?

Has a sovereign Communist government ever run, and conceded loss, on a fair election?



Numerical value of Determinant far from what it is supposed to be


Numeric values from transformFindRoot for numerical function and how to search more than one rootCan't get a numerical value for this vector operationNumerical value of an expression with a uniform step sizeNumerical evaluation after Normal?Numerical Results with replacement rulesStrange numerical valuesWhat is the acceptable error in numerical calculations?High numerical precision failingHow to extract the minimal value from NMinimize?













1












$begingroup$


I have a large matrix with numerical components and want to set the determinant to zero using the parameter h (see below). Naively, I would have expected that h sets the determinant to (approximately) zero, which isn't the case. On top of that, the order of applying the rule sol seems to affects the final outcome for a reason to don't see.



My output of the code below is:



{h -> -0.744736 + 4.42008 I}

0.0445865 - 0.0285418 I

0.0545654 - 0.114258 I


I am not familiar with how Mathematica handles floating point numbers so that's probably where my error lies. I have also tried to increase the precision with SetPrecision, but without success.



mat={{0.16 - (0.36 + 0.001 I) h - (1.35808 - 
0.00120116 I) h^2 - (0.49603 - 0.00137214 I) h^3 - (0.11307 -
0.00105331 I) h^4 + (0.249794 - 0.000384238 I) h^5 -
0.39204 h^6, -0.1711 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h - (1.15528 +
0.00267142 I) h^2 - (0.637164 - 0.0009801 I) h^3 +
1. h^4), (0.0000353051 - 1.67323*10^-6 I) h^4,
0}, {-0.1711 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (19.6394 -
0.00267142 I) h^2 - (0.637164 - 0.0009801 I) h^3 + 1. h^4),
0.16 - (0.36 + 0.001 I) h - (11.3534 -
0.00119507 I) h^2 - (0.484268 - 0.00140481 I) h^3 - (5.0714 -
0.00114074 I) h^4 + (0.27061 - 0.000416258 I) h^5 -
0.42471 h^6, -0.223386 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (4.95742 -
0.00267502 I) h^2 - (0.637164 - 0.0009801 I) h^3 +
1. h^4), (0.0000484431 - 2.29589*10^-6 I) h^4}, {(0.0000353051 -
1.67323*10^-6 I) h^4, -0.223386 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (41.4016 -
0.00267502 I) h^2 - (0.637164 - 0.0009801 I) h^3 + 1. h^4),
0.16 - (0.36 + 0.001 I) h - (29.348 -
0.00118803 I) h^2 - (0.470698 - 0.00144251 I) h^3 - (13.9095 -
0.00124106 I) h^4 + (0.294629 - 0.000453204 I) h^5 -
0.462406 h^6, -0.234771 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (19.0123 -
0.00267319 I) h^2 - (0.637164 - 0.0009801 I) h^3 +
1. h^4)}, {0, (0.0000484431 -
2.29589*10^-6 I) h^4, -0.234771 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (71.32 -
0.00267319 I) h^2 - (0.637164 - 0.0009801 I) h^3 + 1. h^4),
0.16 - (0.36 + 0.001 I) h - (55.3462 -
0.00118568 I) h^2 - (0.466163 - 0.0014551 I) h^3 - (26.6556 -
0.00127449 I) h^4 + (0.302655 - 0.000465551 I) h^5 -
0.475003 h^6}};
sol = Part[NSolve[Det[%] == 0, h], 1]
Det[mat /. sol]
Det[mat] /. sol









share|improve this question







New contributor




Nils is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$












  • $begingroup$
    Correction: I get the output 0.118714 - 0.0526506 I (as the second output) and 0.106201 - 0.0979004 I (as the third output); sorry, used a different matrix. But the problem still stands.
    $endgroup$
    – Nils
    2 hours ago
















1












$begingroup$


I have a large matrix with numerical components and want to set the determinant to zero using the parameter h (see below). Naively, I would have expected that h sets the determinant to (approximately) zero, which isn't the case. On top of that, the order of applying the rule sol seems to affects the final outcome for a reason to don't see.



My output of the code below is:



{h -> -0.744736 + 4.42008 I}

0.0445865 - 0.0285418 I

0.0545654 - 0.114258 I


I am not familiar with how Mathematica handles floating point numbers so that's probably where my error lies. I have also tried to increase the precision with SetPrecision, but without success.



mat={{0.16 - (0.36 + 0.001 I) h - (1.35808 - 
0.00120116 I) h^2 - (0.49603 - 0.00137214 I) h^3 - (0.11307 -
0.00105331 I) h^4 + (0.249794 - 0.000384238 I) h^5 -
0.39204 h^6, -0.1711 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h - (1.15528 +
0.00267142 I) h^2 - (0.637164 - 0.0009801 I) h^3 +
1. h^4), (0.0000353051 - 1.67323*10^-6 I) h^4,
0}, {-0.1711 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (19.6394 -
0.00267142 I) h^2 - (0.637164 - 0.0009801 I) h^3 + 1. h^4),
0.16 - (0.36 + 0.001 I) h - (11.3534 -
0.00119507 I) h^2 - (0.484268 - 0.00140481 I) h^3 - (5.0714 -
0.00114074 I) h^4 + (0.27061 - 0.000416258 I) h^5 -
0.42471 h^6, -0.223386 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (4.95742 -
0.00267502 I) h^2 - (0.637164 - 0.0009801 I) h^3 +
1. h^4), (0.0000484431 - 2.29589*10^-6 I) h^4}, {(0.0000353051 -
1.67323*10^-6 I) h^4, -0.223386 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (41.4016 -
0.00267502 I) h^2 - (0.637164 - 0.0009801 I) h^3 + 1. h^4),
0.16 - (0.36 + 0.001 I) h - (29.348 -
0.00118803 I) h^2 - (0.470698 - 0.00144251 I) h^3 - (13.9095 -
0.00124106 I) h^4 + (0.294629 - 0.000453204 I) h^5 -
0.462406 h^6, -0.234771 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (19.0123 -
0.00267319 I) h^2 - (0.637164 - 0.0009801 I) h^3 +
1. h^4)}, {0, (0.0000484431 -
2.29589*10^-6 I) h^4, -0.234771 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (71.32 -
0.00267319 I) h^2 - (0.637164 - 0.0009801 I) h^3 + 1. h^4),
0.16 - (0.36 + 0.001 I) h - (55.3462 -
0.00118568 I) h^2 - (0.466163 - 0.0014551 I) h^3 - (26.6556 -
0.00127449 I) h^4 + (0.302655 - 0.000465551 I) h^5 -
0.475003 h^6}};
sol = Part[NSolve[Det[%] == 0, h], 1]
Det[mat /. sol]
Det[mat] /. sol









share|improve this question







New contributor




Nils is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$












  • $begingroup$
    Correction: I get the output 0.118714 - 0.0526506 I (as the second output) and 0.106201 - 0.0979004 I (as the third output); sorry, used a different matrix. But the problem still stands.
    $endgroup$
    – Nils
    2 hours ago














1












1








1





$begingroup$


I have a large matrix with numerical components and want to set the determinant to zero using the parameter h (see below). Naively, I would have expected that h sets the determinant to (approximately) zero, which isn't the case. On top of that, the order of applying the rule sol seems to affects the final outcome for a reason to don't see.



My output of the code below is:



{h -> -0.744736 + 4.42008 I}

0.0445865 - 0.0285418 I

0.0545654 - 0.114258 I


I am not familiar with how Mathematica handles floating point numbers so that's probably where my error lies. I have also tried to increase the precision with SetPrecision, but without success.



mat={{0.16 - (0.36 + 0.001 I) h - (1.35808 - 
0.00120116 I) h^2 - (0.49603 - 0.00137214 I) h^3 - (0.11307 -
0.00105331 I) h^4 + (0.249794 - 0.000384238 I) h^5 -
0.39204 h^6, -0.1711 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h - (1.15528 +
0.00267142 I) h^2 - (0.637164 - 0.0009801 I) h^3 +
1. h^4), (0.0000353051 - 1.67323*10^-6 I) h^4,
0}, {-0.1711 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (19.6394 -
0.00267142 I) h^2 - (0.637164 - 0.0009801 I) h^3 + 1. h^4),
0.16 - (0.36 + 0.001 I) h - (11.3534 -
0.00119507 I) h^2 - (0.484268 - 0.00140481 I) h^3 - (5.0714 -
0.00114074 I) h^4 + (0.27061 - 0.000416258 I) h^5 -
0.42471 h^6, -0.223386 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (4.95742 -
0.00267502 I) h^2 - (0.637164 - 0.0009801 I) h^3 +
1. h^4), (0.0000484431 - 2.29589*10^-6 I) h^4}, {(0.0000353051 -
1.67323*10^-6 I) h^4, -0.223386 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (41.4016 -
0.00267502 I) h^2 - (0.637164 - 0.0009801 I) h^3 + 1. h^4),
0.16 - (0.36 + 0.001 I) h - (29.348 -
0.00118803 I) h^2 - (0.470698 - 0.00144251 I) h^3 - (13.9095 -
0.00124106 I) h^4 + (0.294629 - 0.000453204 I) h^5 -
0.462406 h^6, -0.234771 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (19.0123 -
0.00267319 I) h^2 - (0.637164 - 0.0009801 I) h^3 +
1. h^4)}, {0, (0.0000484431 -
2.29589*10^-6 I) h^4, -0.234771 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (71.32 -
0.00267319 I) h^2 - (0.637164 - 0.0009801 I) h^3 + 1. h^4),
0.16 - (0.36 + 0.001 I) h - (55.3462 -
0.00118568 I) h^2 - (0.466163 - 0.0014551 I) h^3 - (26.6556 -
0.00127449 I) h^4 + (0.302655 - 0.000465551 I) h^5 -
0.475003 h^6}};
sol = Part[NSolve[Det[%] == 0, h], 1]
Det[mat /. sol]
Det[mat] /. sol









share|improve this question







New contributor




Nils is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




I have a large matrix with numerical components and want to set the determinant to zero using the parameter h (see below). Naively, I would have expected that h sets the determinant to (approximately) zero, which isn't the case. On top of that, the order of applying the rule sol seems to affects the final outcome for a reason to don't see.



My output of the code below is:



{h -> -0.744736 + 4.42008 I}

0.0445865 - 0.0285418 I

0.0545654 - 0.114258 I


I am not familiar with how Mathematica handles floating point numbers so that's probably where my error lies. I have also tried to increase the precision with SetPrecision, but without success.



mat={{0.16 - (0.36 + 0.001 I) h - (1.35808 - 
0.00120116 I) h^2 - (0.49603 - 0.00137214 I) h^3 - (0.11307 -
0.00105331 I) h^4 + (0.249794 - 0.000384238 I) h^5 -
0.39204 h^6, -0.1711 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h - (1.15528 +
0.00267142 I) h^2 - (0.637164 - 0.0009801 I) h^3 +
1. h^4), (0.0000353051 - 1.67323*10^-6 I) h^4,
0}, {-0.1711 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (19.6394 -
0.00267142 I) h^2 - (0.637164 - 0.0009801 I) h^3 + 1. h^4),
0.16 - (0.36 + 0.001 I) h - (11.3534 -
0.00119507 I) h^2 - (0.484268 - 0.00140481 I) h^3 - (5.0714 -
0.00114074 I) h^4 + (0.27061 - 0.000416258 I) h^5 -
0.42471 h^6, -0.223386 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (4.95742 -
0.00267502 I) h^2 - (0.637164 - 0.0009801 I) h^3 +
1. h^4), (0.0000484431 - 2.29589*10^-6 I) h^4}, {(0.0000353051 -
1.67323*10^-6 I) h^4, -0.223386 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (41.4016 -
0.00267502 I) h^2 - (0.637164 - 0.0009801 I) h^3 + 1. h^4),
0.16 - (0.36 + 0.001 I) h - (29.348 -
0.00118803 I) h^2 - (0.470698 - 0.00144251 I) h^3 - (13.9095 -
0.00124106 I) h^4 + (0.294629 - 0.000453204 I) h^5 -
0.462406 h^6, -0.234771 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (19.0123 -
0.00267319 I) h^2 - (0.637164 - 0.0009801 I) h^3 +
1. h^4)}, {0, (0.0000484431 -
2.29589*10^-6 I) h^4, -0.234771 h^2 ((-0.143205 +
0.000186623 I) - (0.36 + 0.001 I) h + (71.32 -
0.00267319 I) h^2 - (0.637164 - 0.0009801 I) h^3 + 1. h^4),
0.16 - (0.36 + 0.001 I) h - (55.3462 -
0.00118568 I) h^2 - (0.466163 - 0.0014551 I) h^3 - (26.6556 -
0.00127449 I) h^4 + (0.302655 - 0.000465551 I) h^5 -
0.475003 h^6}};
sol = Part[NSolve[Det[%] == 0, h], 1]
Det[mat /. sol]
Det[mat] /. sol






numerical-value






share|improve this question







New contributor




Nils is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Nils is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Nils is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 hours ago









NilsNils

61




61




New contributor




Nils is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Nils is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Nils is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • $begingroup$
    Correction: I get the output 0.118714 - 0.0526506 I (as the second output) and 0.106201 - 0.0979004 I (as the third output); sorry, used a different matrix. But the problem still stands.
    $endgroup$
    – Nils
    2 hours ago


















  • $begingroup$
    Correction: I get the output 0.118714 - 0.0526506 I (as the second output) and 0.106201 - 0.0979004 I (as the third output); sorry, used a different matrix. But the problem still stands.
    $endgroup$
    – Nils
    2 hours ago
















$begingroup$
Correction: I get the output 0.118714 - 0.0526506 I (as the second output) and 0.106201 - 0.0979004 I (as the third output); sorry, used a different matrix. But the problem still stands.
$endgroup$
– Nils
2 hours ago




$begingroup$
Correction: I get the output 0.118714 - 0.0526506 I (as the second output) and 0.106201 - 0.0979004 I (as the third output); sorry, used a different matrix. But the problem still stands.
$endgroup$
– Nils
2 hours ago










1 Answer
1






active

oldest

votes


















3












$begingroup$

As you suspected when you mentioned SetPrecision, you are encountering numerical errors, probably catastrophic loss of precision when calculating the determinant; your calculations do in fact need to be carried out at higher precision.



If possible, you would want to use exact numbers in your matrix, or take advantage of the arbitrary-precision capabilities of Mathematica. For instance, we can convert all machine-precision numbers to arbitrary-precision ones with a number of digits of precision equal to that of common machine-precision numbers on your machine using SetPrecision (see also $MachinePrecision in the documentation):



det = Det[SetPrecision[mat, $MachinePrecision]];
sol = NSolve[det == 0, h];
det /. sol // PossibleZeroQ

(* Out:
{True, True, True, True, True, True, True, True, True, True, True,
True, True, True, True, True, True, True, True, True, True, True,
True, True}
*)


As you can see, all those values of $h$ do bring your determinant reasonably close to zero, within machine-precision approximations.






share|improve this answer











$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "387"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    Nils is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f192970%2fnumerical-value-of-determinant-far-from-what-it-is-supposed-to-be%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3












    $begingroup$

    As you suspected when you mentioned SetPrecision, you are encountering numerical errors, probably catastrophic loss of precision when calculating the determinant; your calculations do in fact need to be carried out at higher precision.



    If possible, you would want to use exact numbers in your matrix, or take advantage of the arbitrary-precision capabilities of Mathematica. For instance, we can convert all machine-precision numbers to arbitrary-precision ones with a number of digits of precision equal to that of common machine-precision numbers on your machine using SetPrecision (see also $MachinePrecision in the documentation):



    det = Det[SetPrecision[mat, $MachinePrecision]];
    sol = NSolve[det == 0, h];
    det /. sol // PossibleZeroQ

    (* Out:
    {True, True, True, True, True, True, True, True, True, True, True,
    True, True, True, True, True, True, True, True, True, True, True,
    True, True}
    *)


    As you can see, all those values of $h$ do bring your determinant reasonably close to zero, within machine-precision approximations.






    share|improve this answer











    $endgroup$


















      3












      $begingroup$

      As you suspected when you mentioned SetPrecision, you are encountering numerical errors, probably catastrophic loss of precision when calculating the determinant; your calculations do in fact need to be carried out at higher precision.



      If possible, you would want to use exact numbers in your matrix, or take advantage of the arbitrary-precision capabilities of Mathematica. For instance, we can convert all machine-precision numbers to arbitrary-precision ones with a number of digits of precision equal to that of common machine-precision numbers on your machine using SetPrecision (see also $MachinePrecision in the documentation):



      det = Det[SetPrecision[mat, $MachinePrecision]];
      sol = NSolve[det == 0, h];
      det /. sol // PossibleZeroQ

      (* Out:
      {True, True, True, True, True, True, True, True, True, True, True,
      True, True, True, True, True, True, True, True, True, True, True,
      True, True}
      *)


      As you can see, all those values of $h$ do bring your determinant reasonably close to zero, within machine-precision approximations.






      share|improve this answer











      $endgroup$
















        3












        3








        3





        $begingroup$

        As you suspected when you mentioned SetPrecision, you are encountering numerical errors, probably catastrophic loss of precision when calculating the determinant; your calculations do in fact need to be carried out at higher precision.



        If possible, you would want to use exact numbers in your matrix, or take advantage of the arbitrary-precision capabilities of Mathematica. For instance, we can convert all machine-precision numbers to arbitrary-precision ones with a number of digits of precision equal to that of common machine-precision numbers on your machine using SetPrecision (see also $MachinePrecision in the documentation):



        det = Det[SetPrecision[mat, $MachinePrecision]];
        sol = NSolve[det == 0, h];
        det /. sol // PossibleZeroQ

        (* Out:
        {True, True, True, True, True, True, True, True, True, True, True,
        True, True, True, True, True, True, True, True, True, True, True,
        True, True}
        *)


        As you can see, all those values of $h$ do bring your determinant reasonably close to zero, within machine-precision approximations.






        share|improve this answer











        $endgroup$



        As you suspected when you mentioned SetPrecision, you are encountering numerical errors, probably catastrophic loss of precision when calculating the determinant; your calculations do in fact need to be carried out at higher precision.



        If possible, you would want to use exact numbers in your matrix, or take advantage of the arbitrary-precision capabilities of Mathematica. For instance, we can convert all machine-precision numbers to arbitrary-precision ones with a number of digits of precision equal to that of common machine-precision numbers on your machine using SetPrecision (see also $MachinePrecision in the documentation):



        det = Det[SetPrecision[mat, $MachinePrecision]];
        sol = NSolve[det == 0, h];
        det /. sol // PossibleZeroQ

        (* Out:
        {True, True, True, True, True, True, True, True, True, True, True,
        True, True, True, True, True, True, True, True, True, True, True,
        True, True}
        *)


        As you can see, all those values of $h$ do bring your determinant reasonably close to zero, within machine-precision approximations.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 1 hour ago

























        answered 2 hours ago









        MarcoBMarcoB

        37.3k556113




        37.3k556113






















            Nils is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Nils is a new contributor. Be nice, and check out our Code of Conduct.













            Nils is a new contributor. Be nice, and check out our Code of Conduct.












            Nils is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Mathematica Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f192970%2fnumerical-value-of-determinant-far-from-what-it-is-supposed-to-be%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

            Castillo d'Acher Características Menú de navegación

            Connecting two nodes from the same mother node horizontallyTikZ: What EXACTLY does the the |- notation for...