Samsung Internal API reference  2.0
math.h
Go to the documentation of this file.
1 
9 #ifndef _H_MATH_
10 #define _H_MATH_
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #include <compiler.h>
17 #include <dso_defs.h>
18 
21 #define NAN __builtin_nan("")
22 
25 #define INFINITY __builtin_inf()
26 
31 #define isnan(x) _isnan(x)
32 
37 #define isfinite(x) _isfinite(x)
38 
41 #define M_E 2.7182818284590452354
42 
45 #define M_PI 3.14159265358979323846
46 
49 #define M_PI_2 1.57079632679489661923
50 
53 #define M_PI_4 0.78539816339744830962
54 
57 #define FP_ILOGBNAN (-1-(int)(((unsigned)-1)>>1))
58 
61 #define FP_ILOGB0 FP_ILOGBNAN
62 
68 DSO_EXPORT _const_ double atan(double x);
69 
75 DSO_EXPORT _const_ float atanf(float x);
76 
83 DSO_EXPORT _const_ double atan2(double y, double x);
84 
91 DSO_EXPORT _const_ float atan2f(float y, float x);
92 
98 DSO_EXPORT _const_ double ceil(double x);
99 
105 DSO_EXPORT _const_ float ceilf(float x);
106 
113 DSO_EXPORT _const_ double pow(double base, double exp);
114 
121 DSO_EXPORT _const_ float powf(float base, float exp);
122 
128 DSO_EXPORT _const_ double sqrt(double x);
129 
135 DSO_EXPORT _const_ float sqrtf(float x);
136 
142 DSO_EXPORT _const_ float sqrtf(float x);
143 
149 DSO_EXPORT _const_ double fabs(double x);
150 
156 DSO_EXPORT _const_ float fabsf(float x);
157 
163 DSO_EXPORT _const_ double round(double x);
164 
170 DSO_EXPORT _const_ float roundf(float x);
171 
177 DSO_EXPORT _const_ double sin(double x);
178 
184 DSO_EXPORT _const_ float sinf(float x);
185 
191 DSO_EXPORT _const_ double cos(double x);
192 
198 DSO_EXPORT _const_ float cosf(float x);
199 
205 DSO_EXPORT _const_ double exp(double x);
206 
212 DSO_EXPORT _const_ float expf(float x);
213 
219 DSO_EXPORT _const_ int ilogb(double x);
220 
226 DSO_EXPORT _const_ int ilogbf(float x);
227 
233 DSO_EXPORT _const_ int ilogbl(long double x);
234 
240 DSO_EXPORT _const_ double log(double x);
241 
247 DSO_EXPORT _const_ float logf(float x);
248 
254 DSO_EXPORT _const_ double logb(double x);
255 
261 DSO_EXPORT _const_ float logbf(float x);
262 
268 DSO_EXPORT _const_ long double logbl(long double x);
269 
276 DSO_EXPORT _const_ double fmax(double x, double y);
277 
284 DSO_EXPORT _const_ float fmaxf(float x, float y);
285 
292 DSO_EXPORT _const_ long double fmaxl(long double x, long double y);
293 
300 DSO_EXPORT _const_ double fmin(double x, double y);
301 
308 DSO_EXPORT _const_ float fminf(float x, float y);
309 
316 DSO_EXPORT _const_ double scalbn(double x, int exp);
317 
324 DSO_EXPORT _const_ double scalbnl(long double x, int exp);
325 
332 DSO_EXPORT _const_ float scalbnf(float x, int exp);
333 
341 DSO_EXPORT _const_ double copysign(double x, double y);
342 
350 DSO_EXPORT _const_ float copysignf(float x, float y);
351 
357 DSO_EXPORT _const_ double floor(double x);
358 
364 DSO_EXPORT _const_ float floorf(float x);
365 
372 DSO_EXPORT _const_ double hypot(double x, double y);
373 
380 DSO_EXPORT _const_ float hypotf(float x, float y);
381 
388 DSO_EXPORT double modf(double x, double *iptr);
389 
396 DSO_EXPORT float modff(float x, float *iptr);
397 
398 #ifdef __cplusplus
399 }
400 #endif
401 
402 #endif /* _H_MATH_*/
403 
_const_ double atan2(double y, double x)
Arc tangent function of two variables.
_const_ float expf(float x)
base-e exponential function
_const_ float logbf(float x)
Calculate exponent of a floating-point value.
_const_ double fabs(double x)
Calculate the absolute value of x.
_const_ double scalbnl(long double x, int exp)
Multiply floating-point number by integral power of radix.
_const_ double round(double x)
Calculate the integral value that is the nearest to x.
_const_ double sin(double x)
Calculate the sine of an angle of x radians.
float modff(float x, float *iptr)
extract signed integral and fractional values from floating-point number
_const_ double atan(double x)
Arc tangent function.
_const_ double copysign(double x, double y)
Copy sign of a number.
_const_ int ilogbf(float x)
Calculate integer exponent of a floating-point value.
_const_ int ilogb(double x)
Calculate integer exponent of a floating-point value.
_const_ double log(double x)
Calculate the natural logarithm.
_const_ double sqrt(double x)
Calculate the square root of x.
_const_ float fabsf(float x)
Calculate the absolute value of x.
_const_ double pow(double base, double exp)
Calculate the exponentiation.
_const_ double logb(double x)
Calculate exponent of a floating-point value.
_const_ float copysignf(float x, float y)
Copy sign of a number.
_const_ float fmaxf(float x, float y)
Determine maximum of two floating-point numbers.
_const_ double floor(double x)
Get largest integral value not greater than argument.
_const_ float fminf(float x, float y)
Determine minimum of two floating-point numbers.
_const_ double cos(double x)
Calculate the cosine of an angle of x radians.
_const_ float atanf(float x)
Arc tangent function.
double modf(double x, double *iptr)
extract signed integral and fractional values from floating-point number
_const_ long double logbl(long double x)
Calculate exponent of a floating-point value.
_const_ double ceil(double x)
ceiling function: smallest integral value not less than argument
_const_ double fmax(double x, double y)
Determine maximum of two floating-point numbers.
_const_ float roundf(float x)
Calculate the integral value that is the nearest to x.
_const_ float powf(float base, float exp)
Calculate the exponentiation.
_const_ double scalbn(double x, int exp)
Multiply floating-point number by integral power of radix.
_const_ float cosf(float x)
Calculate the cosine of an angle of x radians.
_const_ int ilogbl(long double x)
Calculate integer exponent of a floating-point value.
_const_ float sqrtf(float x)
Calculate the square root of x.
_const_ double fmin(double x, double y)
Determine minimum of two floating-point numbers.
_const_ float ceilf(float x)
ceiling function: smallest integral value not less than argument
_const_ float hypotf(float x, float y)
Euclidean distance function.
_const_ float sinf(float x)
Calculate the sine of an angle of x radians.
_const_ float floorf(float x)
Get largest integral value not greater than argument.
_const_ float scalbnf(float x, int exp)
Multiply floating-point number by integral power of radix.
_const_ float atan2f(float y, float x)
Arc tangent function of two variables.
_const_ double exp(double x)
base-e exponential function
_const_ double hypot(double x, double y)
Euclidean distance function.
_const_ float logf(float x)
Calculate the natural logarithm.
_const_ long double fmaxl(long double x, long double y)
Determine maximum of two floating-point numbers.