home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / math / cephes / qfloat / qconst.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-11-17  |  4.4 KB  |  144 lines

  1.  
  2. #include "qhead.h"
  3.  
  4. #if NQ > 12
  5. /*                            qc100.c    */
  6. /*  q type constants used by high precision check routines */
  7.  
  8. /*include "qhead.h"*/
  9. #define NQ 24
  10.  
  11. /* 0.0E0 */
  12. short qzero[NQ] = {
  13. 0000000,0000000,0000000,0000000,0000000,0000000,
  14. 0000000,0000000,0000000,0000000,0000000,0000000,
  15. 0,0,0,0,0,0,0,0,0,0,0,0};
  16. extern short qzero[];
  17. /* 5.0E-1 */
  18. short qhalf[NQ] = {
  19. 0000000,0040000,0000000,0100000,0000000,0000000,
  20. 0000000,0000000,0000000,0000000,0000000,0000000,
  21. 0,0,0,0,0,0,0,0,0,0,0,0};
  22. extern short qhalf[];
  23. /* 1.0E0 */
  24. short qone[NQ] = {
  25. 0000000,0040001,0000000,0100000,0000000,0000000,
  26. 0000000,0000000,0000000,0000000,0000000,0000000,
  27. 0,0,0,0,0,0,0,0,0,0,0,0};
  28. extern short qone[];
  29. /* 2.0E0 */
  30. short qtwo[NQ] = {
  31. 0000000,0040002,0000000,0100000,0000000,0000000,
  32. 0000000,0000000,0000000,0000000,0000000,0000000,
  33. 0,0,0,0,0,0,0,0,0,0,0,0};
  34. extern short qtwo[];
  35. /* 3.2E1 */
  36. short q32[NQ] = {
  37. 0000000,0040006,0000000,0100000,0000000,0000000,
  38. 0000000,0000000,0000000,0000000,0000000,0000000,
  39. 0,0,0,0,0,0,0,0,0,0,0,0};
  40. extern short q32[];
  41.  
  42. /*6.9314718055994530941723212145817656807550013436025525412068000949339362E-1*/
  43. short qlog2[NQ] = {
  44. 0x0000,0x4000,0x0000,0xb172,0x17f7,0xd1cf,0x79ab,0xc9e3,
  45. 0xb398,0x03f2,0xf6af,0x40f3,0x4326,0x7298,0xb62d,0x8a0d,
  46. 0x175b,0x8baa,0xfa2b,0xe7b8,0x7620,0x6deb,0xac98,0x5595,};
  47. extern short qlog2[];
  48.  
  49. /*  1.41421356237309504880168872420969807856967187537694
  50.  *    80731766797379907324784621070388503875343276415727e0
  51.  */
  52. short qsqrt2[NQ] = {
  53. 0x0000,0x4001,0x0000,0xb504,0xf333,0xf9de,0x6484,0x597d,
  54. 0x89b3,0x754a,0xbe9f,0x1d6f,0x60ba,0x893b,0xa84c,0xed17,
  55. 0xac85,0x8333,0x9915,0x4afc,0x8304,0x3ab8,0xa2c3,0xa8b2,};
  56. extern short qsqrt2[];
  57.  
  58. /* 2/sqrt(PI) =
  59.  *1.1283791670955125738961589031215451716881012586579977136881714434212849E0*/
  60. short oneopi[NQ] = {
  61. 0x0000,0x4001,0x0000,0x906e,0xba82,0x14db,0x688d,0x71d4,
  62. 0x8a7f,0x6bfe,0xc344,0x1409,0xa0eb,0xac3e,0x7517,0x39a1,
  63. 0x5830,0xcce6,0x20b0,0xc075,0x9cf8,0x5927,0x0f11,0x40c0};
  64. extern short oneopi[];
  65.  
  66. /* 3.14159265358979323846264338327950288419716939937510
  67.  *  582097494459230781640628620899862803482534211706798e0
  68.  */
  69. short qpi[NQ] = {
  70. 0x0000,0x4002,0x0000,0xc90f,0xdaa2,0x2168,0xc234,0xc4c6,
  71. 0x628b,0x80dc,0x1cd1,0x2902,0x4e08,0x8a67,0xcc74,0x020b,
  72. 0xbea6,0x3b13,0x9b22,0x514a,0x0879,0x8e34,0x04dd,0xef95,};
  73. extern short qpi[];
  74.  
  75.  
  76. /* 5.77215664901532860606512090082402431042159335939923
  77.  *   59880576723488486772677766467093694706329174674951e-1
  78.  */
  79. short qeul[NQ] = {
  80. 0x0000,0x4000,0x0000,0x93c4,0x67e3,0x7db0,0xc7a4,0xd1be,
  81. 0x3f81,0x0152,0xcb56,0xa1ce,0xcc3a,0xf65c,0xc019,0x0c03,
  82. 0xdf34,0x709a,0xffbd,0x8e4b,0x59fa,0x03a9,0xf0ee,0xd065,};
  83. extern short qeul[];
  84.  
  85. #else
  86.  
  87. /*                            qconst.c    */
  88. /*  q type constants used by high precision check routines */
  89.  
  90. /* 0.0 */
  91. short qzero[NQ] = {
  92. 0000000,0000000,0000000,0000000,0000000,0000000,
  93. 0000000,0000000,0000000,0000000,0000000,0000000};
  94. extern short qzero[];
  95.  
  96. /* 5.0E-1 */
  97. short qhalf[NQ] = {
  98. 0000000,0040000,0000000,0100000,0000000,0000000,
  99. 0000000,0000000,0000000,0000000,0000000,0000000};
  100. extern short qhalf[];
  101. /* 1.0E0 */
  102. short qone[NQ] = {
  103. 0000000,0040001,0000000,0100000,0000000,0000000,
  104. 0000000,0000000,0000000,0000000,0000000,0000000};
  105. extern short qone[];
  106. /* 2.0E0 */
  107. short qtwo[NQ] = {
  108. 0000000,0040002,0000000,0100000,0000000,0000000,
  109. 0000000,0000000,0000000,0000000,0000000,0000000};
  110. extern short qtwo[];
  111. /* 3.2E1 */
  112. short q32[NQ] = {
  113. 0000000,0040006,0000000,0100000,0000000,0000000,
  114. 0000000,0000000,0000000,0000000,0000000,0000000};
  115. extern short q32[];
  116. /* 6.93147180559945309417232121458176568075500134360255E-1 */
  117. short qlog2[NQ] = {
  118. 0000000,0040000,0000000,0130562,0013767,0150717,
  119. 0074653,0144743,0131630,0001762,0173257,0040363};
  120. extern short qlog2[];
  121. /* 1.41421356237309504880168872420969807856967187537695E0 */
  122. short qsqrt2[NQ] = {
  123. 0000000,0040001,0000000,0132404,0171463,0174736,
  124. 0062204,0054575,0104663,0072512,0137237,0016557};
  125. extern short qsqrt2[];
  126. /* 2/sqrt(PI) =
  127.  * 1.12837916709551257389615890312154517168810125865800E0 */
  128. short oneopi[NQ] = {
  129. 0000000,0040001,0000000,0110156,0135202,0012333,
  130. 0064215,0070724,0105177,0065776,0141504,0012012};
  131. extern short oneopi[];
  132. /* 3.14159265358979323846264338327950288419716939937511E0 */
  133. short qpi[NQ] = {
  134. 0000000,0040002,0000000,0144417,0155242,0020550,
  135. 0141064,0142306,0061213,0100334,0016321,0024402};
  136. extern short qpi[];
  137. /* 5.7721566490153286060651209008240243104215933593992E-1 */
  138. short qeul[NQ] = {
  139. 0000000,0040000,0000000,0111704,0063743,0076660,
  140. 0143644,0150676,0037601,0000522,0145526,0120717};
  141. extern short qeul[];
  142. #endif
  143.  
  144.