A Problem with Mathematica's Precision

  • Context: Mathematica 
  • Thread starter Thread starter natski
  • Start date Start date
  • Tags Tags
    Precision
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
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.