go to previous page   go to home page   go to next page hear noise highlighting

Answer:

Both are double.

Recall that single precision float has accuracy about the same as seven decimal places, and that double precision float has accuracy about the same as 16 decimal places.

Cosine Documentation

Here is some of the documentation:

java.lang 
Class Math

... 

cos

public static double cos(double a)
Returns the trigonometric cosine of an angle.

sin

public static double sin(double a)
Returns the trigonometric sine of an angle.

tan

public static double tan(double a)
Returns the trigonometric tangent of an angle.

cos is a static function of the class Math, which is found in the java.lang package. Classes from that package (such as String and Math) are so common that you do not have to import the package. The angle a is a double and must be expressed in radians. The return value is a double.


QUESTION 20:

(Math Review: ) Can angles in radian measure be converted to degrees?


go to previous page   go to home page   go to next page