signbitf4

NAME

signbitf4 - return indicators of the signs of floating values

SYNOPSIS

Procedure call syntax:

#include <simdmath.h>
vector unsigned int signbitf4(vector float x);
Link with -lsimdmath

Inline call syntax:

#include <simdmath.h>
#include <signbitf4.h>
vector unsigned int _signbitf4(vector float x);
Parameters  
x input vector

DESCRIPTION

The signbitf4 function returns a vector in which elements contain all ones or zeros, depending on the sign of the corresponding input vector element.

Note that the signbitf4 function is not logically equivalent to (x < 0.0). IEEE 754 floating point rules include a signed zero, so if the input value is -0.0 signbitf4 will return non-zero even though the naïve implementation will not.

RETURN VALUE

The function signbitf4 returns an unsigned int vector in which each element is defined as:
UINT_MAX if the sign bit is set for the corresponding element of x.
0 otherwise.

ENVIRONMENT

SPU and PPU

CONFORMING TO

SIMD Math library specification for the Cell Broadband Engine™ Architecture.

NOTES

Basis

ISO9899 (C99) signbit macros.

SEE ALSO

signbit(3), signbitd2(3), abs(3), absi4(3), fabsf4(3), fabsd2(3), llabsi2(3), copysign(3), copysignf4(3), copysignd2(3), negate(3) , negatef4(3), negated2(3), negatei4(3), negatell2(3)