Changeset bbdca54 in mainline
- Timestamp:
- 2018-08-30T19:44:44Z (6 years ago)
- Parents:
- 3b814c3a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/math/test/rounding.c
r3b814c3a rbbdca54 35 35 PCUT_TEST_SUITE(rounding); 36 36 37 static inline uint32_t fint(float x) { 37 static inline uint32_t fint(float x) 38 { 38 39 union { 39 40 float f; … … 43 44 } 44 45 45 static inline uint64_t dint(double x) { 46 static inline uint64_t dint(double x) 47 { 46 48 union { 47 49 double f; … … 1108 1110 }; 1109 1111 1110 #if 01111 static double double_arguments[DOUBLE_CASES] = {1112 0.0000000000000p01113 };1114 1115 static double double_results_trunc[DOUBLE_CASES] = {1116 };1117 #endif1118 1119 1112 PCUT_TEST(identity) 1120 1113 { … … 1145 1138 uint64_t f2 = dint(float_results_trunc[i]); 1146 1139 if (f1 != f2) { 1147 PCUT_ASSERTION_FAILED("case %d: 0x%016" PRIx64" != 0x%016"PRIx64"\n", i, f1, f2);1140 PCUT_ASSERTION_FAILED("case %d: 0x%016" PRIx64 " != 0x%016" PRIx64 "\n", i, f1, f2); 1148 1141 } 1149 1142 } … … 1169 1162 uint64_t f2 = dint(float_results_round[i]); 1170 1163 if (f1 != f2) { 1171 PCUT_ASSERTION_FAILED("case %d: 0x%016" PRIx64" != 0x%016"PRIx64"\n", i, f1, f2);1164 PCUT_ASSERTION_FAILED("case %d: 0x%016" PRIx64 " != 0x%016" PRIx64 "\n", i, f1, f2); 1172 1165 } 1173 1166 } … … 1197 1190 uint64_t f2 = dint(float_results_nearbyint[i]); 1198 1191 if (f1 != f2) { 1199 PCUT_ASSERTION_FAILED("case %d: 0x%016" PRIx64" != 0x%016"PRIx64"\n", i, f1, f2);1192 PCUT_ASSERTION_FAILED("case %d: 0x%016" PRIx64 " != 0x%016" PRIx64 "\n", i, f1, f2); 1200 1193 } 1201 1194 }
Note:
See TracChangeset
for help on using the changeset viewer.