double abs(double dX);
int abs(int); long abs(long); float abs(float); double abs(double); long double abs(long double);
float fabs(float); double fabs(double); long double fabs(long double); float fabsf(float); long double fabsl(long double);
* Note: Since C does not allow function overloading, these other versions of this function exist.
Domain (-∞, ∞) Range [0, ∞) Periodicity None Symmetry Y-axis Asymptotes None |
|
#include <iostream> #include <cmath> int main() { using namespace std; double dX = -3.4; cout << "x = " << dX << " abs(x) = " << abs(dX) << endl; dX = 15.1; cout << "x = " << dX << " abs(x) = " << abs(dX) << endl; return 0; }
© 20072024 XoaX.net LLC. All rights reserved.