[go: up one dir, main page]

0% found this document useful (0 votes)
26 views2 pages

0575 Matlibmethod 6243046885778461482

Uploaded by

Khushi Sreedhar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views2 pages

0575 Matlibmethod 6243046885778461482

Uploaded by

Khushi Sreedhar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Mathematical Library Methods

Used to carry out mathematical operations in programming.


Function Input Output
Two inputs : Datatype of output
1) Math.min( a , b )
The datatypes can be can be
ReturndataType min(dataType num1,
byte, short, int, long, int, long, float or
dataType num2)
char, float, double double.
Two inputs : Datatype of output
2) Math.max( a , b )
The datatypes can be can be
ReturndataType max(dataType num1,
byte, short, int, long, int, long, float or
dataType num2)
char, float, double. double.
Two inputs :
3) Math.pow( a , b ) The datatypes can be
double
double pow(double a, double b) => ab byte, short, int, long,
float, double.
Function Input Output

4) Math.sqrt( a ) Should be a positive number – can be byte, double


double sqrt(double a) short, int, long, float or double. If negative number is the argument, it
returns NaN. (Not a number)

5) Math.cbrt( a ) To find the cube root of a positive or double


double sqrt(double a) negative number. Cube root of a negative value is
Can be byte, short, int, long, float or of negative sign
double.
6) Math.abs( a ) Can be byte, short, int, long, float or Datatype of output can be
DataType abs(DataType a) double. int, long, float or double.

You might also like