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// SPDX-FileCopyrightText: Copyright (C) 2021 Tobias Hienzsch
3
4#ifndef TETL_COMPLEX_TANH_HPP
5#define TETL_COMPLEX_TANH_HPP
6
7#include <etl/_complex/complex.hpp>
8#include <etl/_complex/cosh.hpp>
9#include <etl/_complex/sinh.hpp>
10
11namespace etl {
12
13/// \ingroup complex
14template <typename T>
15[[nodiscard]] constexpr auto tanh(complex<T> const& z) -> complex<T>
16{
17 return etl::sinh(z) / etl::cosh(z);
18}
19
20} // namespace etl
21
22#endif // TETL_COMPLEX_TANH_HPP
constexpr auto tanh(complex< T > const &z) -> complex< T >
Definition tanh.hpp:15
Definition adjacent_find.hpp:9
A complex number.
Definition complex.hpp:20