[Mono-bugs] [Bug 44238][Wis] Changed - Math.Tan() returning incorrect results
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Mon, 9 Jun 2003 10:34:52 -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 12:32:24 2003
+++ shadow/44238.tmp.6872 Mon Jun 9 10:34:52 2003
@@ -55,6 +55,30 @@
tan (p)
tan (0)
Does this happen with the other trig functions?
Is mono able to roundtrip all numbers in [0, p/2) with the following:
arctan (tan ( theta))?
+
+------- Additional Comments From jason@379.com 2003-06-09 10:34 -------
+I can make this easier: Mono's Math.Tan() always returns 1.0 no
+matter what you pass in. I tried this code:
+
+ using System;
+ public class MathTest {
+ static void Main(string[] args) {
+ double v = (args[0]=="PI") ? Math.PI : double.Parse(args[0]);
+ double r = Math.Tan(v);
+ Console.WriteLine(r);
+ if (r == 1.0) Console.WriteLine("failed");
+ }
+ }
+
+With values like PI, 0, 1, 1.128, etc.
+
+Built with mcs, run on Mono: always 1.0
+Built with csc, run on Mono: always 1.0
+Built with mcs, run on .NET: returns correct values
+Built with csc, run on .NET: returns correct values
+
+Sin() and Cos() return correct values on both Mono and .NET.
+