From: <fl...@us...> - 2012-06-11 21:05:22
|
Revision: 7571 http://mlton.svn.sourceforge.net/mlton/?rev=7571&view=rev Author: fluet Date: 2012-06-11 20:57:21 +0000 (Mon, 11 Jun 2012) Log Message: ----------- Revert RealX.equals to return false for two nan values. nan values represented by distinct bit-patterns are not equal. There are a number of functions (MLton.Real{32,64}.castToWord, Real.signBit, Pack{Real,Real32,Real64,LargeReal}{Big,Little,Host}.*) that reveal a floating-point value's bit pattern. In particular, the following should result in two distinct nan values with different sign bits: val nan = posInf + negInf val pnan = copySign (nan, 1.0) val psb = signBit pnan val nnan = copySign (nan, ~1.0) val nsb = signBit nnan However, if these are constant folded and common-subexpression eliminated (with RealX.equals returning true for two nan values), then psb and nsb will (incorrectly) be equal. Modified Paths: -------------- mlton/trunk/mlton/atoms/real-x.fun This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ MLton-commit mailing list MLt...@li...; mlt...@ml... https://lists.sourceforge.net/lists/listinfo/mlton-commit |