[libc-commits] [PATCH] D115828: [libc] Implement correctly rounded log2f based on RLIBM library.

Paul Zimmermann via libc-commits libc-commits at lists.llvm.org
Tue Dec 21 00:14:20 PST 2021


       Dear Santosh,

> Yes, it has a non-zero constant term because it generates the correctly rounded round-to-odd result for a 34-bit floating point. When this is rounded to any FP representation with the 8 exponent bits and for any rounding mode in the standard, it produces the correctly rounded result. 
> Here is our paper describing the result: https://people.cs.rutgers.edu/~sn349/papers/rlibmall-popl-2022.pdf
> 
> We plugged this polynomial locally in our infrastructure which uses the same range reduction and the same quintic polynomial evaluation, it produces correctly rounded results for all inputs and all inputs.  Are you observing that it is not producing the correct result for some inputs?

sorry I was not clear enough: can you generate with RLIBM a degree-5
polynomial with double coefficients and a zero constant term that you can
plug into the llvm-libc infrastructure (lines 131-132 of the current
patch) and which produces correct-rounding for all rounding modes (like
the polynomial generated by Sollya which I gave above).

Best regards,
Paul


More information about the libc-commits mailing list