[Mono-bugs] [Bug 54467][Wis] Changed - Incorrect values when subtracting doubles

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 18 May 2004 10:55:28 -0400 (EDT)

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 lupus@ximian.com.


--- shadow/54467	2004-05-18 10:20:11.000000000 -0400
+++ shadow/54467.tmp.25362	2004-05-18 10:55:28.000000000 -0400
@@ -73,6 +73,15 @@
 These two aparently redundant instructions have the effect of making
 the value a proper double (64 bits), so that the result of the fsub
 is actually zero.
 I'll investigate a fix for this...
+------- Additional Comments From lupus@ximian.com  2004-05-18 10:55 -------
+We already set the FPU precision to 64 bits, since the spec basically
+requires us to do that, but the FPU honours the precision only when
+executing some of the opcodes. So for atan, and likely sin, cos, sqrt
+etc we need to manually truncate the result to 64 bits. Storing and
+loading is the easier way: adding 0.0 also seems to work and could be
+faster, but this solution needs more tests to see it it may have side
+affects with NaNs etc.