builtInFunctions

builtInFunctions - double exp(double); /* e to the power */...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
int abs(int); double fabs(double); Both compute the absolute value. abs is used for ints and fabs is used for doubles. abs(-3) 3 fabs(-4.5) 4.5
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
double ceil(double); double floor(double); ceil floor 0 1 2 3 4 5 -6 -5 -4 -3 -2 -1 3.2 ceil(3.2)=4.0 floor(3.2)=3.0 -3.2 ceil(-3.2)=-3.0 floor(-3.2)=-4.0 ceil(2.0)=2.0 floor(2.0)=2.0
Background image of page 2
double cos(double); /* in radians */ double sin(double); double tan(double); tan ( pi/2.0) near infinity
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
double log(double); /* ln, log base e */ double log10(double); /*log base 10 */
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: double exp(double); /* e to the power */ exp(2.4) = e 2.4 exp ( log ( 53.2)) = 53.2 log ( exp (17.1)) = 17.1 double pow(double b, double c); /* b to the c */ b c double sqrt(double) You can't take the square root of a negative number. Therefore, you can't do pow(-3.0, 0.5); sqrt(-3.0) ; (If you try pow(-3.0, 1/2) you get 1.0, because pow(-3.0,1/2) = pow(-3.0, 0.0) = 1.0 )...
View Full Document

This note was uploaded on 05/05/2011 for the course EEE 212 taught by Professor Des during the Spring '11 term at Syracuse.

Page1 / 5

builtInFunctions - double exp(double); /* e to the power */...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online