tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
erf.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2021 Tobias Hienzsch
3
4#ifndef TETL_CMATH_ERF_HPP
5#define TETL_CMATH_ERF_HPP
6
7#include <etl/_3rd_party/gcem/gcem.hpp>
8#include <etl/_concepts/integral.hpp>
9
10namespace etl {
11
12/// \ingroup cmath
13/// @{
14
15/// Computes the error function of arg.
16/// \details https://en.cppreference.com/w/cpp/numeric/math/erf
17[[nodiscard]] constexpr auto erf(float arg) noexcept -> float
18{
19 return etl::detail::gcem::erf(arg);
20}
21[[nodiscard]] constexpr auto erff(float arg) noexcept -> float
22{
23 return etl::detail::gcem::erf(arg);
24}
25[[nodiscard]] constexpr auto erf(double arg) noexcept -> double
26{
27 return etl::detail::gcem::erf(arg);
28}
29[[nodiscard]] constexpr auto erf(long double arg) noexcept -> long double
30{
31 return etl::detail::gcem::erf(arg);
32}
33[[nodiscard]] constexpr auto erfl(long double arg) noexcept -> long double
34{
35 return etl::detail::gcem::erf(arg);
36}
37[[nodiscard]] constexpr auto erf(integral auto arg) noexcept -> double
38{
39 return etl::detail::gcem::erf(double(arg));
40}
41
42/// @}
43
44} // namespace etl
45
46#endif // TETL_CMATH_ERF_HPP
constexpr auto erf(float arg) noexcept -> float
Definition erf.hpp:17
constexpr auto erf(double arg) noexcept -> double
Definition erf.hpp:25
constexpr auto erff(float arg) noexcept -> float
Definition erf.hpp:21
constexpr auto erf(long double arg) noexcept -> long double
Definition erf.hpp:29
constexpr auto erfl(long double arg) noexcept -> long double
Definition erf.hpp:33
Definition adjacent_find.hpp:9