[libc][math] Add float-only versions for `inv_trigf_utils.h`
Currently, the inverse trig utility functions in libc/src/__support/math/inv_trigf_utils.h perform all intermediate computations in double precision. This is inefficient for float16 and bfloat16 math functions.
We should provide float-only versions for inv_trigf_utils.h so that float16 and bfloat16 functions can use them efficiently.
This is a tracking-issue for the same
@llvm/issue-subscribers-libc
Author: Zorojuro (Sukumarsawant)
We should provide float-only versions for inv_trigf_utils.h so that float16 and bfloat16 functions can use them efficiently.
This is a tracking-issue for the same
@Sukumarsawant Hi, is anyone currently working on this issue? If not, I’d like to take it on.
I checked the latest code and noticed that inv_trigf_utils.h no longer exists; the relevant helpers now live in files such as asin_utils.h and atan_utils.h. Some functions, including asinf16 and atanbf16, already use float-only polynomial evaluations, while asinbf16 and acosbf16 still call the double-precision asin_eval helper.
I’d like to start by adding a float-only helper for asinbf16 and acosbf16, validating accuracy across rounding modes, and measuring the performance impact. Would this be a reasonable initial scope?
sure, assigned .