[Mono-bugs] [Bug 80507][Nor] Changed - incorrect comparison NaN and +Inf

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Jan 29 07:35:37 EST 2007

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by vargaz at gmail.com.


--- shadow/80507	2007-01-29 03:59:52.000000000 -0500
+++ shadow/80507.tmp.1894	2007-01-29 07:35:37.000000000 -0500
@@ -51,6 +51,22 @@
 as 3.14E-328 something...
 In general what non .un comparision is supposed to do if one of the
 arguments is non-finitive?
+------- Additional Comments From vargaz at gmail.com  2007-01-29 07:35 -------
+non-un comparisons return false if the arguments are not comparable,
+ie. 1.0 < nan is false. Most architectures have fp compare instructions
+which take this into account. the un comparisons are needed to implement
+the opposite of the normal comparisons, i.e.
+(a < b) is bl, while !(a < b) is translated into bge.un. This is because
+fp comparisons can return 4 values, not just three: lesser, greater,
+equal or unordered.
+To get the representation of nan, try a C program which produces a
+nan, like
+double d = 0.0 / 0.0;
+and look at the memory occupied by 'd'.

More information about the mono-bugs mailing list