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

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 3 23:06:09 PDT 2024


================
@@ -0,0 +1,312 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14
+// <cmath>
+
+// Tests std::hermite and its related functions:
+//    double      hermite( unsigned n, double      x);
+//    float       hermite( unsigned n, float       x);
+//    long double hermite( unsigned n, long double x);
+//    float       hermitef(unsigned n, float       x);
+//    long double hermitel(unsigned n, long double x);
+//    template <class Integer>
+//    double      hermite( unsigned n, Integer     x);
+
+#include <array>
+#include <cassert>
+#include <cmath>
+#include <limits>
+#include <vector>
+
+#include "type_algorithms.h"
+
+inline constexpr unsigned MAX_N = 128;
----------------
H-G-Hristov wrote:

```suggestion
constexpr unsigned MAX_N = 128;
```
Nit: `constexpr` implies `inline`.
https://eel.is/c++draft/dcl.constexpr#:constexpr
Usually we don't put an explicit `inline` on templates and `constexpr` for that matter.


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


More information about the libcxx-commits mailing list