Wrong type for Real.fromDecimal

View: New views
1 Messages — Rating Filter:   Alert me  

Wrong type for Real.fromDecimal

by Vesa Karvonen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

The type of Real.fromDecimal

  Poly/ML 5.1 Testing
  > Real.fromDecimal ;
  val it = fn : IEEEReal.decimal_approx -> Real.real

  SML# 0.30 (2007-07-03 16:16:12 JST)
  # Real.fromDecimal ;
  val it = fn : IEEEReal.decimal_approx  -> Real.Math.real

  Standard ML of New Jersey v110.66 [built: Thu Oct 25 11:43:30 2007]
  - Real.fromDecimal ;
  [autoloading]
  [library $SMLNJ-BASIS/basis.cm is stable]
  [autoloading done]
  val it = fn : IEEEReal.decimal_approx -> real

disagrees with the Basis Library specification
(http://www.standardml.org/Basis/real.html#SIG:REAL.toDecimal:VAL)

  val fromDecimal : IEEEReal.decimal_approx -> real option

in all of the three compiler's implementation of the Basis Library.
Also note that the description in the Basis Library spec includes the
equation

  fromDecimal (toDecimal r) = r

which is incorrect, of course.

-Vesa Karvonen

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Smlnj-list mailing list
Smlnj-list@...
https://lists.sourceforge.net/lists/listinfo/smlnj-list
LightInTheBox - Buy quality products at wholesale price