home *** CD-ROM | disk | FTP | other *** search
- #define P_MATH_OPH
-
- #define P_FLT_MAXEXP 1023 /* maximum magnitude of float exponent */
- #define P_FLT_MANT 53 /* number of bits in mantissa (binary precission) */
- #define P_FLT_PREC 15 /* approximate precision in decimal digits */
-
- /* Cracked form of double float */
-
- STRUCT P_CRKFLT
- sign%
- exp%
- mant&(2)
- ENDS
-
- /* values for sign above */
-
- #define P_FLT_ZERO 0 /* value is zero */
- #define P_FLT_POS 1 /* value is positive */
- #define P_FLT_NEG 2 /* value is negative */
-
- /* format specification for p_dtob() */
-
- STRUCT P_DTOB
- type#
- width#
- ndec#
- point#
- triad#
- trilen#
- ENDS
-
- /* values for type in the above */
-
- #define P_DTOB_FIXED 0 /* fixed number of decimap points */
- #define P_DTOB_EXPONENT 1 /* exponent notation */
- #define P_DTOB_GENERAL 2 /* general format */
-
- /* Struct for p_poly() */
-
- STRUCT P_POLY
- num%
- c(1)
- ENDS
-
- /* DOUBLE constants */
-
- #define SQHF .70710678118654752440 /* Square root of a half */
- #define RLN2 1.4426950408889634 /* Reciprocal of ln 2 */
- #define RLN10 0.4342944819032518 /* Reciprocal of ln 10 */
- #define RLG2 0.3010299956639812 /* Reciprocal of log 2 */
- #define PI 3.1415926535897932 /* Pi */
- #define RPI 0.3183098861837907 /* Reciprocal of Pi */
- #define PIB2 1.5707963267948966 /* pi/2 */
- #define DRPI 0.6366197723675813 /* 2/pi */
- #define SQT3 1.7320508075688773 /* Square root of three */
- #define MSQ3 0.2679491924311227 /* 2 minus square root of three */
- #define RADTODEG 57.29577951308232 /* 1 radian in degrees (180/pi) */
- #define DEGTORAD 0.017453292519943296 /* 1 degree in radians */
-
- #define MOD(a,b) (a-(a/b)*b)
-
-