[MLton-devel] Real.fromLargeInt

Stephen Weeks MLton@mlton.org
Tue, 22 Oct 2002 23:05:03 -0700


> I'm still thinking about the Real.fromLargeInt function, but note that the
> IntInf.log2 can raise overflow for REALLY huge IntInf.int values.

I.E. those taking up 1/4G or more of space.  True enough.  I changed
the log2 line to the following.

		  val exp: Int.int =
		     IntInf.log2 i
		     handle Overflow => 1024 (* to ensure posInf *) 


> Also, why all the explicit Int.* operations instead of using the
> overloading.

Because this occurs inside the Real module, the usual ops aren't
overloaded.

> Similarly, why the IntInf.fromInt <small integer constant>?  Is this just
> because SML/NJ doesn't handle the overloading for IntInf's?

Yes.


-------------------------------------------------------
This sf.net emial 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