I am trying to calculating the really large numbers and for me every digit is really important. And when I calculate something like
-21.5285205418215^7 = -2143380623.72146
but i can get -2.1433806237214575947621383797325809034573762312079110764454258301078078657143012124536380684836484375 × 10^9 from wolframalpha. I am not expecting this kind of precision but I would like to have more than 5 decimal. Is there a way to do that in Matlab?
Thanks

답변 (2개)

dpb
dpb 2015년 4월 24일
편집: dpb 2015년 4월 24일

2 개 추천

Symbolic Toolbox is the TMW solution; there are some extended precision support packages on the File Exchange I believe.
The five digits displayed at the command line is simply a figment of the display(*); TMW uses IEEE double by default which has 15-16 decimal digits of precision. If you really need more than that, one of the above is the alternative.
(*)
>> pi
ans =
3.1416
>> format long
>> pi
ans =
3.141592653589793
>>
John D'Errico
John D'Errico 2015년 4월 24일

1 개 추천

As much as I agree that you can use the symbolic toolbox, or even my own HPF, the fact is, most of those digits in the result you show are worthless crapola.
You started out with 15 significant digits. Thinking that you can raise that number to a large power, and get 100 plus digits out the end is simple foolishness.
Unless you are working with integers, any digits past 15 digits in the result are virtually meaningless.

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2015년 4월 24일

답변:

2015년 4월 24일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by