[libc-commits] [PATCH] D115828: [libc] Implement correctly rounded log2f based on RLIBM library.
Santosh Nagarakatte via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Dec 20 07:12:50 PST 2021
santoshn added a comment.
Dear Paul,
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?
Thanks,
Santosh
In D115828#3202691 <https://reviews.llvm.org/D115828#3202691>, @zimmermann6 wrote:
> Dear Santosh,
>
> this polynomial has a non-zero constant term, unlike the polynomial used in
> this patch, and the one produced by Sollya. How can it fit the current
> framework (see below)?
>
> double r = __llvm_libc::fputil::polyeval(
> d, extra_factor, 0x1.71547652c2801p+0, -0x1.715476ec167eep-1,
> 0x1.ec72eb4428a1ap-2, -0x1.72fd9daa7714fp-2, 0x1.8be682a823a9bp-2);
>
> Best regards,
> Paul
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115828/new/
https://reviews.llvm.org/D115828
More information about the libc-commits
mailing list