Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8278606

Math.sin() and Math.asin() don't work properly

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      I haven't tried this yet for all the trig functions, but Math.sin() and Math.asin() don't produce expected results.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      I was using some trig functions for a program for my friend, a mathematician, and it didn't give expected results. I expected the sine to return ~0.017452, as it had shown on my calculator.
      ACTUAL -
      The sine instead returned ~0.8, nowhere in the range or around it. As for the arcsine, I expected 90, but instead got ~1.5. Again, what?

      ---------- BEGIN SOURCE ----------
      Sine: System.out.println(Math.sin(1));
      Arcsine: System.out.println(Math.asin(1));
      ---------- END SOURCE ----------

            tongwan Andrew Wang
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: