Calculating with high precision at all times

Hi, i have to calculation with very small numbers (10^-15) and i would want all the digits available to show at all times to keep track and not loose precision. Even if its a 1 i would want it displayed worh all the decimal points specified. Can this be done? Cheers

답변 (2개)

Image Analyst
Image Analyst 2019년 1월 16일

0 개 추천

Yes, I believe so, if you specify enough decimal points in fprintf() when you print your results to the command window. Otherwise with format glong you only get whatever is the default but with fprintf() I've seen people display numbers with like 30 numbers to the right of the decimal point.
Walter Roberson
Walter Roberson 2019년 1월 16일

0 개 추천

Not quite, no. The closest you can get is
format long e
This is documented as displaying 15 digits, which is one digit shorter than the number of digits that are (sometimes) resolvable by MATLAB.
On the other hand, a quick test a moment ago had it displaying 15 digits after the decimal point. Together with the digit before the decimal point that makes 16, the full discernable precision.

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

답변:

2019년 1월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by