Table 2.4:
Some predefined functions in C++
Name |
Meaning |
abs( ) |
Absolute value |
sqrt( ) |
Square root |
log( ) |
Logarithm to the base e=2.71828 |
log10 ( ) |
Logarithm to the base 10 |
exp( ) |
Power of e or exponential |
sin( ) |
Sine of the angle whose measure is given in radians |
cos( ) |
Cosine the angle whose measure is given in radians |
tan( ) |
Tangent of the angle whose measure is given in radians |
atan( ) |
Arctagnget or principal angle in radians of a given value |
acos( ) |
Arccosine |
asin( ) |
Arcsine |
ceil( ) |
Rounds numbers up to nearest integer |
floor( ) |
Rounds numbers down to the nearest integer |
pow(x,y) |
xy |