Changeset b2acdf32 in mainline for uspace/app/tester/float/float2.c
- Timestamp:
- 2018-08-29T20:05:52Z (7 years ago)
- Children:
- 184ff675
- Parents:
- b1b201f
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-29 15:48:16)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-29 20:05:52)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/float/float2.c
rb1b201f rb2acdf32 43 43 }; 44 44 45 static double arguments_atan[OPERANDS] = {46 3.5, 100.0, 50.0, 768.3156, 1080.499999, 1.0, 66.0,47 2.718281828459045, 9.9, 0.00148 };49 50 45 static double arguments_exp[OPERANDS] = { 51 46 3.5, -2.1, 50.0, 0.0, 1.0, 13.2, -1.1, -5.5, 0.1, -66.0 … … 64 59 static double arguments_tanh[OPERANDS] = { 65 60 3.5, -2.1, 50.0, 0.0, 1.0, 13.2, -1.1, -5.5, 0.000001, -66000000.0 66 };67 68 static double results_atan[OPERANDS] = {69 1.292496667790, 1.560796660108, 1.550798992822, 1.569494779052,70 1.569870829603, 0.785398163397, 1.555645970920, 1.218282905017,71 1.470127674637, 0.00099999966772 61 }; 73 62 … … 193 182 194 183 for (unsigned int i = 0; i < OPERANDS; i++) { 195 double res = atan(arguments_atan[i]);196 197 if (!cmp_double(res, results_atan[i])) {198 TPRINTF("Double precision atan failed "199 "(%.12lf != %.12lf, arg %u)\n", res, results_atan[i], i);200 fail = true;201 }202 }203 204 for (unsigned int i = 0; i < OPERANDS; i++) {205 float res = atanf(arguments_atan[i]);206 207 if (!cmp_float(res, results_atan[i])) {208 TPRINTF("Single precision atan failed "209 "(%f != %lf, arg %u)\n", res, results_atan[i], i);210 fail = true;211 }212 }213 214 for (unsigned int i = 0; i < OPERANDS; i++) {215 184 double res = ceil(arguments[i]); 216 185
Note:
See TracChangeset
for help on using the changeset viewer.