Professional Documents
Culture Documents
Javanotes MathsFun
Javanotes MathsFun
Javanotes MathsFun
6. Math. abs()- returns the absolute ialue means number without sign. It
returns integer or double type ialue depends upon the arguments.
double n=Math.abs (1.44); output n=1.44
int n=Math.abs (-4); output n=4
7. Math.log ()- returns the natural log ialue. It returns a double type ialue.
11.Math.rint( )- returns the integer part of the fractonal number when the
fractonal part is less or equal to 0.5 and it returns the next higher ialue
for more than 0.5 in double data type.
double d= Math.rint(6.45) output d = 6.0
double d= Math.rint(6.87) output d = 7.0
double d= Math.rint(6.5) output d = 6.0
double d= Math.rint(-6.45) output d =- 6.0
double d= Math.rint(-6.5) output d = -6.0
double d= Math.rint(-6.54) output d = -7.0
double n = Math.random();
Let a = 30;
X= (22/7*180))*a
14.Math.asin ( ) – returns the angle in degrees.
Degree = (radian*7*180)/22;