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

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sat May 4 04:57:54 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;
----------------
mordante wrote:

This is not a function or a static data member, so it's not implicit `inline`.

For templates we use both with and without `inline` and there is not strong preference.

For functions some people have a strong preference to use `inline constexpr`; and the `inline` is redundant.

Typically we don't use capitalized constants.

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


More information about the libcxx-commits mailing list