llvm-project
b47ea968 - [libc][math] correct the output of `asinpif` and `acospi` (#185544)

Commit
49 days ago
[libc][math] correct the output of `asinpif` and `acospi` (#185544) Currently, we have accuracy issues and some points fail in the asinpif exhaustive test. This change fixes it by increasing the degree of the used polynomial ``` -- Testing for FE_TONEAREST in range [0x0, 0x7f800000) -- Failed to match Func(x) against LIBC_NAMESPACE::testing::mpfr::get_mpfr_matcher<Op>( x, Func(x), 0.5, rounding). Match value not within tolerance value of MPFR result: Input decimal: 0.00000011348398487598387873731553554534912109375000 Input bits: 0x33F3B47B = (S: 0, E: 0x0067, M: 0x0073B47B) Match decimal: 0.00000003612307253320068411994725465774536132812500 Match bits: 0x331B25BD = (S: 0, E: 0x0066, M: 0x001B25BD) MPFR result: 0.00000003612307608591436292044818401336669921875000 MPFR rounded: 0x331B25BE = (S: 0, E: 0x0066, M: 0x001B25BE) ULP error: 1.00000000000000000000000000000000000000000000000000 Test failed for 1 inputs in range: 871366656 to 872415232 [0x33f00000, 0x34000000), [0x1.ep-24, 0x1p-23) Match value not within tolerance value of MPFR result: Input decimal: 0.00000356030955117603298276662826538085937500000000 Input bits: 0x366EEDA7 = (S: 0, E: 0x006C, M: 0x006EEDA7) Match decimal: 0.00000113328167117288103327155113220214843750000000 Match bits: 0x35981B43 = (S: 0, E: 0x006B, M: 0x00181B43) MPFR result: 0.00000113328178485971875488758087158203125000000000 MPFR rounded: 0x35981B44 = (S: 0, E: 0x006B, M: 0x00181B44) ULP error: 1.00000000000000000000000000000000000000000000000000 Test failed for 1 inputs in range: 912261120 to 913309696 [0x36600000, 0x36700000), [0x1.cp-19, 0x1.ep-19) Match value not within tolerance value of MPFR result: Input decimal: -0.00000011348398487598387873731553554534912109375000 Input bits: 0xB3F3B47B = (S: 1, E: 0x0067, M: 0x0073B47B) Match decimal: -0.00000003612307253320068411994725465774536132812500 Match bits: 0xB31B25BD = (S: 1, E: 0x0066, M: 0x001B25BD) MPFR result: -0.00000003612307608591436292044818401336669921875000 MPFR rounded: 0xB31B25BE = (S: 1, E: 0x0066, M: 0x001B25BE) ULP error: 1.00000000000000000000000000000000000000000000000000 Test failed for 1 inputs in range: 3018850304 to 3019898880 [0xb3f00000, 0xb4000000), [-0x1.ep-24, -0x1p-23) Match value not within tolerance value of MPFR result: Input decimal: -0.00000356030955117603298276662826538085937500000000 Input bits: 0xB66EEDA7 = (S: 1, E: 0x006C, M: 0x006EEDA7) Match decimal: -0.00000113328167117288103327155113220214843750000000 Match bits: 0xB5981B43 = (S: 1, E: 0x006B, M: 0x00181B43) MPFR result: -0.00000113328178485971875488758087158203125000000000 MPFR rounded: 0xB5981B44 = (S: 1, E: 0x006B, M: 0x00181B44) ULP error: 1.00000000000000000000000000000000000000000000000000 Test failed for 1 inputs in range: 3059744768 to 3060793344 [0xb6600000, 0xb6700000), [-0x1.cp-19, -0x1.ep-19) ```
Author
Parents
Loading