Changeset e43d658 in mainline
- Timestamp:
- 2018-08-29T20:05:30Z (6 years ago)
- Children:
- b1b201f
- Parents:
- aab85d90
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-29 15:32:57)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-29 20:05:30)
- Location:
- uspace/lib/math
- Files:
-
- 28 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/math/Makefile
raab85d90 re43d658 30 30 ROOT_PATH = $(USPACE_PREFIX)/.. 31 31 32 CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config33 34 32 LIBRARY = libmath 35 33 SOVERSION = 0.0 36 34 37 EXTRA_CFLAGS += -Iarch/$(UARCH)/include 38 39 -include $(CONFIG_MAKEFILE) 40 -include arch/$(UARCH)/Makefile.inc 41 42 GENERIC_SOURCES = \ 35 SOURCES = \ 43 36 generic/acos.c \ 44 37 generic/asin.c \ … … 65 58 generic/trunc.c 66 59 67 SOURCES = \68 $(GENERIC_SOURCES) \69 $(ARCH_SOURCES)70 71 60 include $(USPACE_PREFIX)/Makefile.common -
uspace/lib/math/include/math.h
raab85d90 re43d658 37 37 #define LIBMATH_MATH_H_ 38 38 39 #include <libarch/math.h> 39 #include <acos.h> 40 #include <asin.h> 41 #include <atan.h> 42 #include <atan2.h> 43 #include <ceil.h> 44 #include <cosh.h> 45 #include <exp.h> 46 #include <fabs.h> 47 #include <floor.h> 48 #include <fmod.h> 49 #include <frexp.h> 50 #include <ldexp.h> 51 #include <log.h> 52 #include <log10.h> 53 #include <log2.h> 54 #include <mathtypes.h> 55 #include <modf.h> 56 #include <pow.h> 57 #include <sinh.h> 58 #include <sqrt.h> 59 #include <tan.h> 60 #include <tanh.h> 61 #include <trig.h> 62 #include <trunc.h> 63 64 #define HUGE_VAL FLOAT64_INF 65 66 static inline float64_t acos_f64(float64_t val) 67 { 68 return float64_acos(val); 69 } 70 71 static inline float32_t acos_f32(float32_t val) 72 { 73 return float32_acos(val); 74 } 75 76 static inline float64_t asin_f64(float64_t val) 77 { 78 return float64_asin(val); 79 } 80 81 static inline float32_t asin_f32(float32_t val) 82 { 83 return float32_asin(val); 84 } 85 86 static inline float64_t atan_f64(float64_t val) 87 { 88 return float64_atan(val); 89 } 90 91 static inline float32_t atan_f32(float32_t val) 92 { 93 return float32_atan(val); 94 } 95 96 static inline float64_t atan2_f64(float64_t y, float64_t x) 97 { 98 return float64_atan2(y, x); 99 } 100 101 static inline float32_t atan2_f32(float32_t y, float32_t x) 102 { 103 return float32_atan2(y, x); 104 } 105 106 static inline float64_t ceil_f64(float64_t val) 107 { 108 return float64_ceil(val); 109 } 110 111 static inline float32_t ceil_f32(float32_t val) 112 { 113 return float32_ceil(val); 114 } 115 116 static inline float64_t cos_f64(float64_t val) 117 { 118 return float64_cos(val); 119 } 120 121 static inline float32_t cos_f32(float32_t val) 122 { 123 return float32_cos(val); 124 } 125 126 static inline float64_t cosh_f64(float64_t val) 127 { 128 return float64_cosh(val); 129 } 130 131 static inline float32_t cosh_f32(float32_t val) 132 { 133 return float32_cosh(val); 134 } 135 136 static inline float64_t exp_f64(float64_t val) 137 { 138 return float64_exp(val); 139 } 140 141 static inline float32_t exp_f32(float32_t val) 142 { 143 return float32_exp(val); 144 } 145 146 static inline float64_t fabs_f64(float64_t val) 147 { 148 return float64_fabs(val); 149 } 150 151 static inline float32_t fabs_f32(float32_t val) 152 { 153 return float32_fabs(val); 154 } 155 156 static inline float64_t floor_f64(float64_t val) 157 { 158 return float64_floor(val); 159 } 160 161 static inline float32_t floor_f32(float32_t val) 162 { 163 return float32_floor(val); 164 } 165 static inline float64_t fmod_f64(float64_t dividend, float64_t divisor) 166 { 167 return float64_fmod(dividend, divisor); 168 } 169 170 static inline float64_t fmod_f32(float32_t dividend, float32_t divisor) 171 { 172 return float32_fmod(dividend, divisor); 173 } 174 175 static inline float64_t frexp_f64(float64_t x, int *exp) 176 { 177 return float64_frexp(x, exp); 178 } 179 180 static inline float64_t frexp_f32(float32_t x, int *exp) 181 { 182 return float32_frexp(x, exp); 183 } 184 185 static inline float64_t ldexp_f64(float64_t x, int exp) 186 { 187 return float64_ldexp(x, exp); 188 } 189 190 static inline float64_t ldexp_f32(float32_t x, int exp) 191 { 192 return float32_ldexp(x, exp); 193 } 194 195 static inline float64_t log_f64(float64_t val) 196 { 197 return float64_log(val); 198 } 199 200 static inline float32_t log_f32(float32_t val) 201 { 202 return float32_log(val); 203 } 204 205 static inline float64_t log10_f64(float64_t val) 206 { 207 return float64_log10(val); 208 } 209 210 static inline float32_t log10_f32(float32_t val) 211 { 212 return float32_log10(val); 213 } 214 215 static inline float32_t log2_f32(float32_t val) 216 { 217 return float32_log2(val); 218 } 219 220 static inline float64_t log2_f64(float64_t val) 221 { 222 return float64_log2(val); 223 } 224 225 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 226 { 227 return float64_modf(value, iptr); 228 } 229 230 static inline float64_t modf_f32(float32_t value, float32_t *iptr) 231 { 232 return float32_modf(value, iptr); 233 } 234 235 static inline float64_t pow_f64(float64_t x, float64_t y) 236 { 237 return float64_pow(x, y); 238 } 239 240 static inline float32_t pow_f32(float32_t x, float32_t y) 241 { 242 return float32_pow(x, y); 243 } 244 245 static inline float64_t sin_f64(float64_t val) 246 { 247 return float64_sin(val); 248 } 249 250 static inline float32_t sin_f32(float32_t val) 251 { 252 return float32_sin(val); 253 } 254 255 static inline float64_t sinh_f64(float64_t val) 256 { 257 return float64_sinh(val); 258 } 259 260 static inline float32_t sinh_f32(float32_t val) 261 { 262 return float32_sinh(val); 263 } 264 265 static inline float64_t sqrt_f64(float64_t val) 266 { 267 return float64_sqrt(val); 268 } 269 270 static inline float32_t sqrt_f32(float32_t val) 271 { 272 return float32_sqrt(val); 273 } 274 275 static inline float64_t tan_f64(float64_t val) 276 { 277 return float64_tan(val); 278 } 279 280 static inline float32_t tan_f32(float32_t val) 281 { 282 return float32_tan(val); 283 } 284 285 static inline float64_t tanh_f64(float64_t val) 286 { 287 return float64_tanh(val); 288 } 289 290 static inline float32_t tanh_f32(float32_t val) 291 { 292 return float32_tanh(val); 293 } 294 295 static inline float64_t trunc_f64(float64_t val) 296 { 297 return float64_trunc(val); 298 } 299 300 static inline float32_t trunc_f32(float32_t val) 301 { 302 return float32_trunc(val); 303 } 304 305 static inline float64_t acos(float64_t val) 306 { 307 return acos_f64(val); 308 } 309 310 static inline float32_t acosf(float32_t val) 311 { 312 return acos_f32(val); 313 } 314 315 static inline float64_t asin(float64_t val) 316 { 317 return asin_f64(val); 318 } 319 320 static inline float32_t asinf(float32_t val) 321 { 322 return asin_f32(val); 323 } 324 325 static inline float64_t atan(float64_t val) 326 { 327 return atan_f64(val); 328 } 329 330 static inline float32_t atanf(float32_t val) 331 { 332 return atan_f32(val); 333 } 334 335 static inline float64_t atan2(float64_t y, float64_t x) 336 { 337 return atan2_f64(y, x); 338 } 339 340 static inline float32_t atan2f(float32_t y, float32_t x) 341 { 342 return atan2_f32(y, x); 343 } 344 345 static inline float64_t ceil(float64_t val) 346 { 347 return ceil_f64(val); 348 } 349 350 static inline float32_t ceilf(float32_t val) 351 { 352 return ceil_f32(val); 353 } 354 355 static inline float64_t cos(float64_t val) 356 { 357 return cos_f64(val); 358 } 359 360 static inline float32_t cosf(float32_t val) 361 { 362 return cos_f32(val); 363 } 364 365 static inline float64_t cosh(float64_t val) 366 { 367 return cosh_f64(val); 368 } 369 370 static inline float32_t coshf(float32_t val) 371 { 372 return cosh_f32(val); 373 } 374 375 static inline float64_t exp(float64_t val) 376 { 377 return exp_f64(val); 378 } 379 380 static inline float32_t expf(float32_t val) 381 { 382 return exp_f32(val); 383 } 384 385 static inline float64_t fabs(float64_t val) 386 { 387 return fabs_f64(val); 388 } 389 390 static inline float32_t fabsf(float32_t val) 391 { 392 return fabs_f32(val); 393 } 394 395 static inline float64_t floor(float64_t val) 396 { 397 return floor_f64(val); 398 } 399 400 static inline float32_t floorf(float32_t val) 401 { 402 return floor_f32(val); 403 } 404 405 static inline float64_t fmod(float64_t dividend, float64_t divisor) 406 { 407 return fmod_f64(dividend, divisor); 408 } 409 410 static inline float32_t fmodf(float32_t dividend, float32_t divisor) 411 { 412 return fmod_f32(dividend, divisor); 413 } 414 415 static inline float64_t frexp(float64_t x, int *exp) 416 { 417 return frexp_f64(x, exp); 418 } 419 420 static inline float32_t frexpf(float32_t x, int *exp) 421 { 422 return frexp_f32(x, exp); 423 } 424 425 static inline float64_t ldexp(float64_t x, int exp) 426 { 427 return ldexp_f64(x, exp); 428 } 429 430 static inline float32_t ldexpf(float32_t x, int exp) 431 { 432 return ldexp_f32(x, exp); 433 } 434 435 static inline float64_t log(float64_t val) 436 { 437 return log_f64(val); 438 } 439 440 static inline float32_t logf(float32_t val) 441 { 442 return log_f32(val); 443 } 444 445 static inline float64_t log10(float64_t val) 446 { 447 return log10_f64(val); 448 } 449 450 static inline float32_t log10f(float32_t val) 451 { 452 return log10_f32(val); 453 } 454 455 static inline float64_t log2(float64_t val) 456 { 457 return log2_f64(val); 458 } 459 460 static inline float32_t log2f(float32_t val) 461 { 462 return log2_f32(val); 463 } 464 465 static inline float64_t modf(float64_t value, float64_t *iptr) 466 { 467 return modf_f64(value, iptr); 468 } 469 470 static inline float32_t modff(float32_t value, float32_t *iptr) 471 { 472 return modf_f32(value, iptr); 473 } 474 475 static inline float64_t pow(float64_t x, float64_t y) 476 { 477 return pow_f64(x, y); 478 } 479 480 static inline float32_t powf(float32_t x, float32_t y) 481 { 482 return pow_f32(x, y); 483 } 484 485 static inline float64_t sin(float64_t val) 486 { 487 return sin_f64(val); 488 } 489 490 static inline float32_t sinf(float32_t val) 491 { 492 return sin_f32(val); 493 } 494 495 static inline float64_t sinh(float64_t val) 496 { 497 return sinh_f64(val); 498 } 499 500 static inline float32_t sinhf(float32_t val) 501 { 502 return sinh_f32(val); 503 } 504 505 static inline float64_t sqrt(float64_t val) 506 { 507 return sqrt_f64(val); 508 } 509 510 static inline float32_t sqrtf(float32_t val) 511 { 512 return sqrt_f32(val); 513 } 514 515 static inline float64_t tan(float64_t val) 516 { 517 return tan_f64(val); 518 } 519 520 static inline float32_t tanf(float32_t val) 521 { 522 return tan_f32(val); 523 } 524 525 static inline float64_t tanh(float64_t val) 526 { 527 return tanh_f64(val); 528 } 529 530 static inline float32_t tanhf(float32_t val) 531 { 532 return tanh_f32(val); 533 } 534 535 static inline float64_t trunc(float64_t val) 536 { 537 return trunc_f64(val); 538 } 539 540 static inline float32_t truncf(float32_t val) 541 { 542 return trunc_f32(val); 543 } 40 544 41 545 #define M_LN10 2.30258509299404568402
Note:
See TracChangeset
for help on using the changeset viewer.