5
$\begingroup$

I've solved some equations using FindRoot and then computed some values. Now when I print the output, I only get a certain precision

{{0.01, 496.983, 61.3147, 80., 0.047},
{0.02, 496.983, 61.3147, 80., 0.047},
{0.03, 496.983, 61.3147, 80., 0.047},
...
{0.18, 496.97, 61.3142, 80., 0.047001},
{0.19, 496.969, 61.3141, 80., 0.0470011},
{0.2, 496.968, 61.3141, 80., 0.0470012}}

But when I copy and past the individual numbers, say the 61.3147 in the first two rows, I get

61.314699633952216`
61.31469210981553`

What can I do to increase the precision of the visible output so I can eyeball it?

$\endgroup$
4
  • $\begingroup$ reference.wolfram.com/mathematica/tutorial/… $\endgroup$ May 9, 2013 at 2:44
  • 3
    $\begingroup$ @Oleksandr: Appearance > Numbers > Formatting > Displayed Precision $\endgroup$ May 9, 2013 at 2:56
  • $\begingroup$ If you don't want to change the global display, you may also try InputForm.(For example, InputForm@RandomReal[{1, 5}, 10]) $\endgroup$
    – luyuwuli
    May 9, 2013 at 3:30
  • $\begingroup$ As a simple workaround, you can just edit the output cell (e.g. add a single space to it). This'll show the full number. $\endgroup$
    – Szabolcs
    May 9, 2013 at 13:40

1 Answer 1

8
$\begingroup$

You must set the option PrintPrecision to a higher value (The default is 6 digits).

  • This can be done with the Option Inspector very easily.

  • This can also be done programmatically :

    SetOptions[SelectedNotebook[], PrintPrecision -> 16]

  • It works too with Style[]:

    Style[N[\[Pi]], PrintPrecision -> 10]

    --> 3.141592654 (instead of default 6 digits :3.14159)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.