How can I round an expression to 2 decimal points?

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: How can I round an expression to 2 decimal points?

Richard Ristow
Boika Mileva wrote
I have to calculate an expression into a variable with a FORMAT F6.2 and I need it rounded to 2 decimal points.
Why do you need to round to two decimal places?  I ask, because one possible reason is to get values that test as exactly equal to some other two-decimal values; and that may not work.  SPSS stores numbers in binary, and many two-decimal values cannot be represented exactly.  If you're comparing two two-decimal numbers, you may find that some that should be equal, test as unequal.
12