home *** CD-ROM | disk | FTP | other *** search
- /*
- * math.h
- *
- * Copyright (C) MicroWay, Inc., 1987, 1988, 1989
- *
- */
-
-
- #ifdef i386
- # define LittleEndian
- # define ieee_float
- #endif
-
-
- #define LIBM_PI 3.14159265358979323846
- #define PI 3.14159265358979323846
-
-
- double acos(), sqrt(), atan(), asin(), atan2(), j0(), sin(), cos(), y0(),
- log(), j1(), y1(), jn(), yn(), erf(), erfc(), exp(), gamma(),
- sinh(), cosh(), tanh(), log10(), pow(), tan(), atof(), ldexp(),
- frexp(), modf(), ceil(), floor(), hypot(), fabs(), cabs(), fmod();
-
- double d_abs(), d_dim(), d_imag(), d_int(), d_mod(), d_nint(),
- d_prod(), d_sign(), pow_di(), pow_dd(), z_abs();
-
- float rldexp();
- float racos(), rasin(), ratan(), ratan2(), rcos(), rexp(), rlog(),
- rlog10(), rsin(), rsqrt(), rtan();
-
- char *ecvt(), *fcvt(), *gcvt();
-
- float besj0(), besj1(), besjn(), besy0(), besy1(), besyn();
- float c_abs(), pow_ri(), pow_rr(), r_abs(), r_dim(), r_imag(), r_int(),
- r_mod(), r_nint(), r_sign(), r_sinh(), r_tanh();
-
-
- /* Degree style trigonometric functions. */
-
- float rsind(), rcosd(), rtand(), rasind(), racosd(), ratand(), ratan2d(),
- r_sind(), r_cosd(), r_tand(), r_acosd(), r_asind(), r_atand(),
- r_atn2d(), ran_();
-
- double sind(), cosd(), tand(), asind(), acosd(), atand(), atan2d(),
- d_sind(), d_cosd(), d_tand(), d_acosd(), d_asind(), d_atand(),
- d_atn2d();
-
-
- typedef struct {
- unsigned long dbl_frac2 : 32;
- unsigned long dbl_frac1 : 20;
- unsigned long dbl_exp : 11;
- unsigned long dbl_sign : 1;
- } DOUBLE;
- typedef struct {
- unsigned long flt_frac1 : 23;
- unsigned long flt_exp : 8;
- unsigned long flt_sign : 1;
- } FLOAT;
-
-
- #define KNOWN_FLOATING_POINT_FORMAT 1
- #define EXTRACTEXPONENT(x) ((int)((DOUBLE *)&(x))->dbl_exp-1022)
- #define EXTRACTFLOATEXPONENT(x) ((int)((FLOAT *)&(x))->flt_exp-126)
- #define SETEXPONENT(x,exp) (((DOUBLE *)&(x))->dbl_exp = ((exp)+1022))
- #define SETFLOATEXPONENT(x,exp) (((FLOAT *)&(x))->flt_exp = ((exp)+126))
- #define AUGMENTEXPONENT(x, inc) (((DOUBLE *)&(x))->dbl_exp += (inc))
- #define AUGMENTFLOATEXPONENT(x, inc) (*((int *)(&x)) += (inc << 23))
- #define MINIMUMEXPONENT -1021
- #define MINIMUMFLOATEXPONENT -125
- #define MAXIMUMEXPONENT 1024
- #define MAXIMUMFLOATEXPONENT 128
- #define HUGE (1.7e308)
- #define HUGEFLOAT (3.4e38)
-