[Mono-bugs] [Bug 44238][Wis] New - Math.Tan() returning incorrect results
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Fri, 6 Jun 2003 11:09:14 -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 jason@379.com.
http://bugzilla.ximian.com/show_bug.cgi?id=44238
--- shadow/44238 Fri Jun 6 11:09:14 2003
+++ shadow/44238.tmp.12877 Fri Jun 6 11:09:14 2003
@@ -0,0 +1,47 @@
+Bug#: 44238
+Product: Mono/Class Libraries
+Version: unspecified
+OS: Red Hat 9.0
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: jason@379.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Math.Tan() returning incorrect results
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+
+Math.Tan() appears to be returning different results from the MS version.
+
+Steps to reproduce the problem:
+
+Here are the results I am seeing. This may also indicate with
+Float.ToString(). Notice the last test in particular.
+
+ float fov = 60.0f;
+ float angle = (float)(fov * Math.PI / 180.0);
+ Console.WriteLine(angle);
+
+Prints '1.047198' on MS, '1.05' on Mono
+
+ float t = (float)Math.Tan(angle);
+ Console.WriteLine(t);
+
+Prints '1.732051' on MS, '1' on Mono
+
+ float top = 0.1f * (float)Math.Tan(fov * Math.PI / 180.0);
+ Console.WriteLine(top);
+
+Prints '0.1732051' on MS, '1.73' on Mono. Notice the different in
+magnitude.
+
+I am testing this with the 05-Jun-03 Mono snapshot.