0

I am not a genius mathematical scientist

but I'm trying to see how sqrt , cos , sin ,... functions do the calculations

I opened the file strictMath.java which is inside 'C:\Program Files\Java\jdk1.7.0_17\src.zip'

and that is what I found:

public static native double sin(double a);

public static native double cos(double a);

public static native double sqrt(double a);

I didnt see the code that each function use to calculate

so anyone can tell me how these functions work?

Mogsdad
  • 42,835
  • 20
  • 145
  • 262
Ameen
  • 1,536
  • 3
  • 15
  • 27

1 Answers1

0

You can find your solution in this post: Where can I find the source code for Java's Square Root function?

In these cases, I recommend you to look directly at the API: http://docs.oracle.com/javase/7/docs/api/java/lang/StrictMath.html

Community
  • 1
  • 1