Changeset 992ffa6 in mainline for uspace/lib/math/generic/trig.c
- Timestamp:
- 2015-09-04T06:40:20Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 01cdd5a
- Parents:
- bae1e1f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/math/generic/trig.c
rbae1e1f r992ffa6 36 36 #include <trig.h> 37 37 38 #define TAYLOR_DEGREE 13 38 #define TAYLOR_DEGREE_32 13 39 #define TAYLOR_DEGREE_64 21 39 40 40 41 /** Precomputed values for factorial (starting from 1!) */ 41 static float64_t factorials[TAYLOR_DEGREE ] = {42 static float64_t factorials[TAYLOR_DEGREE_64] = { 42 43 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 43 479001600, 6227020800 44 479001600, 6227020800.0L, 87178291200.0L, 1307674368000.0L, 45 20922789888000.0L, 355687428096000.0L, 6402373705728000.0L, 46 121645100408832000.0L, 2432902008176640000.0L, 51090942171709440000.0L 44 47 }; 45 48 … … 61 64 float64_t nom = 1; 62 65 63 for (unsigned int i = 0; i < TAYLOR_DEGREE ; i++) {66 for (unsigned int i = 0; i < TAYLOR_DEGREE_64; i++) { 64 67 nom *= arg; 65 68 … … 90 93 float64_t nom = 1; 91 94 92 for (unsigned int i = 0; i < TAYLOR_DEGREE ; i++) {95 for (unsigned int i = 0; i < TAYLOR_DEGREE_64; i++) { 93 96 nom *= arg; 94 97
Note:
See TracChangeset
for help on using the changeset viewer.