//math.h
double double__x = 45.45 ;
double double__y = 30.20 ;
void setup() {
Serial.begin(9600);
//1.cos() Calculates the cosine of an angle (in radians).
// The result will be between -1 and 1.
Serial.print("1. cos(45.45) = ");
Serial.println (cos (double__x) ); // returns cosine of x
//2.fabs() calculates the absolute value of the floating-point argument
Serial.print("2.absolute value of num = ");
Serial.println (fabs (-10.5) ); // absolute value of a float
//3.fmod() The C library fmod() function takes two parameters(x & y)
//of type double that returns the remainder on division(x/y).
Serial.print("3.floating point modulo = ");
Serial.println (fmod (double__x, double__y)); // floating point modulo
//4.sin() Calculates the sine of an angle (in radians).
//The result will be between -1 and 1.
Serial.print("4.sine of num = ");
Serial.println (sin (double__x) ) ;// returns sine of x
//5.sqrt() The function sqrt() calculates the square root of a number.
Serial.print("5.square root of num : ");
Serial.println ( sqrt (double__x) );// returns square root of x
//6.tan() Calculates the tangent of an angle (in radians).
//The result will be between negative infinity and infinity.
Serial.print("6.tangent of num : ");
Serial.println ( tan (double__x) ); // returns tangent of x
//7. exp() calculates the exponential value of a number
Serial.print("7.exponential value of num : ");
Serial.println ( exp (double__x) ); // function returns the exponential value of x.
//8.atan() Arctan, also known as the inverse tangent,
//is a trigonometric function that determines the
// angle whose tangent is a given value
Serial.print("8.arc tangent of");
Serial.println (atan (double__x) ); // arc tangent of x
//9.atan2()
Serial.print("9.tangent of num : ");
Serial.println(atan2 (double__y, double__x) );// arc tangent of y/x
//10.log()
Serial.print("10.arc tangent of num : ");
Serial.println (log (double__x) ) ; // natural logarithm of x
//11.log10()
Serial.print("11.log10 num : ");
Serial.println ( log10 (double__x)); // logarithm of x to base 10.
//12.pow() // x to power of y
Serial.print("12.logarithm of num to base 10 : ");
Serial.println (pow (double__x, double__y) );// x to power of y
//13.square()
Serial.print("13.quare of num : ");
Serial.println (square (double__x)); // square of x
}
void loop() {
}
/*
*/