Changeset 184ff675 in mainline for uspace/lib/math/include/math.h
- Timestamp:
- 2018-08-29T20:05:59Z (6 years ago)
- Children:
- 84929b0
- Parents:
- b2acdf32
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-29 16:15:41)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-29 20:05:59)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/math/include/math.h
rb2acdf32 r184ff675 37 37 #define LIBMATH_MATH_H_ 38 38 39 #include <ceil.h>40 #include <cosh.h>41 #include <exp.h>42 #include <fabs.h>43 #include <floor.h>44 39 #include <fmod.h> 45 #include <frexp.h>46 #include <ldexp.h>47 #include <log.h>48 #include <log10.h>49 #include <log2.h>50 #include <mathtypes.h>51 #include <modf.h>52 #include <pow.h>53 #include <sinh.h>54 #include <sqrt.h>55 #include <tan.h>56 #include <tanh.h>57 40 #include <trig.h> 58 41 #include <trunc.h> 59 42 60 43 #define HUGE_VAL FLOAT64_INF 61 62 static inline float64_t ceil_f64(float64_t val)63 {64 return float64_ceil(val);65 }66 67 static inline float32_t ceil_f32(float32_t val)68 {69 return float32_ceil(val);70 }71 44 72 45 static inline float64_t cos_f64(float64_t val) … … 80 53 } 81 54 82 static inline float64_t cosh_f64(float64_t val)83 {84 return float64_cosh(val);85 }86 87 static inline float32_t cosh_f32(float32_t val)88 {89 return float32_cosh(val);90 }91 92 static inline float64_t exp_f64(float64_t val)93 {94 return float64_exp(val);95 }96 97 static inline float32_t exp_f32(float32_t val)98 {99 return float32_exp(val);100 }101 102 static inline float64_t fabs_f64(float64_t val)103 {104 return float64_fabs(val);105 }106 107 static inline float32_t fabs_f32(float32_t val)108 {109 return float32_fabs(val);110 }111 112 static inline float64_t floor_f64(float64_t val)113 {114 return float64_floor(val);115 }116 117 static inline float32_t floor_f32(float32_t val)118 {119 return float32_floor(val);120 }121 55 static inline float64_t fmod_f64(float64_t dividend, float64_t divisor) 122 56 { … … 127 61 { 128 62 return float32_fmod(dividend, divisor); 129 }130 131 static inline float64_t frexp_f64(float64_t x, int *exp)132 {133 return float64_frexp(x, exp);134 }135 136 static inline float64_t frexp_f32(float32_t x, int *exp)137 {138 return float32_frexp(x, exp);139 }140 141 static inline float64_t ldexp_f64(float64_t x, int exp)142 {143 return float64_ldexp(x, exp);144 }145 146 static inline float64_t ldexp_f32(float32_t x, int exp)147 {148 return float32_ldexp(x, exp);149 }150 151 static inline float64_t log_f64(float64_t val)152 {153 return float64_log(val);154 }155 156 static inline float32_t log_f32(float32_t val)157 {158 return float32_log(val);159 }160 161 static inline float64_t log10_f64(float64_t val)162 {163 return float64_log10(val);164 }165 166 static inline float32_t log10_f32(float32_t val)167 {168 return float32_log10(val);169 }170 171 static inline float32_t log2_f32(float32_t val)172 {173 return float32_log2(val);174 }175 176 static inline float64_t log2_f64(float64_t val)177 {178 return float64_log2(val);179 }180 181 static inline float64_t modf_f64(float64_t value, float64_t *iptr)182 {183 return float64_modf(value, iptr);184 }185 186 static inline float64_t modf_f32(float32_t value, float32_t *iptr)187 {188 return float32_modf(value, iptr);189 }190 191 static inline float64_t pow_f64(float64_t x, float64_t y)192 {193 return float64_pow(x, y);194 }195 196 static inline float32_t pow_f32(float32_t x, float32_t y)197 {198 return float32_pow(x, y);199 63 } 200 64 … … 209 73 } 210 74 211 static inline float64_t sinh_f64(float64_t val)212 {213 return float64_sinh(val);214 }215 216 static inline float32_t sinh_f32(float32_t val)217 {218 return float32_sinh(val);219 }220 221 static inline float64_t sqrt_f64(float64_t val)222 {223 return float64_sqrt(val);224 }225 226 static inline float32_t sqrt_f32(float32_t val)227 {228 return float32_sqrt(val);229 }230 231 static inline float64_t tan_f64(float64_t val)232 {233 return float64_tan(val);234 }235 236 static inline float32_t tan_f32(float32_t val)237 {238 return float32_tan(val);239 }240 241 static inline float64_t tanh_f64(float64_t val)242 {243 return float64_tanh(val);244 }245 246 static inline float32_t tanh_f32(float32_t val)247 {248 return float32_tanh(val);249 }250 251 75 static inline float64_t trunc_f64(float64_t val) 252 76 { … … 257 81 { 258 82 return float32_trunc(val); 259 }260 261 static inline float64_t ceil(float64_t val)262 {263 return ceil_f64(val);264 }265 266 static inline float32_t ceilf(float32_t val)267 {268 return ceil_f32(val);269 83 } 270 84 … … 279 93 } 280 94 281 static inline float64_t cosh(float64_t val)282 {283 return cosh_f64(val);284 }285 286 static inline float32_t coshf(float32_t val)287 {288 return cosh_f32(val);289 }290 291 static inline float64_t exp(float64_t val)292 {293 return exp_f64(val);294 }295 296 static inline float32_t expf(float32_t val)297 {298 return exp_f32(val);299 }300 301 static inline float64_t fabs(float64_t val)302 {303 return fabs_f64(val);304 }305 306 static inline float32_t fabsf(float32_t val)307 {308 return fabs_f32(val);309 }310 311 static inline float64_t floor(float64_t val)312 {313 return floor_f64(val);314 }315 316 static inline float32_t floorf(float32_t val)317 {318 return floor_f32(val);319 }320 321 95 static inline float64_t fmod(float64_t dividend, float64_t divisor) 322 96 { … … 329 103 } 330 104 331 static inline float64_t frexp(float64_t x, int *exp)332 {333 return frexp_f64(x, exp);334 }335 336 static inline float32_t frexpf(float32_t x, int *exp)337 {338 return frexp_f32(x, exp);339 }340 341 static inline float64_t ldexp(float64_t x, int exp)342 {343 return ldexp_f64(x, exp);344 }345 346 static inline float32_t ldexpf(float32_t x, int exp)347 {348 return ldexp_f32(x, exp);349 }350 351 static inline float64_t log(float64_t val)352 {353 return log_f64(val);354 }355 356 static inline float32_t logf(float32_t val)357 {358 return log_f32(val);359 }360 361 static inline float64_t log10(float64_t val)362 {363 return log10_f64(val);364 }365 366 static inline float32_t log10f(float32_t val)367 {368 return log10_f32(val);369 }370 371 static inline float64_t log2(float64_t val)372 {373 return log2_f64(val);374 }375 376 static inline float32_t log2f(float32_t val)377 {378 return log2_f32(val);379 }380 381 static inline float64_t modf(float64_t value, float64_t *iptr)382 {383 return modf_f64(value, iptr);384 }385 386 static inline float32_t modff(float32_t value, float32_t *iptr)387 {388 return modf_f32(value, iptr);389 }390 391 static inline float64_t pow(float64_t x, float64_t y)392 {393 return pow_f64(x, y);394 }395 396 static inline float32_t powf(float32_t x, float32_t y)397 {398 return pow_f32(x, y);399 }400 401 105 static inline float64_t sin(float64_t val) 402 106 { … … 407 111 { 408 112 return sin_f32(val); 409 }410 411 static inline float64_t sinh(float64_t val)412 {413 return sinh_f64(val);414 }415 416 static inline float32_t sinhf(float32_t val)417 {418 return sinh_f32(val);419 }420 421 static inline float64_t sqrt(float64_t val)422 {423 return sqrt_f64(val);424 }425 426 static inline float32_t sqrtf(float32_t val)427 {428 return sqrt_f32(val);429 }430 431 static inline float64_t tan(float64_t val)432 {433 return tan_f64(val);434 }435 436 static inline float32_t tanf(float32_t val)437 {438 return tan_f32(val);439 }440 441 static inline float64_t tanh(float64_t val)442 {443 return tanh_f64(val);444 }445 446 static inline float32_t tanhf(float32_t val)447 {448 return tanh_f32(val);449 113 } 450 114
Note:
See TracChangeset
for help on using the changeset viewer.