1
$\begingroup$

It surprises me that Mathematica does not show decimals after evaluating the following calculations:

500000+5.05

Result: 500005.

Expecting: 500005.05

500000+5.65

Result: 500006.

Expecting: 500005.65

It is possible to use FullForm[] to see the decimals, but this seems redundant when working with smaller numbers and/or a few decimals.

$\endgroup$
3
  • 1
    $\begingroup$ You can use NumberForm on the result to specify display of more digits in a one-off approach, or you can set a different default permanently using Settings -> Appearance -> Formatting -> Numbers. See the two non-accepted answers to Mathematica Precision. $\endgroup$
    – MarcoB
    Dec 10, 2021 at 20:37
  • 1
    $\begingroup$ Thanks! Solved by changing to a higher value in: Edit->Preferences->Appearance->Formatting->Numbers, Displayed Precision, Number of digits displayed in output [change value] $\endgroup$
    – MiKK
    Dec 10, 2021 at 22:50
  • $\begingroup$ Also a duplicate: mathematica.stackexchange.com/q/24896/4999 $\endgroup$
    – Michael E2
    Dec 11, 2021 at 13:34

0

Browse other questions tagged or ask your own question.