MCPcopy Create free account
hub / github.com/apache/singa / builtin_signbit

Function builtin_signbit

include/half.hpp:578–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

576 /// \retval true if signbit set
577 /// \retval false else
578 template<typename T> bool builtin_signbit(T arg)
579 {
580 #if HALF_ENABLE_CPP11_CMATH
581 return std::signbit(arg);
582 #else
583 return arg < T() || (arg == T() && T(1)/arg < T());
584 #endif
585 }
586
587 /// Platform-independent sign mask.
588 /// \param arg integer value in two's complement

Callers 2

float2half_implFunction · 0.85
nexttowardFunction · 0.85

Calls 1

signbitFunction · 0.85

Tested by

no test coverage detected