Numerical value of Determinant far from what it is supposed to beNumeric 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?

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

Are small insurances worth it?

How exactly does an Ethernet collision happen in the cable, since nodes use different circuits for Tx and Rx?

How do I increase the number of TTY consoles?

I reported the illegal activity of my boss to his boss. My boss found out. Now I am being punished. What should I do?

If sound is a longitudinal wave, why can we hear it if our ears aren't aligned with the propagation direction?

Why restrict private health insurance?

ESPP--any reason not to go all in?

Giving a career talk in my old university, how prominently should I tell students my salary?

Create chunks from an array

"If + would" conditional in present perfect tense

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

School performs periodic password audits. Is my password compromised?

Do black holes violate the conservation of mass?

What does the Digital Threat scope actually do?

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

Are these two graphs isomorphic? Why/Why not?

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

Will expression retain the same definition if particle is changed?

How should I solve this integral with changing parameters?

Which country has more?

Why aren't there more Gauls like Obelix?

Are all players supposed to be able to see each others' character sheets?

Having the player face themselves after the mid-game



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 2 hours 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

            Magento 2 - Add success message with knockout Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Success / Error message on ajax request$.widget is not a function when loading a homepage after add custom jQuery on custom themeHow can bind jQuery to current document in Magento 2 When template load by ajaxRedirect page using plugin in Magento 2Magento 2 - Update quantity and totals of cart page without page reload?Magento 2: Quote data not loaded on knockout checkoutMagento 2 : I need to change add to cart success message after adding product into cart through pluginMagento 2.2.5 How to add additional products to cart from new checkout step?Magento 2 Add error/success message with knockoutCan't validate Post Code on checkout page

            Fil:Tokke komm.svg

            Where did Arya get these scars? Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Favourite questions and answers from the 1st quarter of 2019Why did Arya refuse to end it?Has the pronunciation of Arya Stark's name changed?Has Arya forgiven people?Why did Arya Stark lose her vision?Why can Arya still use the faces?Has the Narrow Sea become narrower?Does Arya Stark know how to make poisons outside of the House of Black and White?Why did Nymeria leave Arya?Why did Arya not kill the Lannister soldiers she encountered in the Riverlands?What is the current canonical age of Sansa, Bran and Arya Stark?