A Problem with Mathematica's Precision

  • Context: Mathematica 
  • Thread starter Thread starter natski
  • Start date Start date
  • Tags Tags
    Precision
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
natski
Messages
262
Reaction score
2
Hi all,

Perhaps it is just me that is bugged by this, but I can never get the N function to work in Mathematica.

For example, try doing:

N[6.50889261991, 2]

and you get:

6.50889

Which clearly isn't to 2 significant figures or decimal places...

Does anyone know if there is something I am doing wrong with N?

Natski
 
Physics news on Phys.org
natski said:
Hi all,

Perhaps it is just me that is bugged by this, but I can never get the N function to work in Mathematica.

For example, try doing:

N[6.50889261991, 2]

and you get:

6.50889

Which clearly isn't to 2 significant figures or decimal places...

Does anyone know if there is something I am doing wrong with N?

Natski
You can use 6.50889261991`2 to get it to 2 significant figures. Or alternatively you can use 6.5`2

I don't know why N doesn't degrade the precision of the input, but I get the same result.