|
|
1.1 ! root 1: /* (-lgl ! 2: * COHERENT Version 4.0 ! 3: * Copyright (c) 1982, 1992 by Mark Williams Company. ! 4: * All rights reserved. May not be copied without permission. ! 5: -lgl) */ ! 6: /* ! 7: * Definitions for math library. ! 8: */ ! 9: #ifndef MATH_H ! 10: #define MATH_H ! 11: ! 12: #if _DECVAX ! 13: #define HUGE_VAL 1e+37 /* Infinity */ ! 14: #define L2HUGE_VAL 127.0 /* log2(infinity) */ ! 15: #define L10P 17 /* log10(precision) */ ! 16: #define L2L2P 6 /* log2(log2(precision)) */ ! 17: #elif _IEEE ! 18: #define HUGE_VAL 1e+308 /* Infinity */ ! 19: #define L2HUGE_VAL 1023.0 /* log2(infinity) */ ! 20: #define L10P 16 /* log10(precision) */ ! 21: #define L2L2P 6 /* log2(log2(precision)) */ ! 22: #endif ! 23: /* ! 24: * Error return values. ! 25: */ ! 26: #define EDOM 33 /* Domain error */ ! 27: #define ERANGE 34 /* Result too large */ ! 28: ! 29: /* ! 30: * Constants. ! 31: */ ! 32: #define PI 0.31415926535897932e+01 ! 33: #define SQRT2 0.14142135623730950e+01 ! 34: #define LOG2B10 0.30102999566398119e+00 ! 35: #define LOG10BE 0.23025850929940456e+01 ! 36: #define LOG10B2 0.33219280948873623e+01 ! 37: #define LOGEB2 0.14426950408889634e+01 ! 38: ! 39: /* ! 40: * Complex variables. ! 41: */ ! 42: typedef struct cpx { ! 43: double z_r; ! 44: double z_i; ! 45: } CPX; ! 46: ! 47: /* ! 48: * Status from routines. ! 49: */ ! 50: extern int errno; ! 51: ! 52: /* ! 53: * Internal functions. ! 54: */ ! 55: double _pol(); ! 56: double _two(); ! 57: ! 58: /* ! 59: * Math library functions. ! 60: */ ! 61: double acos(); ! 62: double asin(); ! 63: double atan(); ! 64: double atan2(); ! 65: double cabs(); ! 66: double ceil(); ! 67: double cos(); ! 68: double cosh(); ! 69: double exp(); ! 70: double fabs(); ! 71: double floor(); ! 72: double hypot(); ! 73: double j0(); ! 74: double j1(); ! 75: double jn(); ! 76: double log(); ! 77: double log10(); ! 78: double pow(); ! 79: double sin(); ! 80: double sinh(); ! 81: double sqrt(); ! 82: double tan(); ! 83: double tanh(); ! 84: ! 85: /* ! 86: * C library floating point functions. ! 87: */ ! 88: double atof(); ! 89: double frexp(); ! 90: double ldexp(); ! 91: double modf(); ! 92: ! 93: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.