[libc-commits] [libc] [libc][math][c23] Add exp2m1f C23 math function (PR #86996)
via libc-commits
libc-commits at lists.llvm.org
Fri Mar 29 14:47:07 PDT 2024
lntue wrote:
> `mpfr_exp2m1` isn't available in the CI environment.
>
> It seems to have been added in MPFR 4.2.0: https://gitlab.inria.fr/mpfr/mpfr/-/commit/78f1866613ca67b801ce4c17f103e2bc1e576fc1.
>
> I don't know what OS the CI runs but MPFR >= 4.2.0 isn't available on any Ubuntu LTS release: https://packages.ubuntu.com/search?suite=default§ion=all&arch=any&keywords=libmpfr-dev&searchon=names.
>
> Should I add `#if` guards using `MPFR_VERSION_MAJOR` and `MPFR_VERSION_MINOR` for now?
You can implement `mpfr_exp2m1` manually using `mpfr_exp2` and maybe using `precision * 3` for the intermediate computations. And then add a TODO comment to switch to use `mpfr_exp2m1` once MPFR 4.2.0 is available in all the bots.
https://github.com/llvm/llvm-project/pull/86996
More information about the libc-commits
mailing list