90 #error This file must be included from SYS_Types.h
177 bool isNormalized()
const;
178 bool isDenormalized()
const;
181 bool isInfinity()
const;
209 unsigned short bits()
const;
210 void setBits(
unsigned short bits);
213 static void ensureStaticDataIsInitialized();
231 static bool selftest();
251 SYS_API extern std::istream & operator >> (std::istream &is,
fpreal16 &h);
268 #define H_REAL16_MIN 5.96046448e-08 // Smallest +ve fpreal16
269 #define H_REAL16_NRM_MIN 6.10351562e-05 // Smallest +ve normalized fpreal16
271 #define H_REAL16_MAX 65504.0 // Largest positive fpreal16
274 #define H_REAL16_EPSILON 0.00097656
276 #define H_REAL16_MANT_DIG 11 // Number of digits in mantissa
279 #define H_REAL16_DIG 2 // Number of base 10 digits that
282 #define H_REAL16_RADIX 2 // Base of the exponent
284 #define H_REAL16_MIN_EXP -13 // Minimum negative integer such that
289 #define H_REAL16_MAX_EXP 16 // Maximum positive integer such that
294 #define H_REAL16_MIN_10_EXP -4 // Minimum positive integer such
298 #define H_REAL16_MAX_10_EXP 4 // Maximum positive integer such
453 int e = (x.
i >> 23) & 0x000001ff;
464 _h = e + (((x.
i & 0x007fffff) + 0x00001000) >> 13);
485 return _toFloat[_h].f;
507 unsigned short s = _h & 0x8000;
508 unsigned short e = _h & 0x7fff;
635 unsigned short e = (_h >> 10) & 0x001f;
643 unsigned short e = (_h >> 10) & 0x001f;
644 return e > 0 && e < 31;
651 unsigned short e = (_h >> 10) & 0x001f;
652 unsigned short m = _h & 0x3ff;
653 return e == 0 && m != 0;
660 return (_h & 0x7fff) == 0;
667 unsigned short e = (_h >> 10) & 0x001f;
668 unsigned short m = _h & 0x3ff;
669 return e == 31 && m != 0;
676 unsigned short e = (_h >> 10) & 0x001f;
677 unsigned short m = _h & 0x3ff;
678 return e == 31 && m == 0;
685 return (_h & 0x8000) != 0;
742 #pragma push_macro("isnormal")
743 #pragma push_macro("isfinite")
744 #pragma push_macro("isinf")
745 #pragma push_macro("isnan")
760 #pragma pop_macro("isnormal")
761 #pragma pop_macro("isfinite")
762 #pragma pop_macro("isinf")
763 #pragma pop_macro("isnan")
OIIO_FORCEINLINE const vint4 & operator/=(vint4 &a, const vint4 &b)
SYS_API void SYSprintBits(std::ostream &os, fpreal16 h)
static const uif * _toFloat
IMATH_HOSTDEVICE constexpr Plane3< T > operator-(const Plane3< T > &plane) IMATH_NOEXCEPT
Reflect the pla.
fpreal16 operator-=(fpreal16 h)
fpreal16 operator-() const
Tto convert(const Tfrom &source)
fpreal16 operator/=(fpreal16 h)
bool isNegative(const Type &x)
Return true if x is less than zero.
#define SYS_DEPRECATED_REPLACE(__V__, __R__)
fpreal16 operator*=(fpreal16 h)
OIIO_FORCEINLINE const vint4 & operator+=(vint4 &a, const vint4 &b)
#define SYS_DECLARE_IS_FLOATING_POINT(T)
Declare a type as floating point.
fpreal16 operator+=(fpreal16 h)
#define SYS_DECLARE_IS_POD(T)
Declare a type as POD.
bool isNan(const float x)
Return true if x is a NaN (Not-A-Number) value.
vfloat4 round(const vfloat4 &a)
GLboolean GLboolean GLboolean b
IMATH_HOSTDEVICE const Vec2< S > & operator*=(Vec2< S > &v, const Matrix22< T > &m) IMATH_NOEXCEPT
Vector-matrix multiplication: v *= m.
GLfloat GLfloat GLfloat GLfloat h
void setBits(unsigned short bits)
fpreal16 round(unsigned int n) const
LeafData & operator=(const LeafData &)=delete
fpreal16 & operator=(const fpreal16 &h)=default
OIIO_FORCEINLINE const vint4 & operator-=(vint4 &a, const vint4 &b)
unsigned short bits() const
static const unsigned short * _eLut
bool isZero(const Type &x)
Return true if x is exactly equal to zero.
bool isNormalized() const
bool isFinite(const float x)
Return true if x is finite.
bool isDenormalized() const