tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
tanh.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_COMPLEX_TANH_HPP
4#define TETL_COMPLEX_TANH_HPP
5
9
10namespace etl {
11
13template <typename T>
14[[nodiscard]] constexpr auto tanh(complex<T> const& z) -> complex<T>
15{
16 return etl::sinh(z) / etl::cosh(z);
17}
18
19} // namespace etl
20
21#endif // TETL_COMPLEX_TANH_HPP
constexpr auto sinh(float arg) noexcept -> float
Computes the hyperbolic sine of arg.
Definition sinh.hpp:14
constexpr auto tanh(float arg) noexcept -> float
Computes e (Euler's number, 2.7182...) raised to the given power arg.
Definition tanh.hpp:44
constexpr auto cosh(float arg) noexcept -> float
Computes the hyperbolic cosine of arg.
Definition cosh.hpp:16
Definition adjacent_find.hpp:8
A complex number.
Definition complex.hpp:19