Paul Zimmermann writes: >> You might have more luck with lgammaf_r as that avoids use of >> _impure_ptr in newlib. > > thank you very much Keith, that made it. The results for lgammaf_r are > the same as those with OpenLibm and Musl: That isn't surprising; so many libraries math support can be traced back to the original SunPro code. Thanks much for doing this analysis; it's nice to see careful measurements of how accurate each of these C libraries is. Have you published the test framework so we can replicate these results and monitor their change over time? Do you know that newlib has two different sets of 32-bit math functions? Arm supplied a new set of many common math functions that use 64-bit doubles for the intermediate computations? I'd be very interested in measuring the effect of that code on accuracy. The new paths are selected by compiling newlib with -D__OBSOLETE_MATH_DEFAULT=0 while the old can be selected with -D__OBSOLETE_MATH_DEFAULT=1 -- -keith