Function | Purposes |
ceil(x) | Rounds x to the smallest integer not less than x ceil (8.1) = 9.0 and ceil (-8.8) = -8.0 |
cos(x) | Trigonometric cosine of x (x in radians) |
exp(x) | Exponential function ex |
fabs(x) | Absolute value of x If x>0 then abs(x) is x If x=0 then abs(x) is 0.0 If x<0 then abs(x) is -x |
floor(x) | Rounds x to the largest integer not greater than x floor (8.2) = 8.0 and floor (-8.8 = -9.0) |
log(x) | Natural logarithm of x(base e) |
log10(x) | Logarithm of x (base 10) |
pow(x,y) | x raised to power y (xy) |
sin(x) | Trigonometric sine of x (x in radians) |
sqry(x) | Square root of x |
tan(x) | Trigonometric tangent of x (x in radians) |
Friday, May 27, 2011
Commonly used Math library functions.
Labels:
Library Functions (C++)
Saturday, January 29, 2011
New header files included in ANSI C++.
Header File | Contents and Purpose |
<utility> | Contains classes and functions that are used by many standard library header files. |
<vector>, <list>, <deque>, <queue>, <set>, <map>, <stack>, <bitset> | The header files contain classes that implement the standard library containers. Containers store data during a program's execution. |
<functional> | Contains classes and functions used by algorithm of the standard library. |
<memory> | Contains classes and function used by the library to allocate memory to the standard library contains. |
<iterator> | Contains classes for manipulating data in the standard library containers. |
<algorithm> | Contains functions for manipulating data in the standard library containers. |
<exception>, <stdexcept> | This header files contains classes that are used for exception handling. |
<string> | Contains the definitions of class string from the standard library. |
<sstream> | Contains function prototypes for functions that perform input from string in memory and output to string in memory. |
<locale> | Contains classes and functions normally used by stream processing to process data in the natural form for different languages (e.g., monetary formats, sorting strings, character presentation.) |
<limits> | Contains a class for defining the numerical data type limits on each computer platform. |
<typeinfo> | Contains classes for run-time type identification (determining data types at execution time). |
Labels:
Header Files (C++)
Subscribe to:
Posts (Atom)