We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 59c407d + 8785d8d commit 83d2ae7Copy full SHA for 83d2ae7
include/xsimd/arch/xsimd_scalar.hpp
@@ -825,6 +825,21 @@ namespace xsimd
825
return T(x < T(0));
826
}
827
828
+ XSIMD_INLINE float bitofsign(float const& x) noexcept
829
+ {
830
+ return float(std::signbit(x));
831
+ }
832
+
833
+ XSIMD_INLINE double bitofsign(double const& x) noexcept
834
835
+ return double(std::signbit(x));
836
837
838
+ XSIMD_INLINE long double bitofsign(long double const& x) noexcept
839
840
+ return static_cast<long double>(std::signbit(x));
841
842
843
template <class T>
844
XSIMD_INLINE auto signbit(T const& v) noexcept -> decltype(bitofsign(v))
845
{
0 commit comments