Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.3 KiB

  1. /* values used by math functions -- IEEE 754 float version */
  2. #include "wctype.h"
  3. #include "xmath.h"
  4. _STD_BEGIN
  5. /* macros */
  6. #define NBITS (16 + _FOFF)
  7. #if _D0
  8. #define INIT(w0) {0, w0}
  9. #define INIT2(w0, w1) {w1, w0}
  10. #else
  11. #define INIT(w0) {w0, 0}
  12. #define INIT2(w0, w1) {w0, w1}
  13. #endif
  14. /* static data */
  15. _CRTIMP2 const _Dconst _FDenorm = {INIT2(0, 1)};
  16. _CRTIMP2 const _Dconst _FEps = {INIT((_FBIAS - NBITS - 1) << _FOFF)};
  17. _CRTIMP2 const _Dconst _FInf = {INIT(_FMAX << _FOFF)};
  18. _CRTIMP2 const _Dconst _FNan = {INIT(_FSIGN | (_FMAX << _FOFF)
  19. | (1 << (_FOFF - 1)))};
  20. _CRTIMP2 const _Dconst _FSnan = {INIT(_FSIGN | (_FMAX << _FOFF))};
  21. _CRTIMP2 const _Dconst _FRteps = {INIT((_FBIAS - NBITS / 2) << _FOFF)};
  22. _CRTIMP2 const float _FXbig = (NBITS + 1) * 347L / 1000;
  23. #if defined(__CENTERLINE__)
  24. #define _DYNAMIC_INIT_CONST(x) \
  25. (x._F = *(float *)(void *)(x._W))
  26. _DYNAMIC_INIT_CONST(_FEps);
  27. _DYNAMIC_INIT_CONST(_FInf);
  28. _DYNAMIC_INIT_CONST(_FNan);
  29. _DYNAMIC_INIT_CONST(_FRteps);
  30. #endif
  31. _STD_END
  32. /*
  33. * Copyright (c) 1994 by P.J. Plauger. ALL RIGHTS RESERVED.
  34. * Consult your license regarding permissions and restrictions.
  35. */
  36. /*
  37. 941029 pjp: added _STD machinery
  38. 950222 pjp: added signaling NaN, denorm minimum for C++
  39. 950405 pjp: corrected _FSnan punctuation
  40. 950505 pjp: corrected _FDenorm spelling
  41. */