tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
sinh.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_SINH_HPP
5#define TETL_CMATH_SINH_HPP
6
7#include <etl/_3rd_party/gcem/gcem.hpp>
8#include <etl/_concepts/integral.hpp>
9
10namespace etl {
11
12/// Computes the hyperbolic sine of arg
13/// \details https://en.cppreference.com/w/cpp/numeric/math/sinh
14/// \ingroup cmath
15[[nodiscard]] constexpr auto sinh(float arg) noexcept -> float
16{
17 return etl::detail::gcem::sinh(arg);
18}
19
20/// Computes the hyperbolic sine of arg
21/// \details https://en.cppreference.com/w/cpp/numeric/math/sinh
22/// \ingroup cmath
23[[nodiscard]] constexpr auto sinhf(float arg) noexcept -> float
24{
25 return etl::detail::gcem::sinh(arg);
26}
27
28/// Computes the hyperbolic sine of arg
29/// \details https://en.cppreference.com/w/cpp/numeric/math/sinh
30/// \ingroup cmath
31[[nodiscard]] constexpr auto sinh(double arg) noexcept -> double
32{
33 return etl::detail::gcem::sinh(arg);
34}
35
36/// Computes the hyperbolic sine of arg
37/// \details https://en.cppreference.com/w/cpp/numeric/math/sinh
38/// \ingroup cmath
39[[nodiscard]] constexpr auto sinh(long double arg) noexcept -> long double
40{
41 return etl::detail::gcem::sinh(arg);
42}
43
44/// Computes the hyperbolic sine of arg
45/// \details https://en.cppreference.com/w/cpp/numeric/math/sinh
46/// \ingroup cmath
47[[nodiscard]] constexpr auto sinhl(long double arg) noexcept -> long double
48{
49 return etl::detail::gcem::sinh(arg);
50}
51
52/// Computes the hyperbolic sine of arg
53/// \details https://en.cppreference.com/w/cpp/numeric/math/sinh
54/// \ingroup cmath
55template <integral T>
56[[nodiscard]] constexpr auto sinh(T arg) noexcept -> double
57{
58 return etl::detail::gcem::sinh(static_cast<double>(arg));
59}
60
61} // namespace etl
62
63#endif // TETL_CMATH_SINH_HPP
constexpr auto sinh(float arg) noexcept -> float
Computes the hyperbolic sine of arg.
Definition sinh.hpp:15
constexpr auto sinh(double arg) noexcept -> double
Computes the hyperbolic sine of arg.
Definition sinh.hpp:31
constexpr auto sinh(long double arg) noexcept -> long double
Computes the hyperbolic sine of arg.
Definition sinh.hpp:39
constexpr auto sinh(T arg) noexcept -> double
Computes the hyperbolic sine of arg.
Definition sinh.hpp:56
constexpr auto sinhl(long double arg) noexcept -> long double
Computes the hyperbolic sine of arg.
Definition sinh.hpp:47
constexpr auto sinhf(float arg) noexcept -> float
Computes the hyperbolic sine of arg.
Definition sinh.hpp:23
Definition adjacent_find.hpp:9