tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
fabs.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_FABS_HPP
5#define TETL_CMATH_FABS_HPP
6
7#include <etl/_math/abs.hpp>
8
9namespace etl {
10
11/// \ingroup cmath
12/// @{
13
14/// Returns the larger of two floating point arguments, treating NaNs as
15/// missing data (between a NaN and a numeric value, the numeric value is chosen)
16///
17/// https://en.cppreference.com/w/cpp/numeric/math/fabs
18[[nodiscard]] constexpr auto fabs(float arg) noexcept -> float
19{
20 return etl::detail::fabs(arg);
21}
22
23[[nodiscard]] constexpr auto fabsf(float arg) noexcept -> float
24{
25 return etl::detail::fabs(arg);
26}
27
28[[nodiscard]] constexpr auto fabs(double arg) noexcept -> double
29{
30 return etl::detail::fabs(arg);
31}
32
33[[nodiscard]] constexpr auto fabs(long double arg) noexcept -> long double
34{
35 return etl::detail::fabs(arg);
36}
37
38[[nodiscard]] constexpr auto fabsl(long double arg) noexcept -> long double
39{
40 return etl::detail::fabs(arg);
41}
42
43/// @}
44
45} // namespace etl
46
47#endif // TETL_CMATH_FABS_HPP
constexpr auto fabsl(long double arg) noexcept -> long double
Definition fabs.hpp:38
constexpr auto fabs(long double arg) noexcept -> long double
Definition fabs.hpp:33
constexpr auto fabsf(float arg) noexcept -> float
Definition fabs.hpp:23
constexpr auto fabs(float arg) noexcept -> float
Definition fabs.hpp:18
constexpr auto fabs(double arg) noexcept -> double
Definition fabs.hpp:28
Definition adjacent_find.hpp:9