Mathematica A Problem with Mathematica's Precision

  • Thread starter Thread starter natski
  • Start date Start date
  • Tags Tags
    Precision
AI Thread Summary
The discussion centers around the confusion regarding the use of the N function in Mathematica for formatting numbers to a specified number of significant figures. A user expresses frustration that using N[6.50889261991, 2] results in 6.50889, which does not reflect two significant figures as expected. Another participant suggests using an alternative notation, such as 6.50889261991`2 or 6.5`2, to achieve the desired formatting. The conversation highlights a common issue with the N function not reducing the precision of the input as anticipated, leading to confusion among users.
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.
 

Similar threads

Replies
5
Views
3K
Replies
4
Views
2K
Replies
1
Views
2K
Replies
12
Views
5K
Replies
6
Views
2K
Back
Top