Changeset 9adb61d in mainline for uspace/lib/math/generic/exp.c
- Timestamp:
- 2015-09-05T11:50:00Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 996dc042, ba8eecf
- Parents:
- e6f5766
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/math/generic/exp.c
re6f5766 r9adb61d 49 49 }; 50 50 51 /** Exponential approximation by Taylor series (32- ))51 /** Exponential approximation by Taylor series (32-bit floating point) 52 52 * 53 53 * Compute the approximation of exponential by a Taylor … … 61 61 * 62 62 */ 63 static float 64_t taylor_exp_32(float64_t arg)63 static float32_t taylor_exp_32(float32_t arg) 64 64 { 65 float 64_t ret = 1;66 float 64_t nom = 1;65 float32_t ret = 1; 66 float32_t nom = 1; 67 67 68 68 for (unsigned int i = 0; i < TAYLOR_DEGREE_32; i++) { … … 74 74 } 75 75 76 /** Exponential approximation by Taylor series 76 /** Exponential approximation by Taylor series (64-bit floating point) 77 77 * 78 78 * Compute the approximation of exponential by a Taylor … … 99 99 } 100 100 101 /** Single precision exponential101 /** Exponential (32-bit floating point) 102 102 * 103 103 * Compute exponential value. … … 121 121 */ 122 122 123 i = float32_trunc(arg * M_LOG2E);123 i = trunc_f32(arg * M_LOG2E); 124 124 f = arg * M_LOG2E - i; 125 125 … … 129 129 } 130 130 131 /** Double precision exponential131 /** Exponential (64-bit floating point) 132 132 * 133 133 * Compute exponential value. … … 151 151 */ 152 152 153 i = float64_trunc(arg * M_LOG2E);153 i = trunc_f64(arg * M_LOG2E); 154 154 f = arg * M_LOG2E - i; 155 155
Note:
See TracChangeset
for help on using the changeset viewer.