Changeset b69786e in mainline
- Timestamp:
- 2015-09-17T16:16:25Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3b23d05
- Parents:
- ba8eecf
- Location:
- uspace
- Files:
-
- 28 added
- 17 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/float/float2.c
rba8eecf rb69786e 42 42 }; 43 43 44 static double arguments_acos[OPERANDS] = { 45 -0.936456687291, -0.504846104600, 0.862318872288, 0.964966028492, 46 0.987353618220, 1.0, -0.194939922623, 0.978471923925, -0.999023478833, 47 0.540302305868 48 }; 49 50 static double arguments_asin[OPERANDS] = { 51 -0.350783227690, -0.863209366649, -0.506365641110, -0.262374853704, 52 0.158533380044, 0.0, 0.980815184715, -0.206379975025, -0.044182448332, 53 0.841470984808 54 }; 55 56 static double arguments_atan[OPERANDS] = { 57 3.5, 100.0, 50.0, 768.3156, 1080.499999, 1.0, 66.0, 58 2.718281828459045, 9.9, 0.001 59 }; 60 44 61 static double arguments_exp[OPERANDS] = { 45 62 3.5, -2.1, 50.0, 0.0, 1.0, 13.2, -1.1, -5.5, 0.1, -66.0 … … 51 68 }; 52 69 70 static double arguments_sqrt[OPERANDS] = { 71 3.5, 100.0, 50.0, 768.3156, 1080.499999, 1.0, 66.0, 72 2.718281828459045, 9.9, 0.001 73 }; 74 75 static double arguments_tanh[OPERANDS] = { 76 3.5, -2.1, 50.0, 0.0, 1.0, 13.2, -1.1, -5.5, 0.000001, -66000000.0 77 }; 78 79 static double results_acos[OPERANDS] = { 80 2.783185307180, 2.100000000000, 0.530964914873, 0.265482457437, 81 0.159205070272, 0.000000000000, 1.766992524091, 0.207873834887, 82 3.097395817941, 1.000000000000 83 }; 84 85 static double results_asin[OPERANDS] = { 86 -0.358407346411, -1.041592653590, -0.530964914874, -0.265482457437, 87 0.159205070273, 0.000000000000, 1.374600129498, -0.207873834889, 88 -0.044196835651, 1.000000000000 89 }; 90 91 static double results_atan[OPERANDS] = { 92 1.292496667790, 1.560796660108, 1.550798992822, 1.569494779052, 93 1.569870829603, 0.785398163397, 1.555645970920, 1.218282905017, 94 1.470127674637, 0.000999999667 95 }; 53 96 54 97 static double results_ceil[OPERANDS] = { … … 56 99 }; 57 100 101 static double results_cos[OPERANDS] = { 102 -0.936456687291, -0.504846104600, 0.862318872288, 0.964966028492, 103 0.987353618220, 1.0, -0.194939922623, 0.978471923925, -0.999023478833, 104 0.540302305868 105 }; 106 107 static double results_cosh[OPERANDS] = { 108 16.572824671057, 4.144313170410, 2592352764293536022528.000000000000, 109 1.000000000000, 1.543080634815, 270182.468624271103, 1.668518553822, 110 122.348009517829, 1.005004168056, 23035933171656458903220125696.0 111 }; 112 113 static double results_fabs[OPERANDS] = { 114 3.5, 2.1, 100.0, 50.0, 1024.0, 0.0, 768.3156, 1080.499999, 600.0, 1.0 115 }; 116 58 117 static double results_floor[OPERANDS] = { 59 118 3.0, -3.0, 100.0, 50.0, -1024.0, 0.0, 768.0, 1080.0, -600.0, 1.0 60 119 }; 61 120 62 static double results_trunc[OPERANDS] = { 63 3.0, -2.0, 100.0, 50.0, -1024.0, 0.0, 768.0, 1080.0, -600.0, 1.0 121 static double results_exp[OPERANDS] = { 122 33.115451958692, 0.122456428253, 5184705528587072045056.0, 123 1.000000000000, 2.718281828459, 540364.937246691552, 0.332871083698, 124 0.004086771438, 1.105170918076, 0.000000000000 125 }; 126 127 static double results_log[OPERANDS] = { 128 1.252762968495, 4.605170185988, 3.912023005428, 6.644200586236, 129 6.985179175021, 0.000000000000, 4.189654742026, 1.000000000000, 130 2.292534757141, -6.907755278982 131 }; 132 133 static double results_log10[OPERANDS] = { 134 0.544068044350, 2.000000000000, 1.698970004336, 2.885539651261, 135 3.033624770817, 0.000000000000, 1.819543935542, 0.434294481903, 136 0.995635194598, -3.000000000000 64 137 }; 65 138 … … 70 143 }; 71 144 72 static double results_cos[OPERANDS] = { 73 -0.936456687291, -0.504846104600, 0.862318872288, 0.964966028492, 74 0.987353618220, 1.0, -0.194939922623, 0.978471923925, -0.999023478833, 75 0.540302305868 76 }; 77 78 static double results_log[OPERANDS] = { 79 1.252762968495, 4.605170185988, 3.912023005428, 6.644200586236, 80 6.985179175021, 0.000000000000, 4.189654742026, 1.000000000000, 81 2.292534757141, -6.907755278982 82 }; 83 84 static double results_exp[OPERANDS] = { 85 33.115451958692, 0.122456428253, 5184705528587072045056.0, 86 1.000000000000, 2.718281828459, 540364.937246691552, 0.332871083698, 87 0.004086771438, 1.105170918076, 0.000000000000 145 static double results_sinh[OPERANDS] = { 146 16.542627287635, -4.021856742157, 2592352764293536022528.000000000000, 147 0.000000000000, 1.175201193644, 270182.468622420449, -1.335647470124, 148 -122.343922746391, 0.100166750020, -23035933171656458903220125696.0 149 }; 150 151 static double results_sqrt[OPERANDS] = { 152 1.870828693387, 10.000000000000, 7.071067811865, 27.718506453271, 153 32.870959812576, 1.000000000000, 8.124038404636, 1.648721270700, 154 3.146426544510, 0.031622776602 155 }; 156 157 static double results_tan[OPERANDS] = { 158 0.374585640159, 1.709846542905, -0.587213915157, -0.271900611998, 159 0.160563932839, 0.000000000000, -5.031371570891, -0.210920691722, 160 0.044225635601, 1.557407724655 161 }; 162 163 static double results_tanh[OPERANDS] = { 164 0.998177897611, -0.970451936613, 1.000000000000, 0.000000000000, 165 0.761594155956, 0.999999999993, -0.800499021761, -0.999966597156, 166 0.000001000000, -1.000000000000 167 }; 168 169 static double results_trunc[OPERANDS] = { 170 3.0, -2.0, 100.0, 50.0, -1024.0, 0.0, 768.0, 1080.0, -600.0, 1.0 88 171 }; 89 172 … … 125 208 { 126 209 bool fail = false; 210 if (0) { 211 for (unsigned int i = 0; i < OPERANDS; i++) { 212 double res = acos(arguments_acos[i]); 213 214 if (!cmp_double(res, results_acos[i])) { 215 TPRINTF("Double precision acos failed " 216 "(%lf != %lf, arg %u)\n", res, results_acos[i], i); 217 fail = true; 218 } 219 } 220 221 for (unsigned int i = 0; i < OPERANDS; i++) { 222 float res = acosf(arguments_acos[i]); 223 224 if (!cmp_float(res, results_acos[i])) { 225 TPRINTF("Single precision acos failed " 226 "(%f != %lf, arg %u)\n", res, results_acos[i], i); 227 fail = true; 228 } 229 } 230 231 for (unsigned int i = 0; i < OPERANDS; i++) { 232 double res = asin(arguments_asin[i]); 233 234 if (!cmp_double(res, results_asin[i])) { 235 TPRINTF("Double precision asin failed " 236 "(%lf != %lf, arg %u)\n", res, results_asin[i], i); 237 fail = true; 238 } 239 } 240 241 for (unsigned int i = 0; i < OPERANDS; i++) { 242 float res = asinf(arguments_asin[i]); 243 244 if (!cmp_float(res, results_asin[i])) { 245 TPRINTF("Single precision asin failed " 246 "(%f != %lf, arg %u)\n", res, results_asin[i], i); 247 fail = true; 248 } 249 } 250 } 251 for (unsigned int i = 0; i < OPERANDS; i++) { 252 double res = atan(arguments_atan[i]); 253 254 if (!cmp_double(res, results_atan[i])) { 255 TPRINTF("Double precision atan failed " 256 "(%.12lf != %.12lf, arg %u)\n", res, results_atan[i], i); 257 fail = true; 258 } 259 } 260 261 for (unsigned int i = 0; i < OPERANDS; i++) { 262 float res = atanf(arguments_atan[i]); 263 264 if (!cmp_float(res, results_atan[i])) { 265 TPRINTF("Single precision atan failed " 266 "(%f != %lf, arg %u)\n", res, results_atan[i], i); 267 fail = true; 268 } 269 } 127 270 128 271 for (unsigned int i = 0; i < OPERANDS; i++) { … … 167 310 168 311 for (unsigned int i = 0; i < OPERANDS; i++) { 312 double res = cosh(arguments_exp[i]); 313 314 if (!cmp_double(res, results_cosh[i])) { 315 TPRINTF("Double precision cosh failed " 316 "(%lf != %lf, arg %u)\n", res, results_cosh[i], i); 317 fail = true; 318 } 319 } 320 321 for (unsigned int i = 0; i < OPERANDS; i++) { 322 float res = coshf(arguments_exp[i]); 323 324 if (!cmp_float(res, results_cosh[i])) { 325 TPRINTF("Single precision cosh failed " 326 "(%f != %lf, arg %u)\n", res, results_cosh[i], i); 327 fail = true; 328 } 329 } 330 331 for (unsigned int i = 0; i < OPERANDS; i++) { 169 332 double res = exp(arguments_exp[i]); 170 333 … … 187 350 188 351 for (unsigned int i = 0; i < OPERANDS; i++) { 352 double res = fabs(arguments[i]); 353 354 if (!cmp_double(res, results_fabs[i])) { 355 TPRINTF("Double precision fabs failed " 356 "(%lf != %lf, arg %u)\n", res, results_fabs[i], i); 357 fail = true; 358 } 359 } 360 361 for (unsigned int i = 0; i < OPERANDS; i++) { 362 float res = fabsf(arguments[i]); 363 364 if (!cmp_float(res, results_fabs[i])) { 365 TPRINTF("Single precision fabs failed " 366 "(%f != %lf, arg %u)\n", res, results_fabs[i], i); 367 fail = true; 368 } 369 } 370 371 for (unsigned int i = 0; i < OPERANDS; i++) { 189 372 double res = floor(arguments[i]); 190 373 … … 227 410 228 411 for (unsigned int i = 0; i < OPERANDS; i++) { 412 double res = log10(arguments_log[i]); 413 414 if (!cmp_double(res, results_log10[i])) { 415 TPRINTF("Double precision log10 failed " 416 "(%lf != %lf, arg %u)\n", res, results_log10[i], i); 417 fail = true; 418 } 419 } 420 421 for (unsigned int i = 0; i < OPERANDS; i++) { 422 float res = log10f(arguments_log[i]); 423 424 if (!cmp_float(res, results_log10[i])) { 425 TPRINTF("Single precision log10 failed " 426 "(%f != %lf, arg %u)\n", res, results_log10[i], i); 427 fail = true; 428 } 429 } 430 431 for (unsigned int i = 0; i < OPERANDS; i++) { 229 432 double res = sin(arguments[i]); 230 433 … … 245 448 } 246 449 } 450 ; 451 for (unsigned int i = 0; i < OPERANDS; i++) { 452 double res = sinh(arguments_exp[i]); 453 454 if (!cmp_double(res, results_sinh[i])) { 455 TPRINTF("Double precision sinh failed " 456 "(%lf != %lf, arg %u)\n", res, results_sinh[i], i); 457 fail = true; 458 } 459 } 460 461 for (unsigned int i = 0; i < OPERANDS; i++) { 462 float res = sinhf(arguments_exp[i]); 463 464 if (!cmp_float(res, results_sinh[i])) { 465 TPRINTF("Single precision sinh failed " 466 "(%f != %lf, arg %u)\n", res, results_sinh[i], i); 467 fail = true; 468 } 469 } 470 471 for (unsigned int i = 0; i < OPERANDS; i++) { 472 double res = sqrt(arguments_sqrt[i]); 473 474 if (!cmp_double(res, results_sqrt[i])) { 475 TPRINTF("Double precision sqrt failed " 476 "(%lf != %lf, arg %u)\n", res, results_sqrt[i], i); 477 fail = true; 478 } 479 } 480 481 for (unsigned int i = 0; i < OPERANDS; i++) { 482 float res = sqrtf(arguments_sqrt[i]); 483 484 if (!cmp_float(res, results_sqrt[i])) { 485 TPRINTF("Single precision sqrt failed " 486 "(%f != %lf, arg %u)\n", res, results_sqrt[i], i); 487 fail = true; 488 } 489 } 490 491 for (unsigned int i = 0; i < OPERANDS; i++) { 492 double res = tan(arguments[i]); 493 494 if (!cmp_double(res, results_tan[i])) { 495 TPRINTF("Double precision tan failed " 496 "(%lf != %lf, arg %u)\n", res, results_tan[i], i); 497 fail = true; 498 } 499 } 500 501 for (unsigned int i = 0; i < OPERANDS; i++) { 502 float res = tanf(arguments[i]); 503 504 if (!cmp_float(res, results_tan[i])) { 505 TPRINTF("Single precision tan failed " 506 "(%f != %lf, arg %u)\n", res, results_tan[i], i); 507 fail = true; 508 } 509 } 510 511 for (unsigned int i = 0; i < OPERANDS; i++) { 512 double res = tanh(arguments_tanh[i]); 513 514 if (!cmp_double(res, results_tanh[i])) { 515 TPRINTF("Double precision tanh failed " 516 "(%lf != %lf, arg %u)\n", res, results_tanh[i], i); 517 fail = true; 518 } 519 } 520 521 for (unsigned int i = 0; i < OPERANDS; i++) { 522 float res = tanhf(arguments_tanh[i]); 523 524 if (!cmp_float(res, results_tanh[i])) { 525 TPRINTF("Single precision tanh failed " 526 "(%f != %lf, arg %u)\n", res, results_tanh[i], i); 527 fail = true; 528 } 529 } 247 530 248 531 for (unsigned int i = 0; i < OPERANDS; i++) { … … 260 543 261 544 if (!cmp_float(res, results_trunc[i])) { 262 TPRINTF(" truncgle precision trunc failed "545 TPRINTF("Single precision trunc failed " 263 546 "(%f != %lf, arg %u)\n", res, results_trunc[i], i); 264 547 fail = true; -
uspace/app/tester/tester.h
rba8eecf rb69786e 60 60 do { \ 61 61 if (!test_quiet) { \ 62 fprintf(std err, (format), ##__VA_ARGS__); \62 fprintf(stdout, (format), ##__VA_ARGS__); \ 63 63 } \ 64 64 } while (0) -
uspace/lib/c/include/errno.h
rba8eecf rb69786e 50 50 #define ENOTEMPTY (-261) 51 51 #define EBADF (-262) 52 #define ERANGE (-263) 53 #define EXDEV (-264) 54 #define EIO (-265) 55 #define EMLINK (-266) 56 #define ENXIO (-267) 52 #define EDOM (-263) 53 #define ERANGE (-264) 54 #define EXDEV (-265) 55 #define EIO (-266) 56 #define EMLINK (-267) 57 #define ENXIO (-268) 57 58 58 59 /** Bad checksum. */ -
uspace/lib/math/Makefile
rba8eecf rb69786e 41 41 42 42 GENERIC_SOURCES = \ 43 generic/acos.c \ 44 generic/asin.c \ 45 generic/atan.c \ 46 generic/atan2.c \ 43 47 generic/ceil.c \ 48 generic/cosh.c \ 44 49 generic/exp.c \ 50 generic/fabs.c \ 45 51 generic/floor.c \ 52 generic/fmod.c \ 53 generic/frexp.c \ 54 generic/ldexp.c \ 46 55 generic/log.c \ 56 generic/log10.c \ 57 generic/modf.c \ 58 generic/pow.c \ 59 generic/sinh.c \ 60 generic/sqrt.c \ 61 generic/tan.c \ 62 generic/tanh.c \ 47 63 generic/trig.c \ 48 generic/pow.c \49 generic/mod.c \50 64 generic/trunc.c 51 65 -
uspace/lib/math/arch/abs32le/include/libarch/math.h
rba8eecf rb69786e 37 37 #define LIBMATH_abs32le_MATH_H_ 38 38 39 #include <acos.h> 40 #include <asin.h> 41 #include <atan.h> 42 #include <atan2.h> 39 43 #include <ceil.h> 44 #include <cosh.h> 40 45 #include <exp.h> 46 #include <fabs.h> 41 47 #include <floor.h> 48 #include <fmod.h> 49 #include <frexp.h> 50 #include <ldexp.h> 42 51 #include <log.h> 52 #include <log10.h> 43 53 #include <mathtypes.h> 44 #include <mod .h>54 #include <modf.h> 45 55 #include <pow.h> 56 #include <sinh.h> 57 #include <sqrt.h> 58 #include <tan.h> 59 #include <tanh.h> 60 #include <trig.h> 46 61 #include <trunc.h> 47 #include <trig.h> 62 63 #define HUGE_VAL FLOAT64_INF 64 65 static inline float64_t acos_f64(float64_t val) 66 { 67 return float64_acos(val); 68 } 69 70 static inline float32_t acos_f32(float32_t val) 71 { 72 return float32_acos(val); 73 } 74 75 static inline float64_t asin_f64(float64_t val) 76 { 77 return float64_asin(val); 78 } 79 80 static inline float32_t asin_f32(float32_t val) 81 { 82 return float32_asin(val); 83 } 84 85 static inline float64_t atan_f64(float64_t val) 86 { 87 return float64_atan(val); 88 } 89 90 static inline float32_t atan_f32(float32_t val) 91 { 92 return float32_atan(val); 93 } 94 95 static inline float64_t atan2_f64(float64_t y, float64_t x) 96 { 97 return float64_atan2(y, x); 98 } 99 100 static inline float32_t atan2_f32(float32_t y, float32_t x) 101 { 102 return float32_atan2(y, x); 103 } 48 104 49 105 static inline float64_t ceil_f64(float64_t val) … … 67 123 } 68 124 125 static inline float64_t cosh_f64(float64_t val) 126 { 127 return float64_cosh(val); 128 } 129 130 static inline float32_t cosh_f32(float32_t val) 131 { 132 return float32_cosh(val); 133 } 134 69 135 static inline float64_t exp_f64(float64_t val) 70 136 { … … 77 143 } 78 144 145 static inline float64_t fabs_f64(float64_t val) 146 { 147 return float64_fabs(val); 148 } 149 150 static inline float32_t fabs_f32(float32_t val) 151 { 152 return float32_fabs(val); 153 } 154 79 155 static inline float64_t floor_f64(float64_t val) 80 156 { … … 86 162 return float32_floor(val); 87 163 } 88 89 164 static inline float64_t fmod_f64(float64_t dividend, float64_t divisor) 90 165 { 91 return float64_ mod(dividend, divisor);166 return float64_fmod(dividend, divisor); 92 167 } 93 168 94 169 static inline float64_t fmod_f32(float32_t dividend, float32_t divisor) 95 170 { 96 return float32_mod(dividend, divisor); 171 return float32_fmod(dividend, divisor); 172 } 173 174 static inline float64_t frexp_f64(float64_t x, int *exp) 175 { 176 return float64_frexp(x, exp); 177 } 178 179 static inline float64_t frexp_f32(float32_t x, int *exp) 180 { 181 return float32_frexp(x, exp); 182 } 183 184 static inline float64_t ldexp_f64(float64_t x, int exp) 185 { 186 return float64_ldexp(x, exp); 187 } 188 189 static inline float64_t ldexp_f32(float32_t x, int exp) 190 { 191 return float32_ldexp(x, exp); 97 192 } 98 193 … … 107 202 } 108 203 204 static inline float64_t log10_f64(float64_t val) 205 { 206 return float64_log10(val); 207 } 208 209 static inline float32_t log10_f32(float32_t val) 210 { 211 return float32_log10(val); 212 } 213 214 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 215 { 216 return float64_modf(value, iptr); 217 } 218 219 static inline float64_t modf_f32(float32_t value, float32_t *iptr) 220 { 221 return float32_modf(value, iptr); 222 } 223 109 224 static inline float64_t pow_f64(float64_t x, float64_t y) 110 225 { … … 127 242 } 128 243 244 static inline float64_t sinh_f64(float64_t val) 245 { 246 return float64_sinh(val); 247 } 248 249 static inline float32_t sinh_f32(float32_t val) 250 { 251 return float32_sinh(val); 252 } 253 254 static inline float64_t sqrt_f64(float64_t val) 255 { 256 return float64_sqrt(val); 257 } 258 259 static inline float32_t sqrt_f32(float32_t val) 260 { 261 return float32_sqrt(val); 262 } 263 264 static inline float64_t tan_f64(float64_t val) 265 { 266 return float64_tan(val); 267 } 268 269 static inline float32_t tan_f32(float32_t val) 270 { 271 return float32_tan(val); 272 } 273 274 static inline float64_t tanh_f64(float64_t val) 275 { 276 return float64_tanh(val); 277 } 278 279 static inline float32_t tanh_f32(float32_t val) 280 { 281 return float32_tanh(val); 282 } 283 129 284 static inline float64_t trunc_f64(float64_t val) 130 285 { … … 137 292 } 138 293 294 static inline float64_t acos(float64_t val) 295 { 296 return acos_f64(val); 297 } 298 299 static inline float32_t acosf(float32_t val) 300 { 301 return acos_f32(val); 302 } 303 304 static inline float64_t asin(float64_t val) 305 { 306 return asin_f64(val); 307 } 308 309 static inline float32_t asinf(float32_t val) 310 { 311 return asin_f32(val); 312 } 313 314 static inline float64_t atan(float64_t val) 315 { 316 return atan_f64(val); 317 } 318 319 static inline float32_t atanf(float32_t val) 320 { 321 return atan_f32(val); 322 } 323 324 static inline float64_t atan2(float64_t y, float64_t x) 325 { 326 return atan2_f64(y, x); 327 } 328 329 static inline float32_t atan2f(float32_t y, float32_t x) 330 { 331 return atan2_f32(y, x); 332 } 333 139 334 static inline float64_t ceil(float64_t val) 140 335 { … … 157 352 } 158 353 354 static inline float64_t cosh(float64_t val) 355 { 356 return cosh_f64(val); 357 } 358 359 static inline float32_t coshf(float32_t val) 360 { 361 return cosh_f32(val); 362 } 363 159 364 static inline float64_t exp(float64_t val) 160 365 { … … 167 372 } 168 373 374 static inline float64_t fabs(float64_t val) 375 { 376 return fabs_f64(val); 377 } 378 379 static inline float32_t fabsf(float32_t val) 380 { 381 return fabs_f32(val); 382 } 383 169 384 static inline float64_t floor(float64_t val) 170 385 { … … 187 402 } 188 403 404 static inline float64_t frexp(float64_t x, int *exp) 405 { 406 return frexp_f64(x, exp); 407 } 408 409 static inline float32_t frexpf(float32_t x, int *exp) 410 { 411 return frexp_f32(x, exp); 412 } 413 414 static inline float64_t ldexp(float64_t x, int exp) 415 { 416 return ldexp_f64(x, exp); 417 } 418 419 static inline float32_t ldexpf(float32_t x, int exp) 420 { 421 return ldexp_f32(x, exp); 422 } 423 189 424 static inline float64_t log(float64_t val) 190 425 { … … 197 432 } 198 433 434 static inline float64_t log10(float64_t val) 435 { 436 return log10_f64(val); 437 } 438 439 static inline float32_t log10f(float32_t val) 440 { 441 return log10_f32(val); 442 } 443 444 static inline float64_t modf(float64_t value, float64_t *iptr) 445 { 446 return modf_f64(value, iptr); 447 } 448 449 static inline float32_t modff(float32_t value, float32_t *iptr) 450 { 451 return modf_f32(value, iptr); 452 } 453 199 454 static inline float64_t pow(float64_t x, float64_t y) 200 455 { … … 215 470 { 216 471 return sin_f32(val); 472 } 473 474 static inline float64_t sinh(float64_t val) 475 { 476 return sinh_f64(val); 477 } 478 479 static inline float32_t sinhf(float32_t val) 480 { 481 return sinh_f32(val); 482 } 483 484 static inline float64_t sqrt(float64_t val) 485 { 486 return sqrt_f64(val); 487 } 488 489 static inline float32_t sqrtf(float32_t val) 490 { 491 return sqrt_f32(val); 492 } 493 494 static inline float64_t tan(float64_t val) 495 { 496 return tan_f64(val); 497 } 498 499 static inline float32_t tanf(float32_t val) 500 { 501 return tan_f32(val); 502 } 503 504 static inline float64_t tanh(float64_t val) 505 { 506 return tanh_f64(val); 507 } 508 509 static inline float32_t tanhf(float32_t val) 510 { 511 return tanh_f32(val); 217 512 } 218 513 -
uspace/lib/math/arch/amd64/include/libarch/math.h
rba8eecf rb69786e 37 37 #define LIBMATH_amd64_MATH_H_ 38 38 39 #include <acos.h> 40 #include <asin.h> 41 #include <atan.h> 42 #include <atan2.h> 39 43 #include <ceil.h> 44 #include <cosh.h> 40 45 #include <exp.h> 46 #include <fabs.h> 41 47 #include <floor.h> 48 #include <fmod.h> 49 #include <frexp.h> 50 #include <ldexp.h> 42 51 #include <log.h> 52 #include <log10.h> 43 53 #include <mathtypes.h> 44 #include <mod .h>54 #include <modf.h> 45 55 #include <pow.h> 56 #include <sinh.h> 57 #include <sqrt.h> 58 #include <tan.h> 59 #include <tanh.h> 60 #include <trig.h> 46 61 #include <trunc.h> 47 #include <trig.h> 62 63 #define HUGE_VAL FLOAT64_INF 64 65 static inline float64_t acos_f64(float64_t val) 66 { 67 return float64_acos(val); 68 } 69 70 static inline float32_t acos_f32(float32_t val) 71 { 72 return float32_acos(val); 73 } 74 75 static inline float64_t asin_f64(float64_t val) 76 { 77 return float64_asin(val); 78 } 79 80 static inline float32_t asin_f32(float32_t val) 81 { 82 return float32_asin(val); 83 } 84 85 static inline float64_t atan_f64(float64_t val) 86 { 87 return float64_atan(val); 88 } 89 90 static inline float32_t atan_f32(float32_t val) 91 { 92 return float32_atan(val); 93 } 94 95 static inline float64_t atan2_f64(float64_t y, float64_t x) 96 { 97 return float64_atan2(y, x); 98 } 99 100 static inline float32_t atan2_f32(float32_t y, float32_t x) 101 { 102 return float32_atan2(y, x); 103 } 48 104 49 105 static inline float64_t ceil_f64(float64_t val) … … 64 120 } 65 121 122 static inline float64_t cosh_f64(float64_t val) 123 { 124 return float64_cosh(val); 125 } 126 127 static inline float32_t cosh_f32(float32_t val) 128 { 129 return float32_cosh(val); 130 } 131 66 132 static inline float64_t exp_f64(float64_t val) 67 133 { … … 74 140 } 75 141 142 static inline float64_t fabs_f64(float64_t val) 143 { 144 return float64_fabs(val); 145 } 146 147 static inline float32_t fabs_f32(float32_t val) 148 { 149 return float32_fabs(val); 150 } 151 76 152 static inline float64_t floor_f64(float64_t val) 77 153 { … … 83 159 return float32_floor(val); 84 160 } 85 86 161 static inline float64_t fmod_f64(float64_t dividend, float64_t divisor) 87 162 { 88 return float64_ mod(dividend, divisor);163 return float64_fmod(dividend, divisor); 89 164 } 90 165 91 166 static inline float64_t fmod_f32(float32_t dividend, float32_t divisor) 92 167 { 93 return float32_mod(dividend, divisor); 168 return float32_fmod(dividend, divisor); 169 } 170 171 static inline float64_t frexp_f64(float64_t x, int *exp) 172 { 173 return float64_frexp(x, exp); 174 } 175 176 static inline float64_t frexp_f32(float32_t x, int *exp) 177 { 178 return float32_frexp(x, exp); 179 } 180 181 static inline float64_t ldexp_f64(float64_t x, int exp) 182 { 183 return float64_ldexp(x, exp); 184 } 185 186 static inline float64_t ldexp_f32(float32_t x, int exp) 187 { 188 return float32_ldexp(x, exp); 94 189 } 95 190 … … 104 199 } 105 200 201 static inline float64_t log10_f64(float64_t val) 202 { 203 return float64_log10(val); 204 } 205 206 static inline float32_t log10_f32(float32_t val) 207 { 208 return float32_log10(val); 209 } 210 211 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 212 { 213 return float64_modf(value, iptr); 214 } 215 216 static inline float64_t modf_f32(float32_t value, float32_t *iptr) 217 { 218 return float32_modf(value, iptr); 219 } 220 106 221 static inline float64_t pow_f64(float64_t x, float64_t y) 107 222 { … … 121 236 } 122 237 238 static inline float64_t sinh_f64(float64_t val) 239 { 240 return float64_sinh(val); 241 } 242 243 static inline float32_t sinh_f32(float32_t val) 244 { 245 return float32_sinh(val); 246 } 247 248 static inline float64_t sqrt_f64(float64_t val) 249 { 250 return float64_sqrt(val); 251 } 252 253 static inline float32_t sqrt_f32(float32_t val) 254 { 255 return float32_sqrt(val); 256 } 257 258 static inline float64_t tan_f64(float64_t val) 259 { 260 return float64_tan(val); 261 } 262 263 static inline float32_t tan_f32(float32_t val) 264 { 265 return float32_tan(val); 266 } 267 268 static inline float64_t tanh_f64(float64_t val) 269 { 270 return float64_tanh(val); 271 } 272 273 static inline float32_t tanh_f32(float32_t val) 274 { 275 return float32_tanh(val); 276 } 277 123 278 extern float64_t trunc_f64(float64_t); 124 279 … … 128 283 } 129 284 285 static inline float64_t acos(float64_t val) 286 { 287 return acos_f64(val); 288 } 289 290 static inline float32_t acosf(float32_t val) 291 { 292 return acos_f32(val); 293 } 294 295 static inline float64_t asin(float64_t val) 296 { 297 return asin_f64(val); 298 } 299 300 static inline float32_t asinf(float32_t val) 301 { 302 return asin_f32(val); 303 } 304 305 static inline float64_t atan(float64_t val) 306 { 307 return atan_f64(val); 308 } 309 310 static inline float32_t atanf(float32_t val) 311 { 312 return atan_f32(val); 313 } 314 315 static inline float64_t atan2(float64_t y, float64_t x) 316 { 317 return atan2_f64(y, x); 318 } 319 320 static inline float32_t atan2f(float32_t y, float32_t x) 321 { 322 return atan2_f32(y, x); 323 } 324 130 325 static inline float64_t ceil(float64_t val) 131 326 { … … 148 343 } 149 344 345 static inline float64_t cosh(float64_t val) 346 { 347 return cosh_f64(val); 348 } 349 350 static inline float32_t coshf(float32_t val) 351 { 352 return cosh_f32(val); 353 } 354 150 355 static inline float64_t exp(float64_t val) 151 356 { … … 158 363 } 159 364 365 static inline float64_t fabs(float64_t val) 366 { 367 return fabs_f64(val); 368 } 369 370 static inline float32_t fabsf(float32_t val) 371 { 372 return fabs_f32(val); 373 } 374 160 375 static inline float64_t floor(float64_t val) 161 376 { … … 178 393 } 179 394 395 static inline float64_t frexp(float64_t x, int *exp) 396 { 397 return frexp_f64(x, exp); 398 } 399 400 static inline float32_t frexpf(float32_t x, int *exp) 401 { 402 return frexp_f32(x, exp); 403 } 404 405 static inline float64_t ldexp(float64_t x, int exp) 406 { 407 return ldexp_f64(x, exp); 408 } 409 410 static inline float32_t ldexpf(float32_t x, int exp) 411 { 412 return ldexp_f32(x, exp); 413 } 414 180 415 static inline float64_t log(float64_t val) 181 416 { … … 188 423 } 189 424 425 static inline float64_t log10(float64_t val) 426 { 427 return log10_f64(val); 428 } 429 430 static inline float32_t log10f(float32_t val) 431 { 432 return log10_f32(val); 433 } 434 435 static inline float64_t modf(float64_t value, float64_t *iptr) 436 { 437 return modf_f64(value, iptr); 438 } 439 440 static inline float32_t modff(float32_t value, float32_t *iptr) 441 { 442 return modf_f32(value, iptr); 443 } 444 190 445 static inline float64_t pow(float64_t x, float64_t y) 191 446 { … … 206 461 { 207 462 return sin_f32(val); 463 } 464 465 static inline float64_t sinh(float64_t val) 466 { 467 return sinh_f64(val); 468 } 469 470 static inline float32_t sinhf(float32_t val) 471 { 472 return sinh_f32(val); 473 } 474 475 static inline float64_t sqrt(float64_t val) 476 { 477 return sqrt_f64(val); 478 } 479 480 static inline float32_t sqrtf(float32_t val) 481 { 482 return sqrt_f32(val); 483 } 484 485 static inline float64_t tan(float64_t val) 486 { 487 return tan_f64(val); 488 } 489 490 static inline float32_t tanf(float32_t val) 491 { 492 return tan_f32(val); 493 } 494 495 static inline float64_t tanh(float64_t val) 496 { 497 return tanh_f64(val); 498 } 499 500 static inline float32_t tanhf(float32_t val) 501 { 502 return tanh_f32(val); 208 503 } 209 504 -
uspace/lib/math/arch/arm32/include/libarch/math.h
rba8eecf rb69786e 37 37 #define LIBMATH_arm32_MATH_H_ 38 38 39 #include <acos.h> 40 #include <asin.h> 41 #include <atan.h> 42 #include <atan2.h> 39 43 #include <ceil.h> 44 #include <cosh.h> 40 45 #include <exp.h> 46 #include <fabs.h> 41 47 #include <floor.h> 48 #include <fmod.h> 49 #include <frexp.h> 50 #include <ldexp.h> 42 51 #include <log.h> 52 #include <log10.h> 43 53 #include <mathtypes.h> 44 #include <mod .h>54 #include <modf.h> 45 55 #include <pow.h> 56 #include <sinh.h> 57 #include <sqrt.h> 58 #include <tan.h> 59 #include <tanh.h> 60 #include <trig.h> 46 61 #include <trunc.h> 47 #include <trig.h> 62 63 #define HUGE_VAL FLOAT64_INF 64 65 static inline float64_t acos_f64(float64_t val) 66 { 67 return float64_acos(val); 68 } 69 70 static inline float32_t acos_f32(float32_t val) 71 { 72 return float32_acos(val); 73 } 74 75 static inline float64_t asin_f64(float64_t val) 76 { 77 return float64_asin(val); 78 } 79 80 static inline float32_t asin_f32(float32_t val) 81 { 82 return float32_asin(val); 83 } 84 85 static inline float64_t atan_f64(float64_t val) 86 { 87 return float64_atan(val); 88 } 89 90 static inline float32_t atan_f32(float32_t val) 91 { 92 return float32_atan(val); 93 } 94 95 static inline float64_t atan2_f64(float64_t y, float64_t x) 96 { 97 return float64_atan2(y, x); 98 } 99 100 static inline float32_t atan2_f32(float32_t y, float32_t x) 101 { 102 return float32_atan2(y, x); 103 } 48 104 49 105 static inline float64_t ceil_f64(float64_t val) … … 67 123 } 68 124 125 static inline float64_t cosh_f64(float64_t val) 126 { 127 return float64_cosh(val); 128 } 129 130 static inline float32_t cosh_f32(float32_t val) 131 { 132 return float32_cosh(val); 133 } 134 69 135 static inline float64_t exp_f64(float64_t val) 70 136 { … … 77 143 } 78 144 145 static inline float64_t fabs_f64(float64_t val) 146 { 147 return float64_fabs(val); 148 } 149 150 static inline float32_t fabs_f32(float32_t val) 151 { 152 return float32_fabs(val); 153 } 154 79 155 static inline float64_t floor_f64(float64_t val) 80 156 { … … 86 162 return float32_floor(val); 87 163 } 88 89 164 static inline float64_t fmod_f64(float64_t dividend, float64_t divisor) 90 165 { 91 return float64_ mod(dividend, divisor);166 return float64_fmod(dividend, divisor); 92 167 } 93 168 94 169 static inline float64_t fmod_f32(float32_t dividend, float32_t divisor) 95 170 { 96 return float32_mod(dividend, divisor); 171 return float32_fmod(dividend, divisor); 172 } 173 174 static inline float64_t frexp_f64(float64_t x, int *exp) 175 { 176 return float64_frexp(x, exp); 177 } 178 179 static inline float64_t frexp_f32(float32_t x, int *exp) 180 { 181 return float32_frexp(x, exp); 182 } 183 184 static inline float64_t ldexp_f64(float64_t x, int exp) 185 { 186 return float64_ldexp(x, exp); 187 } 188 189 static inline float64_t ldexp_f32(float32_t x, int exp) 190 { 191 return float32_ldexp(x, exp); 97 192 } 98 193 … … 107 202 } 108 203 204 static inline float64_t log10_f64(float64_t val) 205 { 206 return float64_log10(val); 207 } 208 209 static inline float32_t log10_f32(float32_t val) 210 { 211 return float32_log10(val); 212 } 213 214 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 215 { 216 return float64_modf(value, iptr); 217 } 218 219 static inline float64_t modf_f32(float32_t value, float32_t *iptr) 220 { 221 return float32_modf(value, iptr); 222 } 223 109 224 static inline float64_t pow_f64(float64_t x, float64_t y) 110 225 { … … 127 242 } 128 243 244 static inline float64_t sinh_f64(float64_t val) 245 { 246 return float64_sinh(val); 247 } 248 249 static inline float32_t sinh_f32(float32_t val) 250 { 251 return float32_sinh(val); 252 } 253 254 static inline float64_t sqrt_f64(float64_t val) 255 { 256 return float64_sqrt(val); 257 } 258 259 static inline float32_t sqrt_f32(float32_t val) 260 { 261 return float32_sqrt(val); 262 } 263 264 static inline float64_t tan_f64(float64_t val) 265 { 266 return float64_tan(val); 267 } 268 269 static inline float32_t tan_f32(float32_t val) 270 { 271 return float32_tan(val); 272 } 273 274 static inline float64_t tanh_f64(float64_t val) 275 { 276 return float64_tanh(val); 277 } 278 279 static inline float32_t tanh_f32(float32_t val) 280 { 281 return float32_tanh(val); 282 } 283 129 284 static inline float64_t trunc_f64(float64_t val) 130 285 { … … 137 292 } 138 293 294 static inline float64_t acos(float64_t val) 295 { 296 return acos_f64(val); 297 } 298 299 static inline float32_t acosf(float32_t val) 300 { 301 return acos_f32(val); 302 } 303 304 static inline float64_t asin(float64_t val) 305 { 306 return asin_f64(val); 307 } 308 309 static inline float32_t asinf(float32_t val) 310 { 311 return asin_f32(val); 312 } 313 314 static inline float64_t atan(float64_t val) 315 { 316 return atan_f64(val); 317 } 318 319 static inline float32_t atanf(float32_t val) 320 { 321 return atan_f32(val); 322 } 323 324 static inline float64_t atan2(float64_t y, float64_t x) 325 { 326 return atan2_f64(y, x); 327 } 328 329 static inline float32_t atan2f(float32_t y, float32_t x) 330 { 331 return atan2_f32(y, x); 332 } 333 139 334 static inline float64_t ceil(float64_t val) 140 335 { … … 157 352 } 158 353 354 static inline float64_t cosh(float64_t val) 355 { 356 return cosh_f64(val); 357 } 358 359 static inline float32_t coshf(float32_t val) 360 { 361 return cosh_f32(val); 362 } 363 159 364 static inline float64_t exp(float64_t val) 160 365 { … … 167 372 } 168 373 374 static inline float64_t fabs(float64_t val) 375 { 376 return fabs_f64(val); 377 } 378 379 static inline float32_t fabsf(float32_t val) 380 { 381 return fabs_f32(val); 382 } 383 169 384 static inline float64_t floor(float64_t val) 170 385 { … … 187 402 } 188 403 404 static inline float64_t frexp(float64_t x, int *exp) 405 { 406 return frexp_f64(x, exp); 407 } 408 409 static inline float32_t frexpf(float32_t x, int *exp) 410 { 411 return frexp_f32(x, exp); 412 } 413 414 static inline float64_t ldexp(float64_t x, int exp) 415 { 416 return ldexp_f64(x, exp); 417 } 418 419 static inline float32_t ldexpf(float32_t x, int exp) 420 { 421 return ldexp_f32(x, exp); 422 } 423 189 424 static inline float64_t log(float64_t val) 190 425 { … … 197 432 } 198 433 434 static inline float64_t log10(float64_t val) 435 { 436 return log10_f64(val); 437 } 438 439 static inline float32_t log10f(float32_t val) 440 { 441 return log10_f32(val); 442 } 443 444 static inline float64_t modf(float64_t value, float64_t *iptr) 445 { 446 return modf_f64(value, iptr); 447 } 448 449 static inline float32_t modff(float32_t value, float32_t *iptr) 450 { 451 return modf_f32(value, iptr); 452 } 453 199 454 static inline float64_t pow(float64_t x, float64_t y) 200 455 { … … 215 470 { 216 471 return sin_f32(val); 472 } 473 474 static inline float64_t sinh(float64_t val) 475 { 476 return sinh_f64(val); 477 } 478 479 static inline float32_t sinhf(float32_t val) 480 { 481 return sinh_f32(val); 482 } 483 484 static inline float64_t sqrt(float64_t val) 485 { 486 return sqrt_f64(val); 487 } 488 489 static inline float32_t sqrtf(float32_t val) 490 { 491 return sqrt_f32(val); 492 } 493 494 static inline float64_t tan(float64_t val) 495 { 496 return tan_f64(val); 497 } 498 499 static inline float32_t tanf(float32_t val) 500 { 501 return tan_f32(val); 502 } 503 504 static inline float64_t tanh(float64_t val) 505 { 506 return tanh_f64(val); 507 } 508 509 static inline float32_t tanhf(float32_t val) 510 { 511 return tanh_f32(val); 217 512 } 218 513 -
uspace/lib/math/arch/ia32/include/libarch/math.h
rba8eecf rb69786e 37 37 #define LIBMATH_ia32_MATH_H_ 38 38 39 #include <acos.h> 40 #include <asin.h> 41 #include <atan.h> 42 #include <atan2.h> 39 43 #include <ceil.h> 44 #include <cosh.h> 40 45 #include <exp.h> 46 #include <fabs.h> 41 47 #include <floor.h> 48 #include <fmod.h> 49 #include <frexp.h> 50 #include <ldexp.h> 42 51 #include <log.h> 52 #include <log10.h> 43 53 #include <mathtypes.h> 44 #include <mod .h>54 #include <modf.h> 45 55 #include <pow.h> 56 #include <sinh.h> 57 #include <sqrt.h> 58 #include <tan.h> 59 #include <tanh.h> 60 #include <trig.h> 46 61 #include <trunc.h> 47 #include <trig.h> 62 63 #define HUGE_VAL FLOAT64_INF 64 65 static inline float64_t acos_f64(float64_t val) 66 { 67 return float64_acos(val); 68 } 69 70 static inline float32_t acos_f32(float32_t val) 71 { 72 return float32_acos(val); 73 } 74 75 static inline float64_t asin_f64(float64_t val) 76 { 77 return float64_asin(val); 78 } 79 80 static inline float32_t asin_f32(float32_t val) 81 { 82 return float32_asin(val); 83 } 84 85 static inline float64_t atan_f64(float64_t val) 86 { 87 return float64_atan(val); 88 } 89 90 static inline float32_t atan_f32(float32_t val) 91 { 92 return float32_atan(val); 93 } 94 95 static inline float64_t atan2_f64(float64_t y, float64_t x) 96 { 97 return float64_atan2(y, x); 98 } 99 100 static inline float32_t atan2_f32(float32_t y, float32_t x) 101 { 102 return float32_atan2(y, x); 103 } 48 104 49 105 static inline float64_t ceil_f64(float64_t val) … … 64 120 } 65 121 122 static inline float64_t cosh_f64(float64_t val) 123 { 124 return float64_cosh(val); 125 } 126 127 static inline float32_t cosh_f32(float32_t val) 128 { 129 return float32_cosh(val); 130 } 131 66 132 static inline float64_t exp_f64(float64_t val) 67 133 { … … 74 140 } 75 141 142 static inline float64_t fabs_f64(float64_t val) 143 { 144 return float64_fabs(val); 145 } 146 147 static inline float32_t fabs_f32(float32_t val) 148 { 149 return float32_fabs(val); 150 } 151 76 152 static inline float64_t floor_f64(float64_t val) 77 153 { … … 83 159 return float32_floor(val); 84 160 } 85 86 161 static inline float64_t fmod_f64(float64_t dividend, float64_t divisor) 87 162 { 88 return float64_ mod(dividend, divisor);163 return float64_fmod(dividend, divisor); 89 164 } 90 165 91 166 static inline float64_t fmod_f32(float32_t dividend, float32_t divisor) 92 167 { 93 return float32_mod(dividend, divisor); 168 return float32_fmod(dividend, divisor); 169 } 170 171 static inline float64_t frexp_f64(float64_t x, int *exp) 172 { 173 return float64_frexp(x, exp); 174 } 175 176 static inline float64_t frexp_f32(float32_t x, int *exp) 177 { 178 return float32_frexp(x, exp); 179 } 180 181 static inline float64_t ldexp_f64(float64_t x, int exp) 182 { 183 return float64_ldexp(x, exp); 184 } 185 186 static inline float64_t ldexp_f32(float32_t x, int exp) 187 { 188 return float32_ldexp(x, exp); 94 189 } 95 190 … … 104 199 } 105 200 201 static inline float64_t log10_f64(float64_t val) 202 { 203 return float64_log10(val); 204 } 205 206 static inline float32_t log10_f32(float32_t val) 207 { 208 return float32_log10(val); 209 } 210 211 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 212 { 213 return float64_modf(value, iptr); 214 } 215 216 static inline float64_t modf_f32(float32_t value, float32_t *iptr) 217 { 218 return float32_modf(value, iptr); 219 } 220 106 221 static inline float64_t pow_f64(float64_t x, float64_t y) 107 222 { … … 121 236 } 122 237 238 static inline float64_t sinh_f64(float64_t val) 239 { 240 return float64_sinh(val); 241 } 242 243 static inline float32_t sinh_f32(float32_t val) 244 { 245 return float32_sinh(val); 246 } 247 248 static inline float64_t sqrt_f64(float64_t val) 249 { 250 return float64_sqrt(val); 251 } 252 253 static inline float32_t sqrt_f32(float32_t val) 254 { 255 return float32_sqrt(val); 256 } 257 258 static inline float64_t tan_f64(float64_t val) 259 { 260 return float64_tan(val); 261 } 262 263 static inline float32_t tan_f32(float32_t val) 264 { 265 return float32_tan(val); 266 } 267 268 static inline float64_t tanh_f64(float64_t val) 269 { 270 return float64_tanh(val); 271 } 272 273 static inline float32_t tanh_f32(float32_t val) 274 { 275 return float32_tanh(val); 276 } 277 123 278 extern float64_t trunc_f64(float64_t); 124 279 … … 128 283 } 129 284 285 static inline float64_t acos(float64_t val) 286 { 287 return acos_f64(val); 288 } 289 290 static inline float32_t acosf(float32_t val) 291 { 292 return acos_f32(val); 293 } 294 295 static inline float64_t asin(float64_t val) 296 { 297 return asin_f64(val); 298 } 299 300 static inline float32_t asinf(float32_t val) 301 { 302 return asin_f32(val); 303 } 304 305 static inline float64_t atan(float64_t val) 306 { 307 return atan_f64(val); 308 } 309 310 static inline float32_t atanf(float32_t val) 311 { 312 return atan_f32(val); 313 } 314 315 static inline float64_t atan2(float64_t y, float64_t x) 316 { 317 return atan2_f64(y, x); 318 } 319 320 static inline float32_t atan2f(float32_t y, float32_t x) 321 { 322 return atan2_f32(y, x); 323 } 324 130 325 static inline float64_t ceil(float64_t val) 131 326 { … … 148 343 } 149 344 345 static inline float64_t cosh(float64_t val) 346 { 347 return cosh_f64(val); 348 } 349 350 static inline float32_t coshf(float32_t val) 351 { 352 return cosh_f32(val); 353 } 354 150 355 static inline float64_t exp(float64_t val) 151 356 { … … 158 363 } 159 364 365 static inline float64_t fabs(float64_t val) 366 { 367 return fabs_f64(val); 368 } 369 370 static inline float32_t fabsf(float32_t val) 371 { 372 return fabs_f32(val); 373 } 374 160 375 static inline float64_t floor(float64_t val) 161 376 { … … 178 393 } 179 394 395 static inline float64_t frexp(float64_t x, int *exp) 396 { 397 return frexp_f64(x, exp); 398 } 399 400 static inline float32_t frexpf(float32_t x, int *exp) 401 { 402 return frexp_f32(x, exp); 403 } 404 405 static inline float64_t ldexp(float64_t x, int exp) 406 { 407 return ldexp_f64(x, exp); 408 } 409 410 static inline float32_t ldexpf(float32_t x, int exp) 411 { 412 return ldexp_f32(x, exp); 413 } 414 180 415 static inline float64_t log(float64_t val) 181 416 { … … 188 423 } 189 424 425 static inline float64_t log10(float64_t val) 426 { 427 return log10_f64(val); 428 } 429 430 static inline float32_t log10f(float32_t val) 431 { 432 return log10_f32(val); 433 } 434 435 static inline float64_t modf(float64_t value, float64_t *iptr) 436 { 437 return modf_f64(value, iptr); 438 } 439 440 static inline float32_t modff(float32_t value, float32_t *iptr) 441 { 442 return modf_f32(value, iptr); 443 } 444 190 445 static inline float64_t pow(float64_t x, float64_t y) 191 446 { … … 206 461 { 207 462 return sin_f32(val); 463 } 464 465 static inline float64_t sinh(float64_t val) 466 { 467 return sinh_f64(val); 468 } 469 470 static inline float32_t sinhf(float32_t val) 471 { 472 return sinh_f32(val); 473 } 474 475 static inline float64_t sqrt(float64_t val) 476 { 477 return sqrt_f64(val); 478 } 479 480 static inline float32_t sqrtf(float32_t val) 481 { 482 return sqrt_f32(val); 483 } 484 485 static inline float64_t tan(float64_t val) 486 { 487 return tan_f64(val); 488 } 489 490 static inline float32_t tanf(float32_t val) 491 { 492 return tan_f32(val); 493 } 494 495 static inline float64_t tanh(float64_t val) 496 { 497 return tanh_f64(val); 498 } 499 500 static inline float32_t tanhf(float32_t val) 501 { 502 return tanh_f32(val); 208 503 } 209 504 -
uspace/lib/math/arch/ia64/include/libarch/math.h
rba8eecf rb69786e 37 37 #define LIBMATH_ia64_MATH_H_ 38 38 39 #include <acos.h> 40 #include <asin.h> 41 #include <atan.h> 42 #include <atan2.h> 39 43 #include <ceil.h> 44 #include <cosh.h> 40 45 #include <exp.h> 46 #include <fabs.h> 41 47 #include <floor.h> 48 #include <fmod.h> 49 #include <frexp.h> 50 #include <ldexp.h> 42 51 #include <log.h> 52 #include <log10.h> 43 53 #include <mathtypes.h> 44 #include <mod .h>54 #include <modf.h> 45 55 #include <pow.h> 56 #include <sinh.h> 57 #include <sqrt.h> 58 #include <tan.h> 59 #include <tanh.h> 60 #include <trig.h> 46 61 #include <trunc.h> 47 #include <trig.h> 62 63 #define HUGE_VAL FLOAT64_INF 64 65 static inline float64_t acos_f64(float64_t val) 66 { 67 return float64_acos(val); 68 } 69 70 static inline float32_t acos_f32(float32_t val) 71 { 72 return float32_acos(val); 73 } 74 75 static inline float64_t asin_f64(float64_t val) 76 { 77 return float64_asin(val); 78 } 79 80 static inline float32_t asin_f32(float32_t val) 81 { 82 return float32_asin(val); 83 } 84 85 static inline float64_t atan_f64(float64_t val) 86 { 87 return float64_atan(val); 88 } 89 90 static inline float32_t atan_f32(float32_t val) 91 { 92 return float32_atan(val); 93 } 94 95 static inline float64_t atan2_f64(float64_t y, float64_t x) 96 { 97 return float64_atan2(y, x); 98 } 99 100 static inline float32_t atan2_f32(float32_t y, float32_t x) 101 { 102 return float32_atan2(y, x); 103 } 48 104 49 105 static inline float64_t ceil_f64(float64_t val) … … 67 123 } 68 124 125 static inline float64_t cosh_f64(float64_t val) 126 { 127 return float64_cosh(val); 128 } 129 130 static inline float32_t cosh_f32(float32_t val) 131 { 132 return float32_cosh(val); 133 } 134 69 135 static inline float64_t exp_f64(float64_t val) 70 136 { … … 77 143 } 78 144 145 static inline float64_t fabs_f64(float64_t val) 146 { 147 return float64_fabs(val); 148 } 149 150 static inline float32_t fabs_f32(float32_t val) 151 { 152 return float32_fabs(val); 153 } 154 79 155 static inline float64_t floor_f64(float64_t val) 80 156 { … … 86 162 return float32_floor(val); 87 163 } 88 89 164 static inline float64_t fmod_f64(float64_t dividend, float64_t divisor) 90 165 { 91 return float64_ mod(dividend, divisor);166 return float64_fmod(dividend, divisor); 92 167 } 93 168 94 169 static inline float64_t fmod_f32(float32_t dividend, float32_t divisor) 95 170 { 96 return float32_mod(dividend, divisor); 171 return float32_fmod(dividend, divisor); 172 } 173 174 static inline float64_t frexp_f64(float64_t x, int *exp) 175 { 176 return float64_frexp(x, exp); 177 } 178 179 static inline float64_t frexp_f32(float32_t x, int *exp) 180 { 181 return float32_frexp(x, exp); 182 } 183 184 static inline float64_t ldexp_f64(float64_t x, int exp) 185 { 186 return float64_ldexp(x, exp); 187 } 188 189 static inline float64_t ldexp_f32(float32_t x, int exp) 190 { 191 return float32_ldexp(x, exp); 97 192 } 98 193 … … 107 202 } 108 203 204 static inline float64_t log10_f64(float64_t val) 205 { 206 return float64_log10(val); 207 } 208 209 static inline float32_t log10_f32(float32_t val) 210 { 211 return float32_log10(val); 212 } 213 214 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 215 { 216 return float64_modf(value, iptr); 217 } 218 219 static inline float64_t modf_f32(float32_t value, float32_t *iptr) 220 { 221 return float32_modf(value, iptr); 222 } 223 109 224 static inline float64_t pow_f64(float64_t x, float64_t y) 110 225 { … … 127 242 } 128 243 244 static inline float64_t sinh_f64(float64_t val) 245 { 246 return float64_sinh(val); 247 } 248 249 static inline float32_t sinh_f32(float32_t val) 250 { 251 return float32_sinh(val); 252 } 253 254 static inline float64_t sqrt_f64(float64_t val) 255 { 256 return float64_sqrt(val); 257 } 258 259 static inline float32_t sqrt_f32(float32_t val) 260 { 261 return float32_sqrt(val); 262 } 263 264 static inline float64_t tan_f64(float64_t val) 265 { 266 return float64_tan(val); 267 } 268 269 static inline float32_t tan_f32(float32_t val) 270 { 271 return float32_tan(val); 272 } 273 274 static inline float64_t tanh_f64(float64_t val) 275 { 276 return float64_tanh(val); 277 } 278 279 static inline float32_t tanh_f32(float32_t val) 280 { 281 return float32_tanh(val); 282 } 283 129 284 static inline float64_t trunc_f64(float64_t val) 130 285 { … … 137 292 } 138 293 294 static inline float64_t acos(float64_t val) 295 { 296 return acos_f64(val); 297 } 298 299 static inline float32_t acosf(float32_t val) 300 { 301 return acos_f32(val); 302 } 303 304 static inline float64_t asin(float64_t val) 305 { 306 return asin_f64(val); 307 } 308 309 static inline float32_t asinf(float32_t val) 310 { 311 return asin_f32(val); 312 } 313 314 static inline float64_t atan(float64_t val) 315 { 316 return atan_f64(val); 317 } 318 319 static inline float32_t atanf(float32_t val) 320 { 321 return atan_f32(val); 322 } 323 324 static inline float64_t atan2(float64_t y, float64_t x) 325 { 326 return atan2_f64(y, x); 327 } 328 329 static inline float32_t atan2f(float32_t y, float32_t x) 330 { 331 return atan2_f32(y, x); 332 } 333 139 334 static inline float64_t ceil(float64_t val) 140 335 { … … 157 352 } 158 353 354 static inline float64_t cosh(float64_t val) 355 { 356 return cosh_f64(val); 357 } 358 359 static inline float32_t coshf(float32_t val) 360 { 361 return cosh_f32(val); 362 } 363 159 364 static inline float64_t exp(float64_t val) 160 365 { … … 167 372 } 168 373 374 static inline float64_t fabs(float64_t val) 375 { 376 return fabs_f64(val); 377 } 378 379 static inline float32_t fabsf(float32_t val) 380 { 381 return fabs_f32(val); 382 } 383 169 384 static inline float64_t floor(float64_t val) 170 385 { … … 187 402 } 188 403 404 static inline float64_t frexp(float64_t x, int *exp) 405 { 406 return frexp_f64(x, exp); 407 } 408 409 static inline float32_t frexpf(float32_t x, int *exp) 410 { 411 return frexp_f32(x, exp); 412 } 413 414 static inline float64_t ldexp(float64_t x, int exp) 415 { 416 return ldexp_f64(x, exp); 417 } 418 419 static inline float32_t ldexpf(float32_t x, int exp) 420 { 421 return ldexp_f32(x, exp); 422 } 423 189 424 static inline float64_t log(float64_t val) 190 425 { … … 197 432 } 198 433 434 static inline float64_t log10(float64_t val) 435 { 436 return log10_f64(val); 437 } 438 439 static inline float32_t log10f(float32_t val) 440 { 441 return log10_f32(val); 442 } 443 444 static inline float64_t modf(float64_t value, float64_t *iptr) 445 { 446 return modf_f64(value, iptr); 447 } 448 449 static inline float32_t modff(float32_t value, float32_t *iptr) 450 { 451 return modf_f32(value, iptr); 452 } 453 199 454 static inline float64_t pow(float64_t x, float64_t y) 200 455 { … … 215 470 { 216 471 return sin_f32(val); 472 } 473 474 static inline float64_t sinh(float64_t val) 475 { 476 return sinh_f64(val); 477 } 478 479 static inline float32_t sinhf(float32_t val) 480 { 481 return sinh_f32(val); 482 } 483 484 static inline float64_t sqrt(float64_t val) 485 { 486 return sqrt_f64(val); 487 } 488 489 static inline float32_t sqrtf(float32_t val) 490 { 491 return sqrt_f32(val); 492 } 493 494 static inline float64_t tan(float64_t val) 495 { 496 return tan_f64(val); 497 } 498 499 static inline float32_t tanf(float32_t val) 500 { 501 return tan_f32(val); 502 } 503 504 static inline float64_t tanh(float64_t val) 505 { 506 return tanh_f64(val); 507 } 508 509 static inline float32_t tanhf(float32_t val) 510 { 511 return tanh_f32(val); 217 512 } 218 513 -
uspace/lib/math/arch/mips32/include/libarch/math.h
rba8eecf rb69786e 37 37 #define LIBMATH_mips32_MATH_H_ 38 38 39 #include <acos.h> 40 #include <asin.h> 41 #include <atan.h> 42 #include <atan2.h> 39 43 #include <ceil.h> 44 #include <cosh.h> 40 45 #include <exp.h> 46 #include <fabs.h> 41 47 #include <floor.h> 48 #include <fmod.h> 49 #include <frexp.h> 50 #include <ldexp.h> 42 51 #include <log.h> 52 #include <log10.h> 43 53 #include <mathtypes.h> 44 #include <mod .h>54 #include <modf.h> 45 55 #include <pow.h> 56 #include <sinh.h> 57 #include <sqrt.h> 58 #include <tan.h> 59 #include <tanh.h> 60 #include <trig.h> 46 61 #include <trunc.h> 47 #include <trig.h> 62 63 #define HUGE_VAL FLOAT64_INF 64 65 static inline float64_t acos_f64(float64_t val) 66 { 67 return float64_acos(val); 68 } 69 70 static inline float32_t acos_f32(float32_t val) 71 { 72 return float32_acos(val); 73 } 74 75 static inline float64_t asin_f64(float64_t val) 76 { 77 return float64_asin(val); 78 } 79 80 static inline float32_t asin_f32(float32_t val) 81 { 82 return float32_asin(val); 83 } 84 85 static inline float64_t atan_f64(float64_t val) 86 { 87 return float64_atan(val); 88 } 89 90 static inline float32_t atan_f32(float32_t val) 91 { 92 return float32_atan(val); 93 } 94 95 static inline float64_t atan2_f64(float64_t y, float64_t x) 96 { 97 return float64_atan2(y, x); 98 } 99 100 static inline float32_t atan2_f32(float32_t y, float32_t x) 101 { 102 return float32_atan2(y, x); 103 } 48 104 49 105 static inline float64_t ceil_f64(float64_t val) … … 67 123 } 68 124 125 static inline float64_t cosh_f64(float64_t val) 126 { 127 return float64_cosh(val); 128 } 129 130 static inline float32_t cosh_f32(float32_t val) 131 { 132 return float32_cosh(val); 133 } 134 69 135 static inline float64_t exp_f64(float64_t val) 70 136 { … … 77 143 } 78 144 145 static inline float64_t fabs_f64(float64_t val) 146 { 147 return float64_fabs(val); 148 } 149 150 static inline float32_t fabs_f32(float32_t val) 151 { 152 return float32_fabs(val); 153 } 154 79 155 static inline float64_t floor_f64(float64_t val) 80 156 { … … 86 162 return float32_floor(val); 87 163 } 88 89 164 static inline float64_t fmod_f64(float64_t dividend, float64_t divisor) 90 165 { 91 return float64_ mod(dividend, divisor);166 return float64_fmod(dividend, divisor); 92 167 } 93 168 94 169 static inline float64_t fmod_f32(float32_t dividend, float32_t divisor) 95 170 { 96 return float32_mod(dividend, divisor); 171 return float32_fmod(dividend, divisor); 172 } 173 174 static inline float64_t frexp_f64(float64_t x, int *exp) 175 { 176 return float64_frexp(x, exp); 177 } 178 179 static inline float64_t frexp_f32(float32_t x, int *exp) 180 { 181 return float32_frexp(x, exp); 182 } 183 184 static inline float64_t ldexp_f64(float64_t x, int exp) 185 { 186 return float64_ldexp(x, exp); 187 } 188 189 static inline float64_t ldexp_f32(float32_t x, int exp) 190 { 191 return float32_ldexp(x, exp); 97 192 } 98 193 … … 107 202 } 108 203 204 static inline float64_t log10_f64(float64_t val) 205 { 206 return float64_log10(val); 207 } 208 209 static inline float32_t log10_f32(float32_t val) 210 { 211 return float32_log10(val); 212 } 213 214 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 215 { 216 return float64_modf(value, iptr); 217 } 218 219 static inline float64_t modf_f32(float32_t value, float32_t *iptr) 220 { 221 return float32_modf(value, iptr); 222 } 223 109 224 static inline float64_t pow_f64(float64_t x, float64_t y) 110 225 { … … 127 242 } 128 243 244 static inline float64_t sinh_f64(float64_t val) 245 { 246 return float64_sinh(val); 247 } 248 249 static inline float32_t sinh_f32(float32_t val) 250 { 251 return float32_sinh(val); 252 } 253 254 static inline float64_t sqrt_f64(float64_t val) 255 { 256 return float64_sqrt(val); 257 } 258 259 static inline float32_t sqrt_f32(float32_t val) 260 { 261 return float32_sqrt(val); 262 } 263 264 static inline float64_t tan_f64(float64_t val) 265 { 266 return float64_tan(val); 267 } 268 269 static inline float32_t tan_f32(float32_t val) 270 { 271 return float32_tan(val); 272 } 273 274 static inline float64_t tanh_f64(float64_t val) 275 { 276 return float64_tanh(val); 277 } 278 279 static inline float32_t tanh_f32(float32_t val) 280 { 281 return float32_tanh(val); 282 } 283 129 284 static inline float64_t trunc_f64(float64_t val) 130 285 { … … 137 292 } 138 293 294 static inline float64_t acos(float64_t val) 295 { 296 return acos_f64(val); 297 } 298 299 static inline float32_t acosf(float32_t val) 300 { 301 return acos_f32(val); 302 } 303 304 static inline float64_t asin(float64_t val) 305 { 306 return asin_f64(val); 307 } 308 309 static inline float32_t asinf(float32_t val) 310 { 311 return asin_f32(val); 312 } 313 314 static inline float64_t atan(float64_t val) 315 { 316 return atan_f64(val); 317 } 318 319 static inline float32_t atanf(float32_t val) 320 { 321 return atan_f32(val); 322 } 323 324 static inline float64_t atan2(float64_t y, float64_t x) 325 { 326 return atan2_f64(y, x); 327 } 328 329 static inline float32_t atan2f(float32_t y, float32_t x) 330 { 331 return atan2_f32(y, x); 332 } 333 139 334 static inline float64_t ceil(float64_t val) 140 335 { … … 157 352 } 158 353 354 static inline float64_t cosh(float64_t val) 355 { 356 return cosh_f64(val); 357 } 358 359 static inline float32_t coshf(float32_t val) 360 { 361 return cosh_f32(val); 362 } 363 159 364 static inline float64_t exp(float64_t val) 160 365 { … … 167 372 } 168 373 374 static inline float64_t fabs(float64_t val) 375 { 376 return fabs_f64(val); 377 } 378 379 static inline float32_t fabsf(float32_t val) 380 { 381 return fabs_f32(val); 382 } 383 169 384 static inline float64_t floor(float64_t val) 170 385 { … … 187 402 } 188 403 404 static inline float64_t frexp(float64_t x, int *exp) 405 { 406 return frexp_f64(x, exp); 407 } 408 409 static inline float32_t frexpf(float32_t x, int *exp) 410 { 411 return frexp_f32(x, exp); 412 } 413 414 static inline float64_t ldexp(float64_t x, int exp) 415 { 416 return ldexp_f64(x, exp); 417 } 418 419 static inline float32_t ldexpf(float32_t x, int exp) 420 { 421 return ldexp_f32(x, exp); 422 } 423 189 424 static inline float64_t log(float64_t val) 190 425 { … … 197 432 } 198 433 434 static inline float64_t log10(float64_t val) 435 { 436 return log10_f64(val); 437 } 438 439 static inline float32_t log10f(float32_t val) 440 { 441 return log10_f32(val); 442 } 443 444 static inline float64_t modf(float64_t value, float64_t *iptr) 445 { 446 return modf_f64(value, iptr); 447 } 448 449 static inline float32_t modff(float32_t value, float32_t *iptr) 450 { 451 return modf_f32(value, iptr); 452 } 453 199 454 static inline float64_t pow(float64_t x, float64_t y) 200 455 { … … 215 470 { 216 471 return sin_f32(val); 472 } 473 474 static inline float64_t sinh(float64_t val) 475 { 476 return sinh_f64(val); 477 } 478 479 static inline float32_t sinhf(float32_t val) 480 { 481 return sinh_f32(val); 482 } 483 484 static inline float64_t sqrt(float64_t val) 485 { 486 return sqrt_f64(val); 487 } 488 489 static inline float32_t sqrtf(float32_t val) 490 { 491 return sqrt_f32(val); 492 } 493 494 static inline float64_t tan(float64_t val) 495 { 496 return tan_f64(val); 497 } 498 499 static inline float32_t tanf(float32_t val) 500 { 501 return tan_f32(val); 502 } 503 504 static inline float64_t tanh(float64_t val) 505 { 506 return tanh_f64(val); 507 } 508 509 static inline float32_t tanhf(float32_t val) 510 { 511 return tanh_f32(val); 217 512 } 218 513 -
uspace/lib/math/arch/mips32eb/include/libarch/math.h
rba8eecf rb69786e 37 37 #define LIBMATH_mips32eb_MATH_H_ 38 38 39 #include <acos.h> 40 #include <asin.h> 41 #include <atan.h> 42 #include <atan2.h> 39 43 #include <ceil.h> 44 #include <cosh.h> 40 45 #include <exp.h> 46 #include <fabs.h> 41 47 #include <floor.h> 48 #include <fmod.h> 49 #include <frexp.h> 50 #include <ldexp.h> 42 51 #include <log.h> 52 #include <log10.h> 43 53 #include <mathtypes.h> 44 #include <mod .h>54 #include <modf.h> 45 55 #include <pow.h> 56 #include <sinh.h> 57 #include <sqrt.h> 58 #include <tan.h> 59 #include <tanh.h> 60 #include <trig.h> 46 61 #include <trunc.h> 47 #include <trig.h> 62 63 #define HUGE_VAL FLOAT64_INF 64 65 static inline float64_t acos_f64(float64_t val) 66 { 67 return float64_acos(val); 68 } 69 70 static inline float32_t acos_f32(float32_t val) 71 { 72 return float32_acos(val); 73 } 74 75 static inline float64_t asin_f64(float64_t val) 76 { 77 return float64_asin(val); 78 } 79 80 static inline float32_t asin_f32(float32_t val) 81 { 82 return float32_asin(val); 83 } 84 85 static inline float64_t atan_f64(float64_t val) 86 { 87 return float64_atan(val); 88 } 89 90 static inline float32_t atan_f32(float32_t val) 91 { 92 return float32_atan(val); 93 } 94 95 static inline float64_t atan2_f64(float64_t y, float64_t x) 96 { 97 return float64_atan2(y, x); 98 } 99 100 static inline float32_t atan2_f32(float32_t y, float32_t x) 101 { 102 return float32_atan2(y, x); 103 } 48 104 49 105 static inline float64_t ceil_f64(float64_t val) … … 67 123 } 68 124 125 static inline float64_t cosh_f64(float64_t val) 126 { 127 return float64_cosh(val); 128 } 129 130 static inline float32_t cosh_f32(float32_t val) 131 { 132 return float32_cosh(val); 133 } 134 69 135 static inline float64_t exp_f64(float64_t val) 70 136 { … … 77 143 } 78 144 145 static inline float64_t fabs_f64(float64_t val) 146 { 147 return float64_fabs(val); 148 } 149 150 static inline float32_t fabs_f32(float32_t val) 151 { 152 return float32_fabs(val); 153 } 154 79 155 static inline float64_t floor_f64(float64_t val) 80 156 { … … 86 162 return float32_floor(val); 87 163 } 88 89 164 static inline float64_t fmod_f64(float64_t dividend, float64_t divisor) 90 165 { 91 return float64_ mod(dividend, divisor);166 return float64_fmod(dividend, divisor); 92 167 } 93 168 94 169 static inline float64_t fmod_f32(float32_t dividend, float32_t divisor) 95 170 { 96 return float32_mod(dividend, divisor); 171 return float32_fmod(dividend, divisor); 172 } 173 174 static inline float64_t frexp_f64(float64_t x, int *exp) 175 { 176 return float64_frexp(x, exp); 177 } 178 179 static inline float64_t frexp_f32(float32_t x, int *exp) 180 { 181 return float32_frexp(x, exp); 182 } 183 184 static inline float64_t ldexp_f64(float64_t x, int exp) 185 { 186 return float64_ldexp(x, exp); 187 } 188 189 static inline float64_t ldexp_f32(float32_t x, int exp) 190 { 191 return float32_ldexp(x, exp); 97 192 } 98 193 … … 107 202 } 108 203 204 static inline float64_t log10_f64(float64_t val) 205 { 206 return float64_log10(val); 207 } 208 209 static inline float32_t log10_f32(float32_t val) 210 { 211 return float32_log10(val); 212 } 213 214 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 215 { 216 return float64_modf(value, iptr); 217 } 218 219 static inline float64_t modf_f32(float32_t value, float32_t *iptr) 220 { 221 return float32_modf(value, iptr); 222 } 223 109 224 static inline float64_t pow_f64(float64_t x, float64_t y) 110 225 { … … 127 242 } 128 243 244 static inline float64_t sinh_f64(float64_t val) 245 { 246 return float64_sinh(val); 247 } 248 249 static inline float32_t sinh_f32(float32_t val) 250 { 251 return float32_sinh(val); 252 } 253 254 static inline float64_t sqrt_f64(float64_t val) 255 { 256 return float64_sqrt(val); 257 } 258 259 static inline float32_t sqrt_f32(float32_t val) 260 { 261 return float32_sqrt(val); 262 } 263 264 static inline float64_t tan_f64(float64_t val) 265 { 266 return float64_tan(val); 267 } 268 269 static inline float32_t tan_f32(float32_t val) 270 { 271 return float32_tan(val); 272 } 273 274 static inline float64_t tanh_f64(float64_t val) 275 { 276 return float64_tanh(val); 277 } 278 279 static inline float32_t tanh_f32(float32_t val) 280 { 281 return float32_tanh(val); 282 } 283 129 284 static inline float64_t trunc_f64(float64_t val) 130 285 { … … 137 292 } 138 293 294 static inline float64_t acos(float64_t val) 295 { 296 return acos_f64(val); 297 } 298 299 static inline float32_t acosf(float32_t val) 300 { 301 return acos_f32(val); 302 } 303 304 static inline float64_t asin(float64_t val) 305 { 306 return asin_f64(val); 307 } 308 309 static inline float32_t asinf(float32_t val) 310 { 311 return asin_f32(val); 312 } 313 314 static inline float64_t atan(float64_t val) 315 { 316 return atan_f64(val); 317 } 318 319 static inline float32_t atanf(float32_t val) 320 { 321 return atan_f32(val); 322 } 323 324 static inline float64_t atan2(float64_t y, float64_t x) 325 { 326 return atan2_f64(y, x); 327 } 328 329 static inline float32_t atan2f(float32_t y, float32_t x) 330 { 331 return atan2_f32(y, x); 332 } 333 139 334 static inline float64_t ceil(float64_t val) 140 335 { … … 157 352 } 158 353 354 static inline float64_t cosh(float64_t val) 355 { 356 return cosh_f64(val); 357 } 358 359 static inline float32_t coshf(float32_t val) 360 { 361 return cosh_f32(val); 362 } 363 159 364 static inline float64_t exp(float64_t val) 160 365 { … … 167 372 } 168 373 374 static inline float64_t fabs(float64_t val) 375 { 376 return fabs_f64(val); 377 } 378 379 static inline float32_t fabsf(float32_t val) 380 { 381 return fabs_f32(val); 382 } 383 169 384 static inline float64_t floor(float64_t val) 170 385 { … … 187 402 } 188 403 404 static inline float64_t frexp(float64_t x, int *exp) 405 { 406 return frexp_f64(x, exp); 407 } 408 409 static inline float32_t frexpf(float32_t x, int *exp) 410 { 411 return frexp_f32(x, exp); 412 } 413 414 static inline float64_t ldexp(float64_t x, int exp) 415 { 416 return ldexp_f64(x, exp); 417 } 418 419 static inline float32_t ldexpf(float32_t x, int exp) 420 { 421 return ldexp_f32(x, exp); 422 } 423 189 424 static inline float64_t log(float64_t val) 190 425 { … … 197 432 } 198 433 434 static inline float64_t log10(float64_t val) 435 { 436 return log10_f64(val); 437 } 438 439 static inline float32_t log10f(float32_t val) 440 { 441 return log10_f32(val); 442 } 443 444 static inline float64_t modf(float64_t value, float64_t *iptr) 445 { 446 return modf_f64(value, iptr); 447 } 448 449 static inline float32_t modff(float32_t value, float32_t *iptr) 450 { 451 return modf_f32(value, iptr); 452 } 453 199 454 static inline float64_t pow(float64_t x, float64_t y) 200 455 { … … 215 470 { 216 471 return sin_f32(val); 472 } 473 474 static inline float64_t sinh(float64_t val) 475 { 476 return sinh_f64(val); 477 } 478 479 static inline float32_t sinhf(float32_t val) 480 { 481 return sinh_f32(val); 482 } 483 484 static inline float64_t sqrt(float64_t val) 485 { 486 return sqrt_f64(val); 487 } 488 489 static inline float32_t sqrtf(float32_t val) 490 { 491 return sqrt_f32(val); 492 } 493 494 static inline float64_t tan(float64_t val) 495 { 496 return tan_f64(val); 497 } 498 499 static inline float32_t tanf(float32_t val) 500 { 501 return tan_f32(val); 502 } 503 504 static inline float64_t tanh(float64_t val) 505 { 506 return tanh_f64(val); 507 } 508 509 static inline float32_t tanhf(float32_t val) 510 { 511 return tanh_f32(val); 217 512 } 218 513 -
uspace/lib/math/arch/ppc32/include/libarch/math.h
rba8eecf rb69786e 37 37 #define LIBMATH_ppc32_MATH_H_ 38 38 39 #include <acos.h> 40 #include <asin.h> 41 #include <atan.h> 42 #include <atan2.h> 39 43 #include <ceil.h> 44 #include <cosh.h> 40 45 #include <exp.h> 46 #include <fabs.h> 41 47 #include <floor.h> 48 #include <fmod.h> 49 #include <frexp.h> 50 #include <ldexp.h> 42 51 #include <log.h> 52 #include <log10.h> 43 53 #include <mathtypes.h> 44 #include <mod .h>54 #include <modf.h> 45 55 #include <pow.h> 56 #include <sinh.h> 57 #include <sqrt.h> 58 #include <tan.h> 59 #include <tanh.h> 60 #include <trig.h> 46 61 #include <trunc.h> 47 #include <trig.h> 62 63 #define HUGE_VAL FLOAT64_INF 64 65 static inline float64_t acos_f64(float64_t val) 66 { 67 return float64_acos(val); 68 } 69 70 static inline float32_t acos_f32(float32_t val) 71 { 72 return float32_acos(val); 73 } 74 75 static inline float64_t asin_f64(float64_t val) 76 { 77 return float64_asin(val); 78 } 79 80 static inline float32_t asin_f32(float32_t val) 81 { 82 return float32_asin(val); 83 } 84 85 static inline float64_t atan_f64(float64_t val) 86 { 87 return float64_atan(val); 88 } 89 90 static inline float32_t atan_f32(float32_t val) 91 { 92 return float32_atan(val); 93 } 94 95 static inline float64_t atan2_f64(float64_t y, float64_t x) 96 { 97 return float64_atan2(y, x); 98 } 99 100 static inline float32_t atan2_f32(float32_t y, float32_t x) 101 { 102 return float32_atan2(y, x); 103 } 48 104 49 105 static inline float64_t ceil_f64(float64_t val) … … 67 123 } 68 124 125 static inline float64_t cosh_f64(float64_t val) 126 { 127 return float64_cosh(val); 128 } 129 130 static inline float32_t cosh_f32(float32_t val) 131 { 132 return float32_cosh(val); 133 } 134 69 135 static inline float64_t exp_f64(float64_t val) 70 136 { … … 77 143 } 78 144 145 static inline float64_t fabs_f64(float64_t val) 146 { 147 return float64_fabs(val); 148 } 149 150 static inline float32_t fabs_f32(float32_t val) 151 { 152 return float32_fabs(val); 153 } 154 79 155 static inline float64_t floor_f64(float64_t val) 80 156 { … … 86 162 return float32_floor(val); 87 163 } 88 89 164 static inline float64_t fmod_f64(float64_t dividend, float64_t divisor) 90 165 { 91 return float64_ mod(dividend, divisor);166 return float64_fmod(dividend, divisor); 92 167 } 93 168 94 169 static inline float64_t fmod_f32(float32_t dividend, float32_t divisor) 95 170 { 96 return float32_mod(dividend, divisor); 171 return float32_fmod(dividend, divisor); 172 } 173 174 static inline float64_t frexp_f64(float64_t x, int *exp) 175 { 176 return float64_frexp(x, exp); 177 } 178 179 static inline float64_t frexp_f32(float32_t x, int *exp) 180 { 181 return float32_frexp(x, exp); 182 } 183 184 static inline float64_t ldexp_f64(float64_t x, int exp) 185 { 186 return float64_ldexp(x, exp); 187 } 188 189 static inline float64_t ldexp_f32(float32_t x, int exp) 190 { 191 return float32_ldexp(x, exp); 97 192 } 98 193 … … 107 202 } 108 203 204 static inline float64_t log10_f64(float64_t val) 205 { 206 return float64_log10(val); 207 } 208 209 static inline float32_t log10_f32(float32_t val) 210 { 211 return float32_log10(val); 212 } 213 214 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 215 { 216 return float64_modf(value, iptr); 217 } 218 219 static inline float64_t modf_f32(float32_t value, float32_t *iptr) 220 { 221 return float32_modf(value, iptr); 222 } 223 109 224 static inline float64_t pow_f64(float64_t x, float64_t y) 110 225 { … … 127 242 } 128 243 244 static inline float64_t sinh_f64(float64_t val) 245 { 246 return float64_sinh(val); 247 } 248 249 static inline float32_t sinh_f32(float32_t val) 250 { 251 return float32_sinh(val); 252 } 253 254 static inline float64_t sqrt_f64(float64_t val) 255 { 256 return float64_sqrt(val); 257 } 258 259 static inline float32_t sqrt_f32(float32_t val) 260 { 261 return float32_sqrt(val); 262 } 263 264 static inline float64_t tan_f64(float64_t val) 265 { 266 return float64_tan(val); 267 } 268 269 static inline float32_t tan_f32(float32_t val) 270 { 271 return float32_tan(val); 272 } 273 274 static inline float64_t tanh_f64(float64_t val) 275 { 276 return float64_tanh(val); 277 } 278 279 static inline float32_t tanh_f32(float32_t val) 280 { 281 return float32_tanh(val); 282 } 283 129 284 static inline float64_t trunc_f64(float64_t val) 130 285 { … … 137 292 } 138 293 294 static inline float64_t acos(float64_t val) 295 { 296 return acos_f64(val); 297 } 298 299 static inline float32_t acosf(float32_t val) 300 { 301 return acos_f32(val); 302 } 303 304 static inline float64_t asin(float64_t val) 305 { 306 return asin_f64(val); 307 } 308 309 static inline float32_t asinf(float32_t val) 310 { 311 return asin_f32(val); 312 } 313 314 static inline float64_t atan(float64_t val) 315 { 316 return atan_f64(val); 317 } 318 319 static inline float32_t atanf(float32_t val) 320 { 321 return atan_f32(val); 322 } 323 324 static inline float64_t atan2(float64_t y, float64_t x) 325 { 326 return atan2_f64(y, x); 327 } 328 329 static inline float32_t atan2f(float32_t y, float32_t x) 330 { 331 return atan2_f32(y, x); 332 } 333 139 334 static inline float64_t ceil(float64_t val) 140 335 { … … 157 352 } 158 353 354 static inline float64_t cosh(float64_t val) 355 { 356 return cosh_f64(val); 357 } 358 359 static inline float32_t coshf(float32_t val) 360 { 361 return cosh_f32(val); 362 } 363 159 364 static inline float64_t exp(float64_t val) 160 365 { … … 167 372 } 168 373 374 static inline float64_t fabs(float64_t val) 375 { 376 return fabs_f64(val); 377 } 378 379 static inline float32_t fabsf(float32_t val) 380 { 381 return fabs_f32(val); 382 } 383 169 384 static inline float64_t floor(float64_t val) 170 385 { … … 187 402 } 188 403 404 static inline float64_t frexp(float64_t x, int *exp) 405 { 406 return frexp_f64(x, exp); 407 } 408 409 static inline float32_t frexpf(float32_t x, int *exp) 410 { 411 return frexp_f32(x, exp); 412 } 413 414 static inline float64_t ldexp(float64_t x, int exp) 415 { 416 return ldexp_f64(x, exp); 417 } 418 419 static inline float32_t ldexpf(float32_t x, int exp) 420 { 421 return ldexp_f32(x, exp); 422 } 423 189 424 static inline float64_t log(float64_t val) 190 425 { … … 197 432 } 198 433 434 static inline float64_t log10(float64_t val) 435 { 436 return log10_f64(val); 437 } 438 439 static inline float32_t log10f(float32_t val) 440 { 441 return log10_f32(val); 442 } 443 444 static inline float64_t modf(float64_t value, float64_t *iptr) 445 { 446 return modf_f64(value, iptr); 447 } 448 449 static inline float32_t modff(float32_t value, float32_t *iptr) 450 { 451 return modf_f32(value, iptr); 452 } 453 199 454 static inline float64_t pow(float64_t x, float64_t y) 200 455 { … … 215 470 { 216 471 return sin_f32(val); 472 } 473 474 static inline float64_t sinh(float64_t val) 475 { 476 return sinh_f64(val); 477 } 478 479 static inline float32_t sinhf(float32_t val) 480 { 481 return sinh_f32(val); 482 } 483 484 static inline float64_t sqrt(float64_t val) 485 { 486 return sqrt_f64(val); 487 } 488 489 static inline float32_t sqrtf(float32_t val) 490 { 491 return sqrt_f32(val); 492 } 493 494 static inline float64_t tan(float64_t val) 495 { 496 return tan_f64(val); 497 } 498 499 static inline float32_t tanf(float32_t val) 500 { 501 return tan_f32(val); 502 } 503 504 static inline float64_t tanh(float64_t val) 505 { 506 return tanh_f64(val); 507 } 508 509 static inline float32_t tanhf(float32_t val) 510 { 511 return tanh_f32(val); 217 512 } 218 513 -
uspace/lib/math/arch/sparc32/include/libarch/math.h
rba8eecf rb69786e 37 37 #define LIBMATH_sparc32_MATH_H_ 38 38 39 #include <acos.h> 40 #include <asin.h> 41 #include <atan.h> 42 #include <atan2.h> 39 43 #include <ceil.h> 44 #include <cosh.h> 40 45 #include <exp.h> 46 #include <fabs.h> 41 47 #include <floor.h> 48 #include <fmod.h> 49 #include <frexp.h> 50 #include <ldexp.h> 42 51 #include <log.h> 52 #include <log10.h> 43 53 #include <mathtypes.h> 44 #include <mod .h>54 #include <modf.h> 45 55 #include <pow.h> 56 #include <sinh.h> 57 #include <sqrt.h> 58 #include <tan.h> 59 #include <tanh.h> 60 #include <trig.h> 46 61 #include <trunc.h> 47 #include <trig.h> 62 63 #define HUGE_VAL FLOAT64_INF 64 65 static inline float64_t acos_f64(float64_t val) 66 { 67 return float64_acos(val); 68 } 69 70 static inline float32_t acos_f32(float32_t val) 71 { 72 return float32_acos(val); 73 } 74 75 static inline float64_t asin_f64(float64_t val) 76 { 77 return float64_asin(val); 78 } 79 80 static inline float32_t asin_f32(float32_t val) 81 { 82 return float32_asin(val); 83 } 84 85 static inline float64_t atan_f64(float64_t val) 86 { 87 return float64_atan(val); 88 } 89 90 static inline float32_t atan_f32(float32_t val) 91 { 92 return float32_atan(val); 93 } 94 95 static inline float64_t atan2_f64(float64_t y, float64_t x) 96 { 97 return float64_atan2(y, x); 98 } 99 100 static inline float32_t atan2_f32(float32_t y, float32_t x) 101 { 102 return float32_atan2(y, x); 103 } 48 104 49 105 static inline float64_t ceil_f64(float64_t val) … … 67 123 } 68 124 125 static inline float64_t cosh_f64(float64_t val) 126 { 127 return float64_cosh(val); 128 } 129 130 static inline float32_t cosh_f32(float32_t val) 131 { 132 return float32_cosh(val); 133 } 134 69 135 static inline float64_t exp_f64(float64_t val) 70 136 { … … 77 143 } 78 144 145 static inline float64_t fabs_f64(float64_t val) 146 { 147 return float64_fabs(val); 148 } 149 150 static inline float32_t fabs_f32(float32_t val) 151 { 152 return float32_fabs(val); 153 } 154 79 155 static inline float64_t floor_f64(float64_t val) 80 156 { … … 86 162 return float32_floor(val); 87 163 } 88 89 164 static inline float64_t fmod_f64(float64_t dividend, float64_t divisor) 90 165 { 91 return float64_ mod(dividend, divisor);166 return float64_fmod(dividend, divisor); 92 167 } 93 168 94 169 static inline float64_t fmod_f32(float32_t dividend, float32_t divisor) 95 170 { 96 return float32_mod(dividend, divisor); 171 return float32_fmod(dividend, divisor); 172 } 173 174 static inline float64_t frexp_f64(float64_t x, int *exp) 175 { 176 return float64_frexp(x, exp); 177 } 178 179 static inline float64_t frexp_f32(float32_t x, int *exp) 180 { 181 return float32_frexp(x, exp); 182 } 183 184 static inline float64_t ldexp_f64(float64_t x, int exp) 185 { 186 return float64_ldexp(x, exp); 187 } 188 189 static inline float64_t ldexp_f32(float32_t x, int exp) 190 { 191 return float32_ldexp(x, exp); 97 192 } 98 193 … … 107 202 } 108 203 204 static inline float64_t log10_f64(float64_t val) 205 { 206 return float64_log10(val); 207 } 208 209 static inline float32_t log10_f32(float32_t val) 210 { 211 return float32_log10(val); 212 } 213 214 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 215 { 216 return float64_modf(value, iptr); 217 } 218 219 static inline float64_t modf_f32(float32_t value, float32_t *iptr) 220 { 221 return float32_modf(value, iptr); 222 } 223 109 224 static inline float64_t pow_f64(float64_t x, float64_t y) 110 225 { … … 127 242 } 128 243 244 static inline float64_t sinh_f64(float64_t val) 245 { 246 return float64_sinh(val); 247 } 248 249 static inline float32_t sinh_f32(float32_t val) 250 { 251 return float32_sinh(val); 252 } 253 254 static inline float64_t sqrt_f64(float64_t val) 255 { 256 return float64_sqrt(val); 257 } 258 259 static inline float32_t sqrt_f32(float32_t val) 260 { 261 return float32_sqrt(val); 262 } 263 264 static inline float64_t tan_f64(float64_t val) 265 { 266 return float64_tan(val); 267 } 268 269 static inline float32_t tan_f32(float32_t val) 270 { 271 return float32_tan(val); 272 } 273 274 static inline float64_t tanh_f64(float64_t val) 275 { 276 return float64_tanh(val); 277 } 278 279 static inline float32_t tanh_f32(float32_t val) 280 { 281 return float32_tanh(val); 282 } 283 129 284 static inline float64_t trunc_f64(float64_t val) 130 285 { … … 137 292 } 138 293 294 static inline float64_t acos(float64_t val) 295 { 296 return acos_f64(val); 297 } 298 299 static inline float32_t acosf(float32_t val) 300 { 301 return acos_f32(val); 302 } 303 304 static inline float64_t asin(float64_t val) 305 { 306 return asin_f64(val); 307 } 308 309 static inline float32_t asinf(float32_t val) 310 { 311 return asin_f32(val); 312 } 313 314 static inline float64_t atan(float64_t val) 315 { 316 return atan_f64(val); 317 } 318 319 static inline float32_t atanf(float32_t val) 320 { 321 return atan_f32(val); 322 } 323 324 static inline float64_t atan2(float64_t y, float64_t x) 325 { 326 return atan2_f64(y, x); 327 } 328 329 static inline float32_t atan2f(float32_t y, float32_t x) 330 { 331 return atan2_f32(y, x); 332 } 333 139 334 static inline float64_t ceil(float64_t val) 140 335 { … … 157 352 } 158 353 354 static inline float64_t cosh(float64_t val) 355 { 356 return cosh_f64(val); 357 } 358 359 static inline float32_t coshf(float32_t val) 360 { 361 return cosh_f32(val); 362 } 363 159 364 static inline float64_t exp(float64_t val) 160 365 { … … 167 372 } 168 373 374 static inline float64_t fabs(float64_t val) 375 { 376 return fabs_f64(val); 377 } 378 379 static inline float32_t fabsf(float32_t val) 380 { 381 return fabs_f32(val); 382 } 383 169 384 static inline float64_t floor(float64_t val) 170 385 { … … 187 402 } 188 403 404 static inline float64_t frexp(float64_t x, int *exp) 405 { 406 return frexp_f64(x, exp); 407 } 408 409 static inline float32_t frexpf(float32_t x, int *exp) 410 { 411 return frexp_f32(x, exp); 412 } 413 414 static inline float64_t ldexp(float64_t x, int exp) 415 { 416 return ldexp_f64(x, exp); 417 } 418 419 static inline float32_t ldexpf(float32_t x, int exp) 420 { 421 return ldexp_f32(x, exp); 422 } 423 189 424 static inline float64_t log(float64_t val) 190 425 { … … 197 432 } 198 433 434 static inline float64_t log10(float64_t val) 435 { 436 return log10_f64(val); 437 } 438 439 static inline float32_t log10f(float32_t val) 440 { 441 return log10_f32(val); 442 } 443 444 static inline float64_t modf(float64_t value, float64_t *iptr) 445 { 446 return modf_f64(value, iptr); 447 } 448 449 static inline float32_t modff(float32_t value, float32_t *iptr) 450 { 451 return modf_f32(value, iptr); 452 } 453 199 454 static inline float64_t pow(float64_t x, float64_t y) 200 455 { … … 215 470 { 216 471 return sin_f32(val); 472 } 473 474 static inline float64_t sinh(float64_t val) 475 { 476 return sinh_f64(val); 477 } 478 479 static inline float32_t sinhf(float32_t val) 480 { 481 return sinh_f32(val); 482 } 483 484 static inline float64_t sqrt(float64_t val) 485 { 486 return sqrt_f64(val); 487 } 488 489 static inline float32_t sqrtf(float32_t val) 490 { 491 return sqrt_f32(val); 492 } 493 494 static inline float64_t tan(float64_t val) 495 { 496 return tan_f64(val); 497 } 498 499 static inline float32_t tanf(float32_t val) 500 { 501 return tan_f32(val); 502 } 503 504 static inline float64_t tanh(float64_t val) 505 { 506 return tanh_f64(val); 507 } 508 509 static inline float32_t tanhf(float32_t val) 510 { 511 return tanh_f32(val); 217 512 } 218 513 -
uspace/lib/math/arch/sparc64/include/libarch/math.h
rba8eecf rb69786e 37 37 #define LIBMATH_sparc64_MATH_H_ 38 38 39 #include <acos.h> 40 #include <asin.h> 41 #include <atan.h> 42 #include <atan2.h> 39 43 #include <ceil.h> 44 #include <cosh.h> 40 45 #include <exp.h> 46 #include <fabs.h> 41 47 #include <floor.h> 48 #include <fmod.h> 49 #include <frexp.h> 50 #include <ldexp.h> 42 51 #include <log.h> 52 #include <log10.h> 43 53 #include <mathtypes.h> 44 #include <mod .h>54 #include <modf.h> 45 55 #include <pow.h> 56 #include <sinh.h> 57 #include <sqrt.h> 58 #include <tan.h> 59 #include <tanh.h> 60 #include <trig.h> 46 61 #include <trunc.h> 47 #include <trig.h> 62 63 #define HUGE_VAL FLOAT64_INF 64 65 static inline float64_t acos_f64(float64_t val) 66 { 67 return float64_acos(val); 68 } 69 70 static inline float32_t acos_f32(float32_t val) 71 { 72 return float32_acos(val); 73 } 74 75 static inline float64_t asin_f64(float64_t val) 76 { 77 return float64_asin(val); 78 } 79 80 static inline float32_t asin_f32(float32_t val) 81 { 82 return float32_asin(val); 83 } 84 85 static inline float64_t atan_f64(float64_t val) 86 { 87 return float64_atan(val); 88 } 89 90 static inline float32_t atan_f32(float32_t val) 91 { 92 return float32_atan(val); 93 } 94 95 static inline float64_t atan2_f64(float64_t y, float64_t x) 96 { 97 return float64_atan2(y, x); 98 } 99 100 static inline float32_t atan2_f32(float32_t y, float32_t x) 101 { 102 return float32_atan2(y, x); 103 } 48 104 49 105 static inline float64_t ceil_f64(float64_t val) … … 67 123 } 68 124 125 static inline float64_t cosh_f64(float64_t val) 126 { 127 return float64_cosh(val); 128 } 129 130 static inline float32_t cosh_f32(float32_t val) 131 { 132 return float32_cosh(val); 133 } 134 69 135 static inline float64_t exp_f64(float64_t val) 70 136 { … … 77 143 } 78 144 145 static inline float64_t fabs_f64(float64_t val) 146 { 147 return float64_fabs(val); 148 } 149 150 static inline float32_t fabs_f32(float32_t val) 151 { 152 return float32_fabs(val); 153 } 154 79 155 static inline float64_t floor_f64(float64_t val) 80 156 { … … 86 162 return float32_floor(val); 87 163 } 88 89 164 static inline float64_t fmod_f64(float64_t dividend, float64_t divisor) 90 165 { 91 return float64_ mod(dividend, divisor);166 return float64_fmod(dividend, divisor); 92 167 } 93 168 94 169 static inline float64_t fmod_f32(float32_t dividend, float32_t divisor) 95 170 { 96 return float32_mod(dividend, divisor); 171 return float32_fmod(dividend, divisor); 172 } 173 174 static inline float64_t frexp_f64(float64_t x, int *exp) 175 { 176 return float64_frexp(x, exp); 177 } 178 179 static inline float64_t frexp_f32(float32_t x, int *exp) 180 { 181 return float32_frexp(x, exp); 182 } 183 184 static inline float64_t ldexp_f64(float64_t x, int exp) 185 { 186 return float64_ldexp(x, exp); 187 } 188 189 static inline float64_t ldexp_f32(float32_t x, int exp) 190 { 191 return float32_ldexp(x, exp); 97 192 } 98 193 … … 107 202 } 108 203 204 static inline float64_t log10_f64(float64_t val) 205 { 206 return float64_log10(val); 207 } 208 209 static inline float32_t log10_f32(float32_t val) 210 { 211 return float32_log10(val); 212 } 213 214 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 215 { 216 return float64_modf(value, iptr); 217 } 218 219 static inline float64_t modf_f32(float32_t value, float32_t *iptr) 220 { 221 return float32_modf(value, iptr); 222 } 223 109 224 static inline float64_t pow_f64(float64_t x, float64_t y) 110 225 { … … 127 242 } 128 243 244 static inline float64_t sinh_f64(float64_t val) 245 { 246 return float64_sinh(val); 247 } 248 249 static inline float32_t sinh_f32(float32_t val) 250 { 251 return float32_sinh(val); 252 } 253 254 static inline float64_t sqrt_f64(float64_t val) 255 { 256 return float64_sqrt(val); 257 } 258 259 static inline float32_t sqrt_f32(float32_t val) 260 { 261 return float32_sqrt(val); 262 } 263 264 static inline float64_t tan_f64(float64_t val) 265 { 266 return float64_tan(val); 267 } 268 269 static inline float32_t tan_f32(float32_t val) 270 { 271 return float32_tan(val); 272 } 273 274 static inline float64_t tanh_f64(float64_t val) 275 { 276 return float64_tanh(val); 277 } 278 279 static inline float32_t tanh_f32(float32_t val) 280 { 281 return float32_tanh(val); 282 } 283 129 284 static inline float64_t trunc_f64(float64_t val) 130 285 { … … 137 292 } 138 293 294 static inline float64_t acos(float64_t val) 295 { 296 return acos_f64(val); 297 } 298 299 static inline float32_t acosf(float32_t val) 300 { 301 return acos_f32(val); 302 } 303 304 static inline float64_t asin(float64_t val) 305 { 306 return asin_f64(val); 307 } 308 309 static inline float32_t asinf(float32_t val) 310 { 311 return asin_f32(val); 312 } 313 314 static inline float64_t atan(float64_t val) 315 { 316 return atan_f64(val); 317 } 318 319 static inline float32_t atanf(float32_t val) 320 { 321 return atan_f32(val); 322 } 323 324 static inline float64_t atan2(float64_t y, float64_t x) 325 { 326 return atan2_f64(y, x); 327 } 328 329 static inline float32_t atan2f(float32_t y, float32_t x) 330 { 331 return atan2_f32(y, x); 332 } 333 139 334 static inline float64_t ceil(float64_t val) 140 335 { … … 157 352 } 158 353 354 static inline float64_t cosh(float64_t val) 355 { 356 return cosh_f64(val); 357 } 358 359 static inline float32_t coshf(float32_t val) 360 { 361 return cosh_f32(val); 362 } 363 159 364 static inline float64_t exp(float64_t val) 160 365 { … … 167 372 } 168 373 374 static inline float64_t fabs(float64_t val) 375 { 376 return fabs_f64(val); 377 } 378 379 static inline float32_t fabsf(float32_t val) 380 { 381 return fabs_f32(val); 382 } 383 169 384 static inline float64_t floor(float64_t val) 170 385 { … … 187 402 } 188 403 404 static inline float64_t frexp(float64_t x, int *exp) 405 { 406 return frexp_f64(x, exp); 407 } 408 409 static inline float32_t frexpf(float32_t x, int *exp) 410 { 411 return frexp_f32(x, exp); 412 } 413 414 static inline float64_t ldexp(float64_t x, int exp) 415 { 416 return ldexp_f64(x, exp); 417 } 418 419 static inline float32_t ldexpf(float32_t x, int exp) 420 { 421 return ldexp_f32(x, exp); 422 } 423 189 424 static inline float64_t log(float64_t val) 190 425 { … … 197 432 } 198 433 434 static inline float64_t log10(float64_t val) 435 { 436 return log10_f64(val); 437 } 438 439 static inline float32_t log10f(float32_t val) 440 { 441 return log10_f32(val); 442 } 443 444 static inline float64_t modf(float64_t value, float64_t *iptr) 445 { 446 return modf_f64(value, iptr); 447 } 448 449 static inline float32_t modff(float32_t value, float32_t *iptr) 450 { 451 return modf_f32(value, iptr); 452 } 453 199 454 static inline float64_t pow(float64_t x, float64_t y) 200 455 { … … 215 470 { 216 471 return sin_f32(val); 472 } 473 474 static inline float64_t sinh(float64_t val) 475 { 476 return sinh_f64(val); 477 } 478 479 static inline float32_t sinhf(float32_t val) 480 { 481 return sinh_f32(val); 482 } 483 484 static inline float64_t sqrt(float64_t val) 485 { 486 return sqrt_f64(val); 487 } 488 489 static inline float32_t sqrtf(float32_t val) 490 { 491 return sqrt_f32(val); 492 } 493 494 static inline float64_t tan(float64_t val) 495 { 496 return tan_f64(val); 497 } 498 499 static inline float32_t tanf(float32_t val) 500 { 501 return tan_f32(val); 502 } 503 504 static inline float64_t tanh(float64_t val) 505 { 506 return tanh_f64(val); 507 } 508 509 static inline float32_t tanhf(float32_t val) 510 { 511 return tanh_f32(val); 217 512 } 218 513 -
uspace/lib/math/generic/exp.c
rba8eecf rb69786e 36 36 #include <exp.h> 37 37 #include <math.h> 38 #include <trunc.h>39 38 40 39 #define TAYLOR_DEGREE_32 13 -
uspace/lib/math/generic/fmod.c
rba8eecf rb69786e 33 33 */ 34 34 35 #include <fmod.h> 35 36 #include <math.h> 36 #include <mod.h>37 37 38 38 /** Remainder function (32-bit floating point) … … 52 52 * 53 53 */ 54 float32_t float32_ mod(float32_t dividend, float32_t divisor)54 float32_t float32_fmod(float32_t dividend, float32_t divisor) 55 55 { 56 56 // FIXME: replace with exact arithmetics … … 77 77 * 78 78 */ 79 float64_t float64_ mod(float64_t dividend, float64_t divisor)79 float64_t float64_fmod(float64_t dividend, float64_t divisor) 80 80 { 81 81 // FIXME: replace with exact arithmetics -
uspace/lib/math/generic/pow.c
rba8eecf rb69786e 34 34 */ 35 35 36 #include <exp.h>37 #include <log.h>38 36 #include <math.h> 39 37 #include <pow.h> -
uspace/lib/math/include/fmod.h
rba8eecf rb69786e 33 33 */ 34 34 35 #ifndef LIBMATH_ MOD_H_36 #define LIBMATH_ MOD_H_35 #ifndef LIBMATH_FMOD_H_ 36 #define LIBMATH_FMOD_H_ 37 37 38 extern float32_t float32_mod(float32_t, float32_t); 39 extern float64_t float64_mod(float64_t, float64_t); 38 #include <mathtypes.h> 39 40 extern float32_t float32_fmod(float32_t, float32_t); 41 extern float64_t float64_fmod(float64_t, float64_t); 40 42 41 43 #endif -
uspace/lib/math/include/math.h
rba8eecf rb69786e 1 1 /* 2 2 * Copyright (c) 2011 Petr Koupy 3 * Copyright (c) 2015 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 38 39 #include <libarch/math.h> 39 40 41 #define M_LN10 2.30258509299404568402 40 42 #define M_LN2 0.69314718055994530942 41 43 #define M_LOG2E 1.4426950408889634074 42 44 #define M_PI 3.14159265358979323846 45 #define M_PI_2 1.57079632679489661923 43 46 44 47 #endif
Note:
See TracChangeset
for help on using the changeset viewer.