int absint - PowerPoint PPT Presentation

1 / 5
About This Presentation
Title:

int absint

Description:

int abs(int); double fabs(double); Both compute the absolute value. ... ceil(2.0)=2.0. floor(2.0)=2.0. double cos(double); /* in radians */ double sin(double) ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 6
Provided by: marjory
Category:
Tags: absint | ceil | int

less

Transcript and Presenter's Notes

Title: int absint


1
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 fab
s(-4.5) 4.5
2
double ceil(double) double floor(double)
ceil(2.0)2.0 floor(2.0)2.0
3
double cos(double) / in radians / double
sin(double) double tan(double)
tan ( pi/2.0) near infinity
4
double log(double) / ln, log base e / double
log10(double) /log base 10 /
double exp(double) / e to the power
/ exp(2.4) e2.4
exp ( log ( 53.2)) 53.2 log ( exp (17.1)) 17.1
5
double pow(double b, double c) / b to the
c / bc 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)
Write a Comment
User Comments (0)
About PowerShow.com