I try to calculate something like 1.569732312*Pi and by default mathematica returns something like 4.93146 (only 5 digits after floating point), but I believe there is much more digits, especially because Pi has infinite number of digits.

if I do like this

N[1.569732312*Pi, 50]

It still return the same 5 digits 4.93146

As I understand from documentation, I have to use Rationalize[]. If I do like this

N[Rationalize[1.569732312]*Pi, 50]

result is the same 4.93146

and only if I remove 3 digits like this

N[Rationalize[1.569732]*Pi, 50]

it gives me all digits like this


What I am doing wrong and how to calculate 1.569732312*Pi with 50 digits precision?

  • $\begingroup$ 1.569732312`50*Pi - note the backtick. See also here. $\endgroup$ – corey979 Oct 31 '16 at 22:18
  • $\begingroup$ Thanks a lot! Yes, if I put something like 1.569732312`50*Pi, it works fine. $\endgroup$ – Zlelik Oct 31 '16 at 22:32
  • $\begingroup$ 1.569732312 is a machine double. What 50 digit result would you expect to get from that product? (If you want a 50 digit number that has 1.569732312 followed by decimal zeroes, the tactic of using 1.569732312`50 as proposed by @corey979 is appropriate). $\endgroup$ – Daniel Lichtblau Oct 31 '16 at 22:33
  • $\begingroup$ I want to know the result of my equation. Like Pi=3.1415926...., If I multiple it by 2, it will be 6,2831852, but I want to know all 50 digits of this equation 2*Pi, because Pi has infinite digits. and later I want to change 2 to some different number. $\endgroup$ – Zlelik Oct 31 '16 at 22:49
  • $\begingroup$ you should review the details section in the docs for Rationalize to learn whats happening there. $\endgroup$ – george2079 Nov 1 '16 at 0:55

It is about backtick. This example works fine

  • 1
    $\begingroup$ Similarly, 2.0`50*Pi gives 2*Pi to 50 dgits $\endgroup$ – bill s Oct 31 '16 at 23:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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