[Mono-bugs] [Bug 25046] Changed - Math.Log() not within Epsilon
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
7 Jun 2002 21:22:28 -0000
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 martin@gnome.org.
http://bugzilla.ximian.com/show_bug.cgi?id=25046
--- shadow/25046 Tue May 21 10:59:26 2002
+++ shadow/25046.tmp.31494 Fri Jun 7 17:22:28 2002
@@ -1,14 +1,14 @@
Bug#: 25046
Product: Mono/Class Libraries
Version: unspecified
OS: Red Hat 7.2
OS Details:
-Status: NEW
+Status: ASSIGNED
Resolution:
-Severity:
+Severity: Unknown
Priority: Wishlist
Component: CORLIB
AssignedTo: mono-bugs@ximian.com
ReportedBy: ndrochak@gol.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
@@ -35,6 +35,26 @@
if (Math.Abs(a - b) <= double.Epsilon)
return 0;
return 1;
}
}
+
+------- Additional Comments From martin@gnome.org 2002-06-07 17:22 -------
+Well, this test does not run "fine" on .NET - it's broken there
+since the "exact" value is (*)
+
+-0.832516953253036096072037253179587423801422119140625
+and not
+-0.83251695325303621.
+
+Looks like our corlib/runtime calculates the logarithm with a
+better precision than mscorlib - if you use the correct value
+-0.8325169532530361 for your b, then the test will pass with our
+corlib (but fail with mscorlib since it's getting rounding errors
+there).
+
+So my suggestion is to set b = -0.8325169532530361 and check whether
+a-b <= 1e-14 - this'll work with both.
+
+(*) printf ("%50.48f", log (0.1234) / log (12.345)) in GNU Octave ...
+