[MLton-user] Real32.realRound is broken
John Reppy
jhreppy at mac.com
Wed Apr 23 20:44:12 PDT 2008
The Real32.realRound function in mlton does not work. Here is a
simple test
program:
fun snap f = 0.001 * Real32.realRound(f * 1000.0);
fun g x = print(concat["x = ", Real32.toString x, ", snap(x) = ",
Real32.toString(snap x), "\n"]);
g 45.0000038147;
The Real64 version of this program produces the correct output
x = 45.0000038147, snap(x) = 45
but the Real32 version produces
x = 45.0000038147, snap(x) = 45.0000038147
This is using MLton 20070826 on Mac OS X 10.5.2/Intel.
- John
More information about the MLton-user
mailing list