4#ifndef TETL_CMATH_SIGNBIT_HPP
5#define TETL_CMATH_SIGNBIT_HPP
7#include <etl/_config/all.hpp>
9#include <etl/_type_traits/is_constant_evaluated.hpp>
16[[nodiscard]]
constexpr auto signbit_fallback(T arg)
noexcept ->
bool
18 return arg == T(-0.0) || arg < T(0);
35 return detail::signbit_fallback(arg);
37#if __has_builtin(__builtin_signbit) and not defined(TETL_COMPILER_CLANG)
38 return __builtin_signbit(arg);
40 return detail::signbit_fallback(arg);
56 return detail::signbit_fallback(arg);
58#if __has_builtin(__builtin_signbit) and not defined(TETL_COMPILER_CLANG)
59 return __builtin_signbit(arg);
61 return detail::signbit_fallback(arg);
77 return detail::signbit_fallback(arg);
79#if __has_builtin(__builtin_signbit) and not defined(TETL_COMPILER_CLANG)
80 return __builtin_signbit(arg);
82 return detail::signbit_fallback(arg);
constexpr auto signbit(long double arg) noexcept -> bool
Determines if the given floating point number arg is negative.
Definition signbit.hpp:74
constexpr auto signbit(float arg) noexcept -> bool
Determines if the given floating point number arg is negative.
Definition signbit.hpp:32
constexpr auto signbit(double arg) noexcept -> bool
Determines if the given floating point number arg is negative.
Definition signbit.hpp:53
Definition adjacent_find.hpp:9
constexpr auto is_constant_evaluated() noexcept -> bool
Detects whether the function call occurs within a constant-evaluated context. Returns true if the eva...
Definition is_constant_evaluated.hpp:17