[libcxx-commits] [libcxx] [llvm] [libc++][math][c++17] P0226R1 - Mathematical Special Functions: infra + `std::assoc_laguerre` (PR #205649)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Sep 12 14:58:02 PDT 2026
================
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: std-at-least-c++17
+
+// These functions are implemented in the built library, so a program using them fails to
----------------
PaulXiCao wrote:
Yeah, good point. I'll update `ImplementationDefinedBehavior.rst`.
About the contract: The idea is not that "we support -ffast-math" but rather that we always set errno and fenv on errors - regardless of user's TU flags.
glibc's libm behaves the same way.
One real limit: `-ffinite-math-only` (implied by `-ffast-math`) makes it UB for the caller to use the NaN or infinity we return (e.g. on domain errors which can happen for finite input). The guarantee is about what the library writes, not about what the caller may then legally do with it.
Happy to drop the test/libcxx/numerics/c.math/sf.cmath/assoc_laguerre.error_reporting.fast_math.pass.cpp test if you'd prefer.
https://github.com/llvm/llvm-project/pull/205649
More information about the libcxx-commits
mailing list