tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
nan.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_NAN_HPP
5#define TETL_CMATH_NAN_HPP
6
7#include <etl/_config/all.hpp>
8
9namespace etl {
10
11/// \ingroup cmath
12/// @{
13
14/// Converts the implementation-defined character string arg into the
15/// corresponding quiet NaN value
16///
17/// Returns the quiet NaN value that corresponds to the identifying
18/// string arg or zero if the implementation does not support quiet NaNs.
19///
20/// https://en.cppreference.com/w/cpp/numeric/math/nan
21[[nodiscard]] constexpr auto nanf(char const* arg) noexcept -> float
22{
23 (void)arg;
24 return TETL_BUILTIN_NANF("");
25}
26[[nodiscard]] constexpr auto nan(char const* arg) noexcept -> double
27{
28 (void)arg;
29 return TETL_BUILTIN_NAN("");
30}
31[[nodiscard]] constexpr auto nanl(char const* arg) noexcept -> long double
32{
33 (void)arg;
34 return TETL_BUILTIN_NANL("");
35}
36
37/// @}
38
39} // namespace etl
40
41#endif // TETL_CMATH_NAN_HPP
constexpr auto nan(char const *arg) noexcept -> double
Definition nan.hpp:26
constexpr auto nanf(char const *arg) noexcept -> float
Definition nan.hpp:21
constexpr auto nanl(char const *arg) noexcept -> long double
Definition nan.hpp:31
Definition adjacent_find.hpp:9