Implementation of the math.h library.
In this project i developed version of the standard math.h library in the C programming language. This library implements basic mathematical operations, which are then used in various algorithms. As part of the project you will learn the basics of computational methods and solidify knowledge of structured programming.
C mathematical operations are a group of functions in the standard library of the C programming language implementing basic mathematical functions. All functions use floating-point numbers in one manner or another. Different C standards provide different, albeit backwards-compatible, sets of functions. Any functions that operate on angles use radians as the unit of angle.
No. | Function | Description |
---|---|---|
1 | int abs(int x) |
computes absolute value of an integer value |
2 | long double acos(double x) |
computes arc cosine |
3 | long double asin(double x) |
computes arc sine |
4 | long double atan(double x) |
computes arc tangent |
5 | long double ceil(double x) |
returns the nearest integer not less than the given value |
6 | long double cos(double x) |
computes cosine |
7 | long double exp(double x) |
returns e raised to the given power |
8 | long double fabs(double x) |
computes absolute value of a floating-point value |
9 | long double floor(double x) |
returns the nearest integer not greater than the given value |
10 | long double fmod(double x, double y) |
remainder of the floating-point division operation |
11 | long double log(double x) |
computes natural logarithm |
12 | long double pow(double base, double exp) |
raises a number to the given power |
13 | long double sin(double x) |
computes sine |
14 | long double sqrt(double x) |
computes square root |
15 | long double tan(double x) |
computes tangent |
make