Why does MATLAB only calculate to 4 significant digits?

30 views (last 30 days)
I only see 4 significant figures:
>>2/3
ans =
0.6667

Accepted Answer

Doug Hull
Doug Hull on 18 Jan 2011
It doesn't. It uses full double-precision floating point numbers to calculate everything. By default it only prints a few decimal places to the screen. You can change this using the command:
>>format long
Type:
>>doc format
for more information.
[From the MATLAB FAQ of ancient times...]

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!