[MLton-devel] Real.fromLargeInt

Matthew Fluet Matthew Fluet <fluet@CS.Cornell.EDU>
Thu, 24 Oct 2002 14:06:08 -0400 (EDT)


> > Did that bug account for the Overflow exception?  
> 
> Whoops.  Nope.  The bug fix was in fromLargeInt, not toLargeInt.  I
> have no idea why you're seeing the problem, but please fix Real_modf
> before continuing.

This is very weird.  I merged the changes in mlton/atoms/prim.fun,
basis-library/real/real.{sig,sml} from on-20021018-prof-branch into the
HEAD branch, followed by a make nj-mlton.

Now the test file compiles and runs, and matches the output in
real.toFromLargeInt.ok.

On the other hand, if I use the exact same compiler and prepend to the
test program the following

structure Real =
struct
open Real
  (* code from real.sml for {to,from}LargeInt, adding
       datatype z = datatype IEEEReal.rounding_mode
     before negateMode; and replacing 
       val mode = getRoundingMode ()
     with
       val mode = IEEEReal.getRoundingMode ()
     at the end of fromLargeInt *)
end

Then the test file compiles but raises the Overflow exception.  Opening
IEEEReal instead of adding and replacing the out-of-scope
constructors/variables makes the exception go away.  Can anyone else
duplicate this behavior?



-------------------------------------------------------
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?sunm0003en
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel