[MLton-devel] Real.fromLargeInt
Matthew Fluet
Matthew Fluet <fluet@CS.Cornell.EDU>
Wed, 23 Oct 2002 18:51:34 -0400 (EDT)
> > Real.fromLargeInt's pos function doesn't seem to be affected by the
> > current rounding mode. Furthermore, ~ (pos (IntInf.~ i)) won't always
> > give the correct result for some rounding modes.
>
> Agreed. I've attached my latest attempt, which fixes these problems,
> below.
Did you try that code with the test program I sent? The fromLargeInt
looks fine, but I got an uncaught Overflow exception on the first call to
toLargeInt. -exn-history true shows that it was raised by:
> case class x of
> INF => raise Overflow
> | _ =>
which seems very odd, because commenting out the call to toLargeInt prints
out a finite real as a result of the fromLargeInt call. I didn't
recompile with the Real_modf correction, but that shouldn't have affected
the result of the class function.
-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel