[Pharo-project] Issue 3733 in pharo: Float>>roundUpTo: wrong results

pharo at googlecode.com pharo at googlecode.com
Fri Feb 18 19:43:05 CET 2011


Updates:
	Status: WontFix

Comment #1 on issue 3733 by nicolas.... at gmail.com: Float>>roundUpTo: wrong  
results
http://code.google.com/p/pharo/issues/detail?id=3733

Don't put too many expectations on Float, they are inexact:
560.19 > 560.19s2 -> true
500.19 < 500.19s2 -> true
QED

Please use ScaledDecimal.
560.19s2 roundUpTo: 0.01s2. 560.19s2
500.19s2 roundUpTo: 0.01s2. 500.19s2
560.19s2 roundUpTo: 0.1s2. 560.20s2
500.19s2 roundUpTo: 0.1s2. 500.20s2





More information about the Pharo-project mailing list