[Mono-bugs] [Bug 25046] New - Math.Log() not within Epsilon

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
21 May 2002 14:59:26 -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 ndrochak@gol.com.

http://bugzilla.ximian.com/show_bug.cgi?id=25046

--- shadow/25046	Tue May 21 10:59:26 2002
+++ shadow/25046.tmp.4482	Tue May 21 10:59:26 2002
@@ -0,0 +1,40 @@
+Bug#: 25046
+Product: Mono/Class Libraries
+Version: unspecified
+OS: Red Hat 7.2
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ndrochak@gol.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Math.Log() not within Epsilon
+
+The following sample code (from a Unit test) runs fine on MS.NET (i.e. it 
+returns a 0).  On mono, I cannot figure what value to use for b so that 
+it will work on both platforms.
+
+--------------------------------------------
+
+using System;
+
+class C {
+	static double x = 0.1234;
+	static double y = 12.345;
+
+	public static int Main() {
+		double a = Math.Log(x, y);
+		double b = -0.83251695325303621;
+
+		if (Math.Abs(a - b) <= double.Epsilon)
+			return 0;
+
+		return 1;
+	}
+}