Re: [PATCH 0/3] Fix powf inaccuracies up to ~169 ULP reported by Paul Zimmermann
Paul Zimmermann <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
Hi Brian, > > $ gcc test_printf.c /localdisk/zimmerma/newlib-4.4.0.20231231/build/x86_64/newlib/libm.a > > $ ./a.out > > x=0.9694811147877118 upward:0.969481 > > > > Is that a known issue? > > Is that not only a requirement of IEEE arithmetic operations? > Is that also an expected requirement of *printf? the C standard [1] writes on page 511: 15 The binding for the convertFormat operation applies to all conversions among IEC 60559 formats. Therefore, for implementations that conform to Annex F, conversions between decimal floating types and standard floating types with IEC 60559 formats are correctly rounded and raise floating-point exceptions as specified in IEC 60559. Paul [1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf