Question 01
Can a java compiler provide
math functions
Ans
Yes a java compiler provide
many java compiler. The Math class provide many mathematical functions
Question 02
Write some Math function.
Ans
01 sin(radians) Returns the
trigonometric sine of an angle in radians.
02 cos(radians) Returns
the trigonometric cosine of an angle in radians.
03
tan(radians) Returns
the trigonometric tangent of an angle in radians.
04
toRadians(degree) Returns
the angle in radians for the angle in degree.
05
toDegree(radians) Returns
the angle in degrees for the angle in radians.
06 asin(a) Returns
the angle in radians for the inverse of sine.
07 acos(a) Returns
the angle in radians for the inverse of cosine.
08 atan(a) Returns the angle in radians for the inverse of tangent.
Question 03
Write some exponent methods in
java
Ans
exp(x) Returns e raised to power of x (ex).
log(x) Returns the natural logarithm of x (ln(x) = loge(x)).
log10(x)
Returns the base 10 logarithm of x (log10(x)).
pow(a, b)
Returns a raised to the power of b
sqrt(x) Returns the square root of x
No comments:
Post a Comment