math.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. /*
  2. * This file was automatically generated by version 1.7 of cextract.
  3. * Manual editing not recommended.
  4. *
  5. * Created: Fri Feb 23 20:31:13 1996
  6. *
  7. * Modified (anyway) for PalmOS Feb 22, 1997, D.Jeff Dionne
  8. */
  9. typedef struct {
  10. float r;
  11. float i;
  12. }cmplxf;
  13. /* Some useful constants. */
  14. #define M_E 2.7182818284590452354 /* e */
  15. #define M_LOG2E 1.4426950408889634074 /* log_2 e */
  16. #define M_LOG10E 0.43429448190325182765 /* log_10 e */
  17. #define M_LN2 0.69314718055994530942 /* log_e 2 */
  18. #define M_LN10 2.30258509299404568402 /* log_e 10 */
  19. #define M_PI 3.14159265358979323846 /* pi */
  20. #define M_PI_2 1.57079632679489661923 /* pi/2 */
  21. #define M_PI_4 0.78539816339744830962 /* pi/4 */
  22. #define M_1_PI 0.31830988618379067154 /* 1/pi */
  23. #define M_2_PI 0.63661977236758134308 /* 2/pi */
  24. #define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
  25. #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
  26. #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
  27. #if 1
  28. extern double sin(double);
  29. extern double cos(double);
  30. extern double sqrt(double);
  31. #else
  32. extern float acos ( float x );
  33. extern float acosh ( float xx );
  34. extern int airy ( float xx, float *ai, float *aip, float *bi, float *bip );
  35. extern float asin ( float xx );
  36. extern float asinh ( float xx );
  37. extern float atan2 ( float y, float x );
  38. extern float atan ( float xx );
  39. extern float atanh ( float xx );
  40. extern float bdtrc ( int k, int n, float pp );
  41. extern float bdtr ( int k, int n, float pp );
  42. extern float bdtri ( int k, int n, float yy );
  43. extern float beta ( float aa, float bb );
  44. extern float cabs ( cmplxf *z );
  45. extern void cacos ( cmplxf *z, cmplxf *w );
  46. extern void cadd ( cmplxf *a, cmplxf *b, cmplxf *c );
  47. extern void casin ( cmplxf *z, cmplxf *w );
  48. extern void catan ( cmplxf *z, cmplxf *w );
  49. extern float cbrt ( float xx );
  50. extern void cchsh ( float xx, float *c, float *s );
  51. extern void ccos ( cmplxf *z, cmplxf *w );
  52. extern void ccot ( cmplxf *z, cmplxf *w );
  53. extern void cdiv ( cmplxf *a, cmplxf *b, cmplxf *c );
  54. extern float ceil ( float x );
  55. extern void cexp ( cmplxf *z, cmplxf *w );
  56. extern float chbevl ( float x, float *array, int n );
  57. extern float chdtrc ( float dff, float xx );
  58. extern float chdtr ( float dff, float xx );
  59. extern float chdtri ( float dff, float yy );
  60. extern void clog ( cmplxf *z, cmplxf *w );
  61. extern void cmov ( short *a, short *b );
  62. extern void cmul ( cmplxf *a, cmplxf *b, cmplxf *c );
  63. extern void cneg ( cmplxf *a );
  64. extern float cosdg ( float xx );
  65. extern float cos ( float xx );
  66. extern float cosh ( float xx );
  67. extern float cotdg ( float x );
  68. extern float cot ( float x );
  69. extern void csin ( cmplxf *z, cmplxf *w );
  70. extern void csqrt ( cmplxf *z, cmplxf *w );
  71. extern void csub ( cmplxf *a, cmplxf *b, cmplxf *c );
  72. extern void ctan ( cmplxf *z, cmplxf *w );
  73. extern float ctans ( cmplxf *z );
  74. extern float dawsn ( float xxx );
  75. extern int dprec ( void );
  76. extern float ellie ( float phia, float ma );
  77. extern float ellik ( float phia, float ma );
  78. extern float ellpe ( float xx );
  79. extern int ellpj ( float uu, float mm, float *sn, float *cn, float *dn, float *ph );
  80. extern float ellpk ( float xx );
  81. extern float erfc ( float aa );
  82. extern float erf ( float xx );
  83. extern float exp10 ( float xx );
  84. extern float exp2 ( float xx );
  85. extern float exp ( float xx );
  86. extern float expn ( int n, float xx );
  87. extern float fac ( int i );
  88. extern float fdtrc ( int ia, int ib, float xx );
  89. extern float fdtr ( int ia, int ib, int xx );
  90. extern float fdtri ( int ia, int ib, float yy );
  91. extern float floor ( float x );
  92. extern void fresnl ( float xxa, float *ssa, float *cca );
  93. extern float frexp ( float x, int *pw2 );
  94. extern float gamma ( float xx );
  95. extern float gdtrc ( float aa, float bb, float xx );
  96. extern float gdtr ( float aa, float bb, float xx );
  97. extern float hyp2f0 ( float aa, float bb, float xx, int type, float *err );
  98. extern float hyp2f1 ( float aa, float bb, float cc, float xx );
  99. extern float hyperg ( float aa, float bb, float xx );
  100. extern float i0e ( float x );
  101. extern float i0 ( float x );
  102. extern float i1e ( float xx );
  103. extern float i1 ( float xx );
  104. extern float igamc ( float aa, float xx );
  105. extern float igam ( float aa, float xx );
  106. extern float igami ( float aa, float yy0 );
  107. extern float incbet ( float aaa, float bbb, float xxx );
  108. extern float incbi ( float aaa, float bbb, float yyy0 );
  109. extern float incbps ( float aa, float bb, float xx );
  110. extern float iv ( float v, float x );
  111. extern float j0 ( float xx );
  112. extern float j1 ( float xx );
  113. extern float jn ( int n, float xx );
  114. extern float jv ( float nn, float xx );
  115. extern float k0e ( float xx );
  116. extern float k0 ( float xx );
  117. extern float k1e ( float xx );
  118. extern float k1 ( float xx );
  119. extern float kn ( int nnn, float xx );
  120. extern float ldexp ( float x, int pw2 );
  121. extern int ldprec ( void );
  122. extern float lgam ( float xx );
  123. extern float log10 ( float xx );
  124. extern float log2 ( float xx );
  125. extern float log ( float xx );
  126. /* extern int mtherr ( char *name, int code ); */
  127. extern float nbdtrc ( int k, int n, float pp );
  128. extern float nbdtr ( int k, int n, float pp );
  129. extern float ndtr ( float aa );
  130. extern float ndtri ( float yy0 );
  131. extern float onef2 ( float aa, float bb, float cc, float xx, float *err );
  132. extern float p1evl ( float xx, float *coef, int N );
  133. extern float pdtrc ( int k, float mm );
  134. extern float pdtr ( int k, float mm );
  135. extern float pdtri ( int k, float yy );
  136. extern void poladd ( float a[], int na, float b[], int nb, float c[] );
  137. extern void polclr ( float *a, int n );
  138. extern int poldiv ( float a[], int na, float b[], int nb, float c[] );
  139. extern float poleva ( float *a, int na, float xx );
  140. extern float polevl ( float xx, float *coef, int N );
  141. extern void polini ( int maxdeg );
  142. extern void polmov ( float *a, int na, float *b );
  143. extern void polmul ( float a[], int na, float b[], int nb, float c[] );
  144. extern void polprt ( float *a, int na, int d );
  145. extern void polsbt ( float a[], int na, float b[], int nb, float c[] );
  146. extern void polsub ( float a[], int na, float b[], int nb, float c[] );
  147. extern float pow ( float x, float y );
  148. extern float powi ( float x, int nn );
  149. extern float psi ( float xx );
  150. extern float redupi ( float xx );
  151. extern float rgamma ( float xx );
  152. extern int shichi ( float xx, float *si, float *ci );
  153. extern int sici ( float xx, float *si, float *ci );
  154. extern float sindg ( float xx );
  155. extern float sin ( float xx );
  156. extern float sinh ( float xx );
  157. extern float spence ( float xx );
  158. extern int sprec ( void );
  159. extern float sqrt ( float xx );
  160. extern float stdtr ( int k, float tt );
  161. extern float struve ( float vv, float xx );
  162. extern float tandg ( float x );
  163. extern float tan ( float x );
  164. extern float tanh ( float xx );
  165. extern float threef0 ( float aa, float bb, float cc, float xx, float *err );
  166. extern float y0 ( float xx );
  167. extern float y1 ( float xx );
  168. extern float yn ( int nn, float xx );
  169. extern float yv ( float vv, float xx );
  170. extern float zetac ( float xx );
  171. extern float zeta ( float xx, float qq );
  172. #endif