[libcxx-commits] [libcxx] [libc++][math] Mathematical Special Functions: Hermite Polynomial (PR #89982)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 16 04:57:53 PDT 2024


PaulXiCao wrote:

> Should the documentation record the known error in ulps of the computed result? See, for comparison, https://libc.llvm.org/math/index.html .

The cited page lists functions (e.g. `sin`) vs input type (e.g. `float`) and their correctness, i.e. errors counted in ULP for each rounding mode.

For any non-trivial implementation this is mostly calculated by comparing the result with a reference implementation, e.g. an implementation using larger floating-point types or a multi-precision library.

This worst-case analysis only holds any meaning for well chosen sample points. We would need to decide what a common input range is.

All of this is quite tedious and complicated. Which is why it probably has not been done for most of the "Higher Math Functions" in libc? (The table is almost empty.)

A plain documentation by creating a similar table for the "Mathematical Special Functions" only filled with "N/A" does not yield any benefit from my point of view.

https://github.com/llvm/llvm-project/pull/89982


More information about the libcxx-commits mailing list