[libcxx-commits] [libcxx] [llvm] [libc++][math][c++17] P0226R1 - Mathematical Special Functions: infra + `std::assoc_laguerre` (PR #205649)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Thu Aug 6 04:23:21 PDT 2026


================
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <cmath>
+//
+// [sf.cmath.assoc.laguerre], associated Laguerre polynomials
+// float               assoc_laguerref(unsigned n, unsigned m, float x);
+
+#include <cassert>
+#include <cmath>
+
+int main() {
+  // Single value tested against known solution.
+  // Note, underlying Boost.Math is itself well-tested.
----------------
H-G-Hristov wrote:

The original commenter above and me are one and the same. So to continue the discussion:

> @Zingam I just pushed it (had it locally but uncommitted). See [a47f9e9](https://github.com/llvm/llvm-project/commit/a47f9e902e5c427c84115f4af119eedf8778e182) . It is mostly taken 1-to-1 from the Phabricator issue. Do you think we should add more tests?

I will leave this answer to more competent people than me but I can make comments on general libc++ practices I think.
In that context: IMO even if internally we use Boost or whatever to wrap the implementation we still need a certain amount of tests to prove that we have a viable implementation. AFAIK The reason to choose Boost was the lack of experts not just capable of implementing these functions once but maintaining those but that doesn't exclude the option to implement them ourselves some day. What the minimal tests should be you probably know better than me. I think this need to be discussed and decided (I am not aware of such discussions).



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


More information about the libcxx-commits mailing list