1

How do I change the default precision in Mathematica?

Somehow the setting has been changed to 1 digit, so if I type

Timing[...]

I get

{1., ...}

which is not very enlightening. Similarly,

N[Pi]

is

3.

Compare Mathematica's documentation for Numerical Precision which says of the above command "In standard output form, Mathematica prints a number like this to six digits." So something isn't right with my setup.

I read the guide to numerical precision but it didn't appear to address this issue.

Note that I do not want to change WorkingPrecision or PrecisionGoal on a particular function,but just change the default setting. (Of course I'll have to adjust these in some cases, but I just want to have a sensible starting point.)

Yves Klett
  • 15,383
  • 5
  • 57
  • 124
Charles
  • 1,359
  • 8
  • 13
  • I have marked this as "already has an answer here:" because I think it has. If PrintPrecision does not solve your problem @comment me or flag this post for moderator attention. – Mr.Wizard Mar 13 '14 at 15:13
  • @Mr.Wizard: Thanks. Actually this doesn't address my problem. For example, the documentation says of N[Pi] "In standard output form, Mathematica prints a number like this to six digits." But I get 0, and I don't want to have to append PrintPrecision to every command I run. (I'm not even sure if it applies to a command like Timing in any case.) – Charles Mar 13 '14 at 16:53
  • 1
    Did you change any options under Preferences->Appearance->Numbers->Formatting? Are you working on a fresh kernel? Your question title may be misleading if your display is somehow messed up. – Yves Klett Mar 13 '14 at 18:26
  • @YvesKlett: That's it! Thank you. – Charles Mar 13 '14 at 18:28
  • @Mr.Wizard the correct answer is in the linked thread, but the accepted one does not adress the issue here... best practice? – Yves Klett Mar 13 '14 at 18:33
  • @YvesKlett Nothing can be done about it. OPs are free to choose whichever answer they like best. The votes tell that Rolf's answer is more useful... In such cases, I suggest just leaving the OP of the duplicate a comment pointing to the most useful answer. – rm -rf Mar 13 '14 at 18:49
  • @YvesKlett: I don't know the best practice here. I'm satisfied with any outcome, though I would prefer to credit you with the answer. (My troubles may not be over: soon after changing the setting it reset itself back to 1. I changed it back a second time and haven't had problems yet, but we'll see if it sticks when I restart.) – Charles Mar 13 '14 at 19:26
  • I guess Rolf´s and Mr. Wizard´s answer in the linked thread are on spot, no worries about the rep. Good luck with your prefs :D – Yves Klett Mar 13 '14 at 19:52

0 Answers0