Group Abstract Group Abstract

Message Boards Message Boards

0
|
7K Views
|
2 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Turning off significant digits?

Posted 7 years ago
POSTED BY: Tyler Corbett
2 Replies

By default, the Mathematica Front End displays 6 digits of numbers with finite precision. It is internally using more digits for the calculations, but it only displays 6, rounding the final digit if necessary.

You can changed this by going to File>Preferences (Mathematica>Preferences on a Mac), choosing the Appearance tab, the Numbers subtab, and then the Formatting sub-subtab. A bit over halfway down, there is an option for "Number of digits displayed in output". Change this to something greater than 6. You will then see your desired result in the Front End.

You can use functions like NumberForm to change how numbers are displayed on a case by case basis, if needed.

POSTED BY: Karl Isensee

Default number of decimal digits displayed is six. There are many ways to display more, for example:

NumberForm[29204.24 - 5840.85, 7]

yields

23363.39

Approximate numbers (anything with a decimal point) use an internal binary representation. This means that internally, approximate decimal inputs are rounded to the nearest binary floating point number, so results may not exactly reflect an exact decimal calculation. For exact calculation, use rational numbers:

2920424/100 - 584085/100

yields

2336339/100
POSTED BY: John Doty
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard