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.

72 lines
2.5 KiB

  1. /* values used by math functions -- IEEE 754 long version */
  2. #include "xmath.h"
  3. _STD_BEGIN
  4. #if _DLONG == 0
  5. /* macros -- 64-bit */
  6. #define NBITS (48 + _DOFF)
  7. #if _D0 == 0
  8. #define INIT(w0) {w0, 0, 0, 0}
  9. #define INIT2(w0, w1) {w0, 0, 0, w1}
  10. #else
  11. #define INIT(w0) {0, 0, 0, w0}
  12. #define INIT2(w0, w1) {w1, 0, 0, w0}
  13. #endif
  14. /* static data */
  15. _CRTIMP2 const _Dconst _LDenorm = {INIT2(0, 1)};
  16. _CRTIMP2 const _Dconst _LEps = {INIT((_DBIAS - NBITS - 1) << _DOFF)};
  17. _CRTIMP2 const _Dconst _LInf = {INIT(_DMAX << _DOFF)};
  18. _CRTIMP2 const _Dconst _LNan = {INIT(_DSIGN | (_DMAX << _DOFF)
  19. | (1 << (_DOFF - 1)))};
  20. _CRTIMP2 const _Dconst _LRteps = {INIT((_DBIAS - NBITS / 2) << _DOFF)};
  21. _CRTIMP2 const _Dconst _LSnan = {INIT(_DSIGN | (_DMAX << _DOFF)
  22. | (1 << (_DOFF - 1)))};
  23. #elif _DLONG == 1
  24. /* macros -- 80-bit */
  25. #define NBITS 64
  26. #if _D0 == 0
  27. #define INIT(w0, w1) {w0, w1, 0, 0, 0}
  28. #define INIT3(w0, w1, wn) {w0, w1, 0, 0, wn}
  29. #else
  30. #define INIT(w0, w1) {0, 0, 0, w1, w0}
  31. #define INIT3(w0, w1, wn) {wn, 0, 0, w1, w0}
  32. #endif
  33. /* static data */
  34. _CRTIMP2 const _Dconst _LDenorm = {INIT3(0, 0, 1)};
  35. _CRTIMP2 const _Dconst _LEps = {INIT(_LBIAS - NBITS - 1, 0x8000)};
  36. _CRTIMP2 const _Dconst _LInf = {INIT(_LMAX, 0x8000)};
  37. _CRTIMP2 const _Dconst _LNan = {INIT(_LSIGN | _LMAX, 0xc000)};
  38. _CRTIMP2 const _Dconst _LSnan = {INIT(_LSIGN | _LMAX, 0x8000)};
  39. _CRTIMP2 const _Dconst _LRteps = {INIT(_LBIAS - NBITS / 2, 0x8000)};
  40. #else /* 1 < _DLONG */
  41. /* macros -- 128-bit SPARC */
  42. #define NBITS 128
  43. #if _D0 == 0
  44. #define INIT(w0, w1) {w0, w1, 0, 0, 0, 0, 0, 0}
  45. #define INIT3(w0, w1, wn) {w0, w1, 0, 0, 0, 0, 0, wn}
  46. #else
  47. #define INIT(w0, w1) {0, 0, 0, 0, 0, 0, w1, w0}
  48. #define INIT3(w0, w1, wn) {wn, 0, 0, 0, 0, 0, w1, w0}
  49. #endif
  50. /* static data */
  51. _CRTIMP2 const _Dconst _LDenorm = {INIT3(0, 0, 1)};
  52. _CRTIMP2 const _Dconst _LEps = {INIT(_LBIAS - NBITS - 1, 0x8000)};
  53. _CRTIMP2 const _Dconst _LInf = {INIT(_LMAX, 0)};
  54. _CRTIMP2 const _Dconst _LNan = {INIT(_LSIGN | _LMAX, 0x8000)};
  55. _CRTIMP2 const _Dconst _LSnan = {INIT(_LSIGN | _LMAX, 0x8000)};
  56. _CRTIMP2 const _Dconst _LRteps = {INIT(_LBIAS - NBITS / 2, 0x8000)};
  57. #endif
  58. _CRTIMP2 const long double _LXbig = (NBITS + 1) * 347L / 1000;
  59. _CRTIMP2 const long double _LZero = 0.0L;
  60. _STD_END
  61. /*
  62. * Copyright (c) 1992-2001 by P.J. Plauger. ALL RIGHTS RESERVED.
  63. * Consult your license regarding permissions and restrictions.
  64. V3.10:0009 */