Linked Questions

5
votes
2answers
143 views

N not behaving in the way I expected it would [duplicate]

I'm trying to use the N function to find the percent error between a function and a rounded value of that function. The code looks something like this. ...
6
votes
1answer
282 views

Calculations after NumberForm [duplicate]

As specified in documentation center the functions AccountingForm, NumberForm, etc. are useful only to display numbers in ...
1
vote
0answers
96 views

Rounding to the nearest decimal [duplicate]

If I have a bunch of numbers in a list {1.435243523432,2434.2321321412,5.8239897,...}, without multiplying everything by some power of ten and then dividing by that ...
8
votes
2answers
2k views

A problem about function N

Toady,I have a problem about N,described as below: For example N[1/3, 5] (* ==> 0.33333*) and ...
4
votes
2answers
2k views

Permanently rounding numbers/values to a given number of significant figures

I am searching for a simple way of rounding and setting an input to a desired number of significant figures. There are a vast number of posts that discuss similar problems, but none address this issue....
2
votes
3answers
2k views

Rounding to the nearest decimal and pasting such output into an Input cell

This question is very closely related to two earlier ones: Rounding to the nearest decimal and How do you round numbers so that it affects computation? but confronts an additional issue not ...
7
votes
3answers
285 views

Strange behavior of MemberQ, Position

After importing an array of latitudes and longitudes and trying to find the position of some latitudes I was encountered with an unexpected problem since certain values could not be found for some ...
4
votes
2answers
273 views

How to prevent Round with hided fractions

I found a strange behavior in Round. If we try: ToString[Round[4.811, 0.01], InputForm] we get: 4.8100000000000005 When I expected 4.81 In order to get ...
1
vote
2answers
245 views

Rounding numbers to certain numbers of significant figures

I have code which outputs numbers, for example,(0.2945847, 0.8647834, 1.6*10^-6) and similar. I would like to take these numbers and round them to 4 significant figures, but I can't find a way to do ...
0
votes
1answer
64 views

How to switch a number back from AccountingForm? [closed]

I am working with a function that returns output in AccountingForm format. I would like to do math with that output, but Mathematica does not recognize it as ...
0
votes
0answers
30 views

N[variable,2] displays 6 digits [duplicate]

The following code doesn't behave as I expect. Rather than getting 2 digits upon varying r, I get the default value of 6 digits. What's up? ...