Questions tagged [rounding]
26 questions
4
votes
1 answer
Round to certain values
For a program I write I need some optimal values. I calculated them using Mathematica and I get something like this:
{2375, 2556, 2758, 2974, 3201, 3677, 4173, 5068}
Since my program only accepts specific values like ...
{2000, 2800, 3600, 4200,…
Arji
- 1,134
- 7
- 10
3
votes
3 answers
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 addressed by those answers. (Incidentally, the only way…
David G. Stork
- 41,180
- 3
- 34
- 96
0
votes
1 answer
Why doesn't the Round function work on decimals and how to fix it or work around it
I'm trying to specify yaxis tick labels from 0 to 1.0 in steps of 0.1.
This is what I get:
ygrids=Range[0,1.0,0.1];
0.,0.1,0.2,0.30000000000000004,0.4,0.5,0.6000000000000001,0.7000000000000001,0.8,0.9,1.}
Round[ygrids,0.01] doesn't fix it. (0.001…
Tom Mozdzen
- 521
- 5
- 16