|
|
1.1 ! root 1: /*** ! 2: *math.h - definitions and declarations for math library ! 3: * ! 4: * Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved. ! 5: * ! 6: *Purpose: ! 7: * This file contains constant definitions and external subroutine ! 8: * declarations for the math subroutine library. ! 9: * [ANSI/System V] ! 10: * ! 11: ****/ ! 12: ! 13: ! 14: /* definition of exception struct - this struct is passed to the matherr ! 15: * routine when a floating point exception is detected ! 16: */ ! 17: ! 18: #ifndef _EXCEPTION_DEFINED ! 19: struct exception { ! 20: int type; /* exception type - see below */ ! 21: char *name; /* name of function where error occured */ ! 22: double arg1; /* first argument to function */ ! 23: double arg2; /* second argument (if any) to function */ ! 24: double retval; /* value to be returned by function */ ! 25: } ; ! 26: #define _EXCEPTION_DEFINED ! 27: #endif ! 28: ! 29: ! 30: /* definition of a complex struct to be used by those who use cabs and ! 31: * want type checking on their argument ! 32: */ ! 33: ! 34: #ifndef _COMPLEX_DEFINED ! 35: struct complex { ! 36: double x,y; /* real and imaginary parts */ ! 37: } ; ! 38: #define _COMPLEX_DEFINED ! 39: #endif ! 40: ! 41: ! 42: /* Constant definitions for the exception type passed in the exception struct ! 43: */ ! 44: ! 45: #define DOMAIN 1 /* argument domain error */ ! 46: #define SING 2 /* argument singularity */ ! 47: #define OVERFLOW 3 /* overflow range error */ ! 48: #define UNDERFLOW 4 /* underflow range error */ ! 49: #define TLOSS 5 /* total loss of precision */ ! 50: #define PLOSS 6 /* partial loss of precision */ ! 51: ! 52: #define EDOM 33 ! 53: #define ERANGE 34 ! 54: ! 55: ! 56: /* definitions of HUGE and HUGE_VAL - respectively the XENIX and ANSI names ! 57: * for a value returned in case of error by a number of the floating point ! 58: * math routines ! 59: */ ! 60: ! 61: #ifndef _DLL ! 62: extern double _cdecl HUGE; ! 63: #define HUGE_VAL HUGE ! 64: ! 65: #else /* _DLL */ ! 66: ! 67: #define HUGE 1.7976931348623158e+308 /* max value */ ! 68: #define HUGE_VAL 1.7976931348623158e+308 /* max value */ ! 69: #endif /* _DLL */ ! 70: ! 71: ! 72: /* function prototypes */ ! 73: ! 74: int _cdecl abs(int); ! 75: double _cdecl acos(double); ! 76: double _cdecl asin(double); ! 77: double _cdecl atan(double); ! 78: double _cdecl atan2(double, double); ! 79: double _cdecl atof(const char *); ! 80: double _cdecl cabs(struct complex); ! 81: double _cdecl ceil(double); ! 82: double _cdecl cos(double); ! 83: double _cdecl cosh(double); ! 84: int _cdecl dieeetomsbin(double *, double *); ! 85: int _cdecl dmsbintoieee(double *, double *); ! 86: double _cdecl exp(double); ! 87: double _cdecl fabs(double); ! 88: int _cdecl fieeetomsbin(float *, float *); ! 89: double _cdecl floor(double); ! 90: double _cdecl fmod(double, double); ! 91: int _cdecl fmsbintoieee(float *, float *); ! 92: double _cdecl frexp(double, int *); ! 93: double _cdecl hypot(double, double); ! 94: double _cdecl j0(double); ! 95: double _cdecl j1(double); ! 96: double _cdecl jn(int, double); ! 97: long _cdecl labs(long); ! 98: double _cdecl ldexp(double, int); ! 99: double _cdecl log(double); ! 100: double _cdecl log10(double); ! 101: int _cdecl matherr(struct exception *); ! 102: double _cdecl modf(double, double *); ! 103: double _cdecl pow(double, double); ! 104: double _cdecl sin(double); ! 105: double _cdecl sinh(double); ! 106: double _cdecl sqrt(double); ! 107: double _cdecl tan(double); ! 108: double _cdecl tanh(double); ! 109: double _cdecl y0(double); ! 110: double _cdecl y1(double); ! 111: double _cdecl yn(int, double);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.