HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fpreal16.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas
4 // Digital Ltd. LLC
5 //
6 // All rights reserved.
7 //
8 // Redistribution and use in source and binary forms, with or without
9 // modification, are permitted provided that the following conditions are
10 // met:
11 // * Redistributions of source code must retain the above copyright
12 // notice, this list of conditions and the following disclaimer.
13 // * Redistributions in binary form must reproduce the above
14 // copyright notice, this list of conditions and the following disclaimer
15 // in the documentation and/or other materials provided with the
16 // distribution.
17 // * Neither the name of Industrial Light & Magic nor the names of
18 // its contributors may be used to endorse or promote products derived
19 // from this software without specific prior written permission.
20 //
21 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 //
33 ///////////////////////////////////////////////////////////////////////////
34 
35 // Primary authors:
36 // Florian Kainz <kainz@ilm.com>
37 // Rod Bogart <rgb@ilm.com>
38 
39 //---------------------------------------------------------------------------
40 //
41 // fpreal16 -- a 16-bit floating point number class:
42 //
43 // Type fpreal16 can represent positive and negative numbers, whose
44 // magnitude is between roughly 6.1e-5 and 6.5e+4, with a relative
45 // error of 9.8e-4; numbers smaller than 6.1e-5 can be represented
46 // with an absolute error of 6.0e-8. All integers from -2048 to
47 // +2048 can be represented exactly.
48 //
49 // Type fpreal16 behaves (almost) like the built-in C++ floating point
50 // types. In arithmetic expressions, fpreal16, float and double can be
51 // mixed freely. Here are a few examples:
52 //
53 // fpreal16 a (3.5);
54 // float b (a + sqrt (a));
55 // a += b;
56 // b += a;
57 // b = a + 7;
58 //
59 // Conversions from fpreal16 to float are lossless; all fpreal16 numbers
60 // are exactly representable as floats.
61 //
62 // Conversions from float to fpreal16 may not preserve the float's
63 // value exactly. If a float is not representable as a fpreal16, the
64 // float value is rounded to the nearest representable fpreal16. If
65 // a float value is exactly in the middle between the two closest
66 // representable fpreal16 values, then the float value is rounded to
67 // the fpreal16 with the greater magnitude.
68 //
69 // Overflows during float-to-fpreal16 conversions cause arithmetic
70 // exceptions. An overflow occurs when the float value to be
71 // converted is too large to be represented as a fpreal16, or if the
72 // float value is an infinity or a NAN.
73 //
74 // The implementation of type fpreal16 makes the following assumptions
75 // about the implementation of the built-in C++ types:
76 //
77 // float is an IEEE 754 single-precision number
78 // sizeof (float) == 4
79 // sizeof (unsigned int) == sizeof (float)
80 // alignof (unsigned int) == alignof (float)
81 // sizeof (unsigned short) == 2
82 //
83 //---------------------------------------------------------------------------
84 
85 #ifndef _H_REAL16_H_
86 #define _H_REAL16_H_
87 
88 #include "SYS_API.h"
89 #ifndef __SYS_Types__
90 #error This file must be included from SYS_Types.h
91 #endif
92 
93 #include "SYS_Deprecated.h"
94 #include "SYS_Inline.h"
95 #include "SYS_TypeDecorate.h"
96 #include <iosfwd>
97 
98 
100 {
101  public:
102 
103  //-------------
104  // Constructors
105  //-------------
106 
107  fpreal16() = default; // no initialization
108  fpreal16(const fpreal16 &h) = default;
110 
111 
112  //--------------------
113  // Conversion to float
114  //--------------------
115 
116  operator fpreal32() const;
117 
118 
119  //------------
120  // Unary minus
121  //------------
122 
123  fpreal16 operator-() const;
124 
125 
126  //-----------
127  // Assignment
128  //-----------
129 
130  fpreal16 &operator=(const fpreal16 &h) = default;
131  fpreal16 operator=(fpreal32 f);
132 
135 
138 
141 
144 
145 
146  //---------------------------------------------------------
147  // Round to n-bit precision (n should be between 0 and 10).
148  // After rounding, the significand's 10-n least significant
149  // bits will be zero.
150  //---------------------------------------------------------
151 
152  fpreal16 round(unsigned int n) const;
153 
154 
155  //--------------------------------------------------------------------
156  // Classification:
157  //
158  // h.isFinite() returns true if h is a normalized number,
159  // a denormalized number or zero
160  //
161  // h.isNormalized() returns true if h is a normalized number
162  //
163  // h.isDenormalized() returns true if h is a denormalized number
164  //
165  // h.isZero() returns true if h is zero
166  //
167  // h.isNan() returns true if h is a NAN
168  //
169  // h.isInfinity() returns true if h is a positive
170  // or a negative infinity
171  //
172  // h.isNegative() returns true if the sign bit of h
173  // is set (negative)
174  //--------------------------------------------------------------------
175 
176  bool isFinite() const;
177  bool isNormalized() const;
178  bool isDenormalized() const;
179  bool isZero() const;
180  bool isNan() const;
181  bool isInfinity() const;
182  bool isNegative() const;
183 
184 
185  //--------------------------------------------
186  // Special values
187  //
188  // posInf() returns +infinity
189  //
190  // negInf() returns +infinity
191  //
192  // qNan() returns a NAN with the bit
193  // pattern 0111111111111111
194  //
195  // sNan() returns a NAN with the bit
196  // pattern 0111110111111111
197  //--------------------------------------------
198 
199  static fpreal16 posInf();
200  static fpreal16 negInf();
201  static fpreal16 qNan();
202  static fpreal16 sNan();
203 
204 
205  //--------------------------------------
206  // Access to the internal representation
207  //--------------------------------------
208 
209  unsigned short bits() const;
210  void setBits(unsigned short bits);
211 
212 
213  static void ensureStaticDataIsInitialized();
214 
215  public:
216 
217  union uif
218  {
221  };
222 
223  private:
224 
225  static int16 convert(int i);
226  static fpreal32 overflow();
227 
228  unsigned short _h;
229 
230  protected:
231  static bool selftest();
232  static const uif *_toFloat;
233  static const unsigned short *_eLut;
234  static bool _itWorks;
235 };
236 
237 
238 //-----------
239 // Type Traits Compatibility
240 //-----------
241 
244 
245 
246 //-----------
247 // Stream I/O
248 //-----------
249 
250 SYS_API extern std::ostream & operator << (std::ostream &os, fpreal16 h);
251 SYS_API extern std::istream & operator >> (std::istream &is, fpreal16 &h);
252 
253 
254 //----------
255 // Debugging
256 //----------
257 
258 SYS_API extern void SYSprintBits (std::ostream &os, fpreal16 h);
259 SYS_API extern void SYSprintBits (std::ostream &os, fpreal32 f);
260 SYS_API extern void SYSprintBits (char c[19], fpreal16 h);
261 SYS_API extern void SYSprintBits (char c[35], fpreal32 f);
262 
263 
264 //-------
265 // Limits
266 //-------
267 
268 #define H_REAL16_MIN 5.96046448e-08 // Smallest +ve fpreal16
269 #define H_REAL16_NRM_MIN 6.10351562e-05 // Smallest +ve normalized fpreal16
270 
271 #define H_REAL16_MAX 65504.0 // Largest positive fpreal16
272 
273 // Smallest positive e for which fpreal16 (1.0 + e) != fpreal16 (1.0)
274 #define H_REAL16_EPSILON 0.00097656
275 
276 #define H_REAL16_MANT_DIG 11 // Number of digits in mantissa
277  // (significand + hidden leading 1)
278 
279 #define H_REAL16_DIG 2 // Number of base 10 digits that
280  // can be represented without change
281 
282 #define H_REAL16_RADIX 2 // Base of the exponent
283 
284 #define H_REAL16_MIN_EXP -13 // Minimum negative integer such that
285  // H_REAL16_RADIX raised to the power of
286  // one less than that integer is a
287  // normalized fpreal16
288 
289 #define H_REAL16_MAX_EXP 16 // Maximum positive integer such that
290  // H_REAL16_RADIX raised to the power of
291  // one less than that integer is a
292  // normalized fpreal16
293 
294 #define H_REAL16_MIN_10_EXP -4 // Minimum positive integer such
295  // that 10 raised to that power is
296  // a normalized fpreal16
297 
298 #define H_REAL16_MAX_10_EXP 4 // Maximum positive integer such
299  // that 10 raised to that power is
300  // a normalized fpreal16
301 
302 
303 //---------------------------------------------------------------------------
304 //
305 // Implementation --
306 //
307 // Representation of a float:
308 //
309 // We assume that a float, f, is an IEEE 754 single-precision
310 // floating point number, whose bits are arranged as follows:
311 //
312 // 31 (msb)
313 // |
314 // | 30 23
315 // | | |
316 // | | | 22 0 (lsb)
317 // | | | | |
318 // X XXXXXXXX XXXXXXXXXXXXXXXXXXXXXXX
319 //
320 // s e m
321 //
322 // S is the sign-bit, e is the exponent and m is the significand.
323 //
324 // If e is between 1 and 254, f is a normalized number:
325 //
326 // s e-127
327 // f = (-1) * 2 * 1.m
328 //
329 // If e is 0, and m is not zero, f is a denormalized number:
330 //
331 // s -126
332 // f = (-1) * 2 * 0.m
333 //
334 // If e and m are both zero, f is zero:
335 //
336 // f = 0.0
337 //
338 // If e is 255, f is an "infinity" or "not a number" (NAN),
339 // depending on whether m is zero or not.
340 //
341 // Examples:
342 //
343 // 0 00000000 00000000000000000000000 = 0.0
344 // 0 01111110 00000000000000000000000 = 0.5
345 // 0 01111111 00000000000000000000000 = 1.0
346 // 0 10000000 00000000000000000000000 = 2.0
347 // 0 10000000 10000000000000000000000 = 3.0
348 // 1 10000101 11110000010000000000000 = -124.0625
349 // 0 11111111 00000000000000000000000 = +infinity
350 // 1 11111111 00000000000000000000000 = -infinity
351 // 0 11111111 10000000000000000000000 = NAN
352 // 1 11111111 11111111111111111111111 = NAN
353 //
354 // Representation of a fpreal16:
355 //
356 // Here is the bit-layout for a fpreal16 number, h:
357 //
358 // 15 (msb)
359 // |
360 // | 14 10
361 // | | |
362 // | | | 9 0 (lsb)
363 // | | | | |
364 // X XXXXX XXXXXXXXXX
365 //
366 // s e m
367 //
368 // S is the sign-bit, e is the exponent and m is the significand.
369 //
370 // If e is between 1 and 30, h is a normalized number:
371 //
372 // s e-15
373 // h = (-1) * 2 * 1.m
374 //
375 // If e is 0, and m is not zero, h is a denormalized number:
376 //
377 // S -14
378 // h = (-1) * 2 * 0.m
379 //
380 // If e and m are both zero, h is zero:
381 //
382 // h = 0.0
383 //
384 // If e is 31, h is an "infinity" or "not a number" (NAN),
385 // depending on whether m is zero or not.
386 //
387 // Examples:
388 //
389 // 0 00000 0000000000 = 0.0
390 // 0 01110 0000000000 = 0.5
391 // 0 01111 0000000000 = 1.0
392 // 0 10000 0000000000 = 2.0
393 // 0 10000 1000000000 = 3.0
394 // 1 10101 1111000001 = -124.0625
395 // 0 11111 0000000000 = +infinity
396 // 1 11111 0000000000 = -infinity
397 // 0 11111 1000000000 = NAN
398 // 1 11111 1111111111 = NAN
399 //
400 // Conversion:
401 //
402 // Converting from a float to a fpreal16 requires some non-trivial bit
403 // manipulations. In some cases, this makes conversion relatively
404 // slow, but the most common case is accelerated via table lookups.
405 //
406 // Converting back from a fpreal16 to a float is easier because we don't
407 // have to do any rounding. In addition, there are only 65536
408 // different fpreal16 numbers; we can convert each of those numbers once
409 // and store the results in a table. Later, all conversions can be
410 // done using only simple table lookups.
411 //
412 //---------------------------------------------------------------------------
413 
414 
415 //----------------------------
416 // fpreal16-from-float constructor
417 //----------------------------
418 
421 {
422  if (f == 0)
423  {
424  //
425  // Common special case - zero.
426  // For speed, we don't preserve the zero's sign.
427  //
428 
429  _h = 0;
430  }
431  else
432  {
433  //
434  // We extract the combined sign and exponent, e, from our
435  // floating-point number, f. Then we convert e to the sign
436  // and exponent of the fpreal16 number via a table lookup.
437  //
438  // For the most common case, where a normalized fpreal16 is produced,
439  // the table lookup returns a non-zero value; in this case, all
440  // we have to do, is round f's significand to 10 bits and combine
441  // the result with e.
442  //
443  // For all other cases (overflow, zeroes, denormalized numbers
444  // resulting from underflow, infinities and NANs), the table
445  // lookup returns zero, and we call a longer, non-inline function
446  // to do the float-to-fpreal16 conversion.
447  //
448 
449  uif x;
450 
451  x.f = f;
452 
453  int e = (x.i >> 23) & 0x000001ff;
454 
455  e = _eLut[e];
456 
457  if (e)
458  {
459  //
460  // Simple case - round the significand and
461  // combine it with the sign and exponent.
462  //
463 
464  _h = e + (((x.i & 0x007fffff) + 0x00001000) >> 13);
465  }
466  else
467  {
468  //
469  // Difficult case - call a function.
470  //
471 
472  _h = convert (x.i);
473  }
474  }
475 }
476 
477 
478 //------------------------------------------
479 // fpreal16-to-float conversion via table lookup
480 //------------------------------------------
481 
483 fpreal16::operator fpreal32() const
484 {
485  return _toFloat[_h].f;
486 }
487 
488 //-------------------------
489 // Round to n-bit precision
490 //-------------------------
491 
492 inline fpreal16
493 fpreal16::round(unsigned int n) const
494 {
495  //
496  // Parameter check.
497  //
498 
499  if (n >= 10)
500  return *this;
501 
502  //
503  // Disassemble h into the sign, s,
504  // and the combined exponent and significand, e.
505  //
506 
507  unsigned short s = _h & 0x8000;
508  unsigned short e = _h & 0x7fff;
509 
510  //
511  // Round the exponent and significand to the nearest value
512  // where ones occur only in the (10-n) most significant bits.
513  // Note that the exponent adjusts automatically if rounding
514  // up causes the significand to overflow.
515  //
516 
517  e >>= 9 - n;
518  e += e & 1;
519  e <<= 9 - n;
520 
521  //
522  // Check for exponent overflow.
523  //
524 
525  if (e >= 0x7c00)
526  {
527  //
528  // Overflow occurred -- truncate instead of rounding.
529  //
530 
531  e = _h;
532  e >>= 10 - n;
533  e <<= 10 - n;
534  }
535 
536  //
537  // Put the original sign bit back.
538  //
539 
540  fpreal16 h;
541  h._h = s | e;
542 
543  return h;
544 }
545 
546 
547 //-----------------------
548 // Other inline functions
549 //-----------------------
550 
553 {
554  fpreal16 h;
555  h._h = _h ^ 0x8000;
556  return h;
557 }
558 
559 
562 {
563  *this = fpreal16 (f);
564  return *this;
565 }
566 
567 
568 inline fpreal16
570 {
571  *this = fpreal16 (fpreal32(*this) + fpreal32(h));
572  return *this;
573 }
574 
575 
576 inline fpreal16
578 {
579  *this = fpreal16 (fpreal32(*this) + f);
580  return *this;
581 }
582 
583 
584 inline fpreal16
586 {
587  *this = fpreal16 (fpreal32(*this) - fpreal32(h));
588  return *this;
589 }
590 
591 
592 inline fpreal16
594 {
595  *this = fpreal16 (fpreal32 (*this) - f);
596  return *this;
597 }
598 
599 
600 inline fpreal16
602 {
603  *this = fpreal16 (fpreal32 (*this) * fpreal32 (h));
604  return *this;
605 }
606 
607 
608 inline fpreal16
610 {
611  *this = fpreal16 (fpreal32 (*this) * f);
612  return *this;
613 }
614 
615 
616 inline fpreal16
618 {
619  *this = fpreal16 (fpreal32 (*this) / fpreal32 (h));
620  return *this;
621 }
622 
623 
624 inline fpreal16
626 {
627  *this = fpreal16 (fpreal32 (*this) / f);
628  return *this;
629 }
630 
631 
632 SYS_FORCE_INLINE bool
634 {
635  unsigned short e = (_h >> 10) & 0x001f;
636  return e < 31;
637 }
638 
639 
640 SYS_FORCE_INLINE bool
642 {
643  unsigned short e = (_h >> 10) & 0x001f;
644  return e > 0 && e < 31;
645 }
646 
647 
648 SYS_FORCE_INLINE bool
650 {
651  unsigned short e = (_h >> 10) & 0x001f;
652  unsigned short m = _h & 0x3ff;
653  return e == 0 && m != 0;
654 }
655 
656 
657 SYS_FORCE_INLINE bool
659 {
660  return (_h & 0x7fff) == 0;
661 }
662 
663 
664 SYS_FORCE_INLINE bool
666 {
667  unsigned short e = (_h >> 10) & 0x001f;
668  unsigned short m = _h & 0x3ff;
669  return e == 31 && m != 0;
670 }
671 
672 
673 SYS_FORCE_INLINE bool
675 {
676  unsigned short e = (_h >> 10) & 0x001f;
677  unsigned short m = _h & 0x3ff;
678  return e == 31 && m == 0;
679 }
680 
681 
682 SYS_FORCE_INLINE bool
684 {
685  return (_h & 0x8000) != 0;
686 }
687 
688 
691 {
692  fpreal16 h;
693  h._h = 0x7c00;
694  return h;
695 }
696 
697 
700 {
701  fpreal16 h;
702  h._h = 0xfc00;
703  return h;
704 }
705 
706 
709 {
710  fpreal16 h;
711  h._h = 0x7fff;
712  return h;
713 }
714 
715 
718 {
719  fpreal16 h;
720  h._h = 0x7dff;
721  return h;
722 }
723 
724 
725 SYS_FORCE_INLINE unsigned short
727 {
728  return _h;
729 }
730 
731 
732 SYS_FORCE_INLINE void
733 fpreal16::setBits(unsigned short b)
734 {
735  _h = b;
736 }
737 
738 // namespace std overloads
739 namespace std
740 {
741 // gcc defines these as macros in <math.h>
742 #pragma push_macro("isnormal")
743 #pragma push_macro("isfinite")
744 #pragma push_macro("isinf")
745 #pragma push_macro("isnan")
746 #undef isnormal
747 #undef isfinite
748 #undef isinf
749 #undef isnan
750 
751 SYS_DEPRECATED_REPLACE(20.0, "Use SYSisNormal()")
752 static SYS_FORCE_INLINE bool isnormal(fpreal16 v) { return v.isNormalized(); }
753 SYS_DEPRECATED_REPLACE(20.0, "Use SYSisFinite()")
754 static SYS_FORCE_INLINE bool isfinite(fpreal16 v) { return v.isFinite(); }
755 SYS_DEPRECATED_REPLACE(20.0, "Use SYSisInf()")
756 static SYS_FORCE_INLINE bool isinf(fpreal16 v) { return v.isInfinity(); }
757 SYS_DEPRECATED_REPLACE(20.0, "Use SYSisNan()")
758 static SYS_FORCE_INLINE bool isnan(fpreal16 v) { return v.isNan(); }
759 
760 #pragma pop_macro("isnormal")
761 #pragma pop_macro("isfinite")
762 #pragma pop_macro("isinf")
763 #pragma pop_macro("isnan")
764 }
765 
766 #endif
static fpreal16 negInf()
Definition: fpreal16.h:699
OIIO_FORCEINLINE const vint4 & operator/=(vint4 &a, const vint4 &b)
Definition: simd.h:4438
SYS_API void SYSprintBits(std::ostream &os, fpreal16 h)
bool isZero() const
Definition: fpreal16.h:658
const GLdouble * v
Definition: glcorearb.h:837
static const uif * _toFloat
Definition: fpreal16.h:232
IMATH_HOSTDEVICE constexpr Plane3< T > operator-(const Plane3< T > &plane) IMATH_NOEXCEPT
Reflect the pla.
Definition: ImathPlane.h:253
GLdouble s
Definition: glad.h:3009
fpreal16 operator-=(fpreal16 h)
Definition: fpreal16.h:585
fpreal16 operator-() const
Definition: fpreal16.h:552
Tto convert(const Tfrom &source)
fpreal16 operator/=(fpreal16 h)
Definition: fpreal16.h:617
float fpreal32
Definition: SYS_Types.h:200
bool isNegative(const Type &x)
Return true if x is less than zero.
Definition: Math.h:367
uint32 i
Definition: fpreal16.h:219
#define SYS_DEPRECATED_REPLACE(__V__, __R__)
fpreal16 operator*=(fpreal16 h)
Definition: fpreal16.h:601
GLdouble n
Definition: glcorearb.h:2008
GLfloat f
Definition: glcorearb.h:1926
bool isNegative() const
Definition: fpreal16.h:683
static fpreal16 qNan()
Definition: fpreal16.h:708
OIIO_FORCEINLINE const vint4 & operator+=(vint4 &a, const vint4 &b)
Definition: simd.h:4369
#define SYS_DECLARE_IS_FLOATING_POINT(T)
Declare a type as floating point.
fpreal32 f
Definition: fpreal16.h:220
fpreal16 operator+=(fpreal16 h)
Definition: fpreal16.h:569
fpreal16()=default
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
#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.
Definition: Math.h:395
bool isFinite() const
Definition: fpreal16.h:633
static bool _itWorks
Definition: fpreal16.h:234
vfloat4 round(const vfloat4 &a)
Definition: simd.h:7436
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
GLint GLenum GLint x
Definition: glcorearb.h:409
bool isInfinity() const
Definition: fpreal16.h:674
IMATH_HOSTDEVICE const Vec2< S > & operator*=(Vec2< S > &v, const Matrix22< T > &m) IMATH_NOEXCEPT
Vector-matrix multiplication: v *= m.
Definition: ImathMatrix.h:4660
static fpreal16 sNan()
Definition: fpreal16.h:717
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:2002
void setBits(unsigned short bits)
Definition: fpreal16.h:733
short int16
Definition: SYS_Types.h:37
fpreal16 round(unsigned int n) const
Definition: fpreal16.h:493
static fpreal16 posInf()
Definition: fpreal16.h:690
bool isNan() const
Definition: fpreal16.h:665
unsigned int uint32
Definition: SYS_Types.h:40
fpreal16 & operator=(const fpreal16 &h)=default
OIIO_FORCEINLINE const vint4 & operator-=(vint4 &a, const vint4 &b)
Definition: simd.h:4392
#define SYS_API
Definition: SYS_API.h:11
unsigned short bits() const
Definition: fpreal16.h:726
static const unsigned short * _eLut
Definition: fpreal16.h:233
bool isZero(const Type &x)
Return true if x is exactly equal to zero.
Definition: Math.h:337
bool isNormalized() const
Definition: fpreal16.h:641
bool isFinite(const float x)
Return true if x is finite.
Definition: Math.h:375
bool isDenormalized() const
Definition: fpreal16.h:649