Changeset 802a8c8 in mainline
- Timestamp:
- 2018-07-16T11:27:30Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c45dc5e1
- Parents:
- 58daded
- git-author:
- Jiri Svoboda <jiri@…> (2018-07-16 06:27:08)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-07-16 11:27:30)
- Location:
- uspace
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/float/float2.c
r58daded r802a8c8 138 138 }; 139 139 140 static double results_log2[OPERANDS] = { 141 1.807354922058, 6.643856189775, 5.643856189775, 9.585555236434, 142 10.077483355524, 0.000000000000, 6.044394119358, 1.442695040889, 143 3.307428525192, -9.965784284662 144 }; 145 140 146 static double results_sin[OPERANDS] = { 141 147 -0.350783227690, -0.863209366649, -0.506365641110, -0.262374853704, … … 431 437 432 438 for (unsigned int i = 0; i < OPERANDS; i++) { 439 double res = log2(arguments_log[i]); 440 441 if (!cmp_double(res, results_log2[i])) { 442 TPRINTF("Double precision log2 failed " 443 "(%lf != %lf, arg %u)\n", res, results_log2[i], i); 444 fail = true; 445 } 446 } 447 448 for (unsigned int i = 0; i < OPERANDS; i++) { 449 float res = log2f(arguments_log[i]); 450 451 if (!cmp_float(res, results_log2[i])) { 452 TPRINTF("Single precision log2 failed " 453 "(%f != %lf, arg %u)\n", res, results_log2[i], i); 454 fail = true; 455 } 456 } 457 458 for (unsigned int i = 0; i < OPERANDS; i++) { 433 459 double res = sin(arguments[i]); 434 460 -
uspace/lib/math/Makefile
r58daded r802a8c8 55 55 generic/log.c \ 56 56 generic/log10.c \ 57 generic/log2.c \ 57 58 generic/modf.c \ 58 59 generic/pow.c \ -
uspace/lib/math/arch/abs32le/include/libarch/math.h
r58daded r802a8c8 51 51 #include <log.h> 52 52 #include <log10.h> 53 #include <log2.h> 53 54 #include <mathtypes.h> 54 55 #include <modf.h> … … 212 213 } 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 214 225 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 215 226 { … … 440 451 { 441 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); 442 463 } 443 464 -
uspace/lib/math/arch/amd64/include/libarch/math.h
r58daded r802a8c8 51 51 #include <log.h> 52 52 #include <log10.h> 53 #include <log2.h> 53 54 #include <mathtypes.h> 54 55 #include <modf.h> … … 209 210 } 210 211 212 static inline float32_t log2_f32(float32_t val) 213 { 214 return float32_log2(val); 215 } 216 217 static inline float64_t log2_f64(float64_t val) 218 { 219 return float64_log2(val); 220 } 221 211 222 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 212 223 { … … 431 442 { 432 443 return log10_f32(val); 444 } 445 446 static inline float64_t log2(float64_t val) 447 { 448 return log2_f64(val); 449 } 450 451 static inline float32_t log2f(float32_t val) 452 { 453 return log2_f32(val); 433 454 } 434 455 -
uspace/lib/math/arch/arm32/include/libarch/math.h
r58daded r802a8c8 51 51 #include <log.h> 52 52 #include <log10.h> 53 #include <log2.h> 53 54 #include <mathtypes.h> 54 55 #include <modf.h> … … 212 213 } 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 214 225 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 215 226 { … … 440 451 { 441 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); 442 463 } 443 464 -
uspace/lib/math/arch/ia32/include/libarch/math.h
r58daded r802a8c8 51 51 #include <log.h> 52 52 #include <log10.h> 53 #include <log2.h> 53 54 #include <mathtypes.h> 54 55 #include <modf.h> … … 209 210 } 210 211 212 static inline float32_t log2_f32(float32_t val) 213 { 214 return float32_log2(val); 215 } 216 217 static inline float64_t log2_f64(float64_t val) 218 { 219 return float64_log2(val); 220 } 221 211 222 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 212 223 { … … 431 442 { 432 443 return log10_f32(val); 444 } 445 446 static inline float64_t log2(float64_t val) 447 { 448 return log2_f64(val); 449 } 450 451 static inline float32_t log2f(float32_t val) 452 { 453 return log2_f32(val); 433 454 } 434 455 -
uspace/lib/math/arch/ia64/include/libarch/math.h
r58daded r802a8c8 51 51 #include <log.h> 52 52 #include <log10.h> 53 #include <log2.h> 53 54 #include <mathtypes.h> 54 55 #include <modf.h> … … 212 213 } 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 214 225 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 215 226 { … … 440 451 { 441 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); 442 463 } 443 464 -
uspace/lib/math/arch/mips32/include/libarch/math.h
r58daded r802a8c8 51 51 #include <log.h> 52 52 #include <log10.h> 53 #include <log2.h> 53 54 #include <mathtypes.h> 54 55 #include <modf.h> … … 212 213 } 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 214 225 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 215 226 { … … 440 451 { 441 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); 442 463 } 443 464 -
uspace/lib/math/arch/mips32eb/include/libarch/math.h
r58daded r802a8c8 51 51 #include <log.h> 52 52 #include <log10.h> 53 #include <log2.h> 53 54 #include <mathtypes.h> 54 55 #include <modf.h> … … 212 213 } 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 214 225 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 215 226 { … … 440 451 { 441 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); 442 463 } 443 464 -
uspace/lib/math/arch/ppc32/include/libarch/math.h
r58daded r802a8c8 51 51 #include <log.h> 52 52 #include <log10.h> 53 #include <log2.h> 53 54 #include <mathtypes.h> 54 55 #include <modf.h> … … 212 213 } 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 214 225 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 215 226 { … … 440 451 { 441 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); 442 463 } 443 464 -
uspace/lib/math/arch/riscv64/include/libarch/math.h
r58daded r802a8c8 50 50 #include <log.h> 51 51 #include <log10.h> 52 #include <log2.h> 52 53 #include <mathtypes.h> 53 54 #include <modf.h> … … 211 212 } 212 213 214 static inline float32_t log2_f32(float32_t val) 215 { 216 return float32_log2(val); 217 } 218 219 static inline float64_t log2_f64(float64_t val) 220 { 221 return float64_log2(val); 222 } 223 213 224 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 214 225 { … … 439 450 { 440 451 return log10_f32(val); 452 } 453 454 static inline float64_t log2(float64_t val) 455 { 456 return log2_f64(val); 457 } 458 459 static inline float32_t log2f(float32_t val) 460 { 461 return log2_f32(val); 441 462 } 442 463 -
uspace/lib/math/arch/sparc64/include/libarch/math.h
r58daded r802a8c8 51 51 #include <log.h> 52 52 #include <log10.h> 53 #include <log2.h> 53 54 #include <mathtypes.h> 54 55 #include <modf.h> … … 212 213 } 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 214 225 static inline float64_t modf_f64(float64_t value, float64_t *iptr) 215 226 { … … 440 451 { 441 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); 442 463 } 443 464
Note:
See TracChangeset
for help on using the changeset viewer.