[MLton] cvs commit: C types now distinguish between signed and unsigned words

Stephen Weeks MLton@mlton.org
Sun, 12 Sep 2004 20:25:56 -0700


> the trigonometric functions test is generating slightly wrong
> results (specifically, sin, cosh, and tanh generate results that are
> incorrect in the three least significant digits - which in Real64
> amounts to very little error).  My guess is that rounding is not
> happening correctly.

Perhaps.  Or perhaps there is no problem at all, just a difference in
the math libraries.  We've seen this before in many situations,
especially with trig functions on large values.

> In that case, what rounding mode should be in effect when doing the
> trig portion of the test?

Since there aren't any calls to setRoundingMode, I'd say the default
mode.  I can't remember if this is specified anywhere, but on my
machine it's TO_NEAREST.

> Second, does real.sml have any tests tailored specifically to rounding?  

Yes, a little bit, in the sections "Testing {from,to}LargeInt" and
"Testing ceil,floor,round,trunc".

> Since all other portions of the real.sml test are passing, it would seem
> that rounding is working.  However, I don't see anywhere that it's going
> through basic arithmetic operations with different rounding modes... yet
> this would seem like the best test.

Yeah.  The above mentioned only test rounding with conversions.
There's nothing with rounding modes and arithops.  That would be nice
to see.


If this is the only problem remaining, I'd say to cleanup what you
have and send it for checkin, so that we can all work with the same
sources.  Also, I can start trying to bootstrap MLton so you can work
directly on your PowerBook.