Changeset b69786e in mainline for uspace/lib/math/arch/mips32/include/libarch/math.h
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.