tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
log.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
3
#ifndef TETL_COMPLEX_LOG_HPP
4
#define TETL_COMPLEX_LOG_HPP
5
6
#include <
etl/_cmath/log.hpp
>
7
#include <
etl/_complex/arg.hpp
>
8
#include <
etl/_complex/complex.hpp
>
9
#include <
etl/_math/abs.hpp
>
10
11
namespace
etl
{
12
14
template
<
typename
T>
15
[[nodiscard]]
constexpr
auto
log
(
complex<T>
const
& z)
noexcept
->
complex<T>
16
{
17
return
{
etl::log
(
etl::abs
(z)),
etl::arg
(z)};
18
}
19
20
}
// namespace etl
21
22
#endif
// TETL_COMPLEX_LOG_HPP
log.hpp
complex.hpp
abs.hpp
arg.hpp
etl::log
constexpr auto log(float v) noexcept -> float
Computes the natural (base e) logarithm of arg.
Definition
log.hpp:44
etl::arg
constexpr auto arg(complex< T > const &z) noexcept -> T
Definition
arg.hpp:15
etl::abs
constexpr auto abs(complex< T > const &z) -> T
Definition
abs.hpp:13
etl
Definition
adjacent_find.hpp:8
etl::complex
A complex number.
Definition
complex.hpp:19
include
etl
_complex
log.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0