Annotation of mstools/h/math.h, revision 1.1.1.3

1.1       root        1: /***
                      2: *math.h - definitions and declarations for math library
                      3: *
1.1.1.2   root        4: *      Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
1.1       root        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: #ifndef _INC_MATH
                     14: 
                     15: #ifdef __cplusplus
                     16: extern "C" {
                     17: #endif
                     18: 
                     19: 
1.1.1.3 ! root       20: /*
        !            21:  * Conditional macro definition for function calling type and variable type
        !            22:  * qualifiers.
        !            23:  */
        !            24: #if   ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
        !            25: 
        !            26: /*
        !            27:  * Definitions for MS C8-32 (386/486) compiler
        !            28:  */
        !            29: #define _CRTAPI1 __cdecl
        !            30: #define _CRTAPI2 __cdecl
        !            31: 
        !            32: #elif ( _MSC_VER == 600 )
        !            33: 
        !            34: /*
        !            35:  * Definitions for old MS C6-386 compiler
        !            36:  */
        !            37: #define _CRTAPI1 _cdecl
        !            38: #define _CRTAPI2 _cdecl
        !            39: #define _M_IX86  300
        !            40: 
        !            41: #else
        !            42: 
        !            43: /*
        !            44:  * Other compilers (e.g., MIPS)
        !            45:  */
        !            46: #define _CRTAPI1
        !            47: #define _CRTAPI2
        !            48: 
1.1.1.2   root       49: #endif
1.1       root       50: 
1.1.1.3 ! root       51: 
1.1       root       52: /* definition of _exception struct - this struct is passed to the matherr
                     53:  * routine when a floating point exception is detected
                     54:  */
                     55: 
                     56: #ifndef _EXCEPTION_DEFINED
                     57: struct _exception {
                     58:        int type;               /* exception type - see below */
                     59:        char *name;             /* name of function where error occured */
                     60:        double arg1;            /* first argument to function */
                     61:        double arg2;            /* second argument (if any) to function */
                     62:        double retval;          /* value to be returned by function */
                     63:        } ;
                     64: 
                     65: #if !__STDC__
                     66: /* Non-ANSI name for compatibility */
                     67: #define exception _exception
                     68: #endif
                     69: 
                     70: #define _EXCEPTION_DEFINED
                     71: #endif
                     72: 
                     73: 
                     74: /* definition of a _complex struct to be used by those who use cabs and
                     75:  * want type checking on their argument
                     76:  */
                     77: 
                     78: #ifndef _COMPLEX_DEFINED
                     79: struct _complex {
                     80:        double x,y;     /* real and imaginary parts */
                     81:        } ;
                     82: 
                     83: #if !__STDC__
                     84: /* Non-ANSI name for compatibility */
                     85: #define complex _complex
                     86: #endif
                     87: 
                     88: #define _COMPLEX_DEFINED
                     89: #endif
                     90: 
                     91: 
                     92: /* Constant definitions for the exception type passed in the _exception struct
                     93:  */
                     94: 
                     95: #define _DOMAIN        1       /* argument domain error */
                     96: #define _SING          2       /* argument singularity */
                     97: #define _OVERFLOW      3       /* overflow range error */
                     98: #define _UNDERFLOW     4       /* underflow range error */
                     99: #define _TLOSS         5       /* total loss of precision */
                    100: #define _PLOSS         6       /* partial loss of precision */
                    101: 
                    102: #define EDOM           33
                    103: #define ERANGE         34
                    104: 
                    105: 
                    106: /* definitions of _HUGE and HUGE_VAL - respectively the XENIX and ANSI names
                    107:  * for a value returned in case of error by a number of the floating point
                    108:  * math routines
                    109:  */
1.1.1.2   root      110: #ifdef _DLL
                    111: #define _HUGE  (*_HUGE_dll)
                    112: extern double * _HUGE_dll;
                    113: #else
1.1       root      114: extern double _HUGE;
1.1.1.2   root      115: #endif
                    116: 
1.1       root      117: #define HUGE_VAL _HUGE
                    118: 
                    119: /* function prototypes */
                    120: 
1.1.1.3 ! root      121: int    _CRTAPI1 abs(int);
        !           122: double _CRTAPI1 acos(double);
        !           123: double _CRTAPI1 asin(double);
        !           124: double _CRTAPI1 atan(double);
        !           125: double _CRTAPI1 atan2(double, double);
        !           126: double _CRTAPI1 atof(const char *);
        !           127: double _CRTAPI1 _cabs(struct _complex);
        !           128: double _CRTAPI1 ceil(double);
        !           129: double _CRTAPI1 cos(double);
        !           130: double _CRTAPI1 cosh(double);
        !           131: double _CRTAPI1 exp(double);
        !           132: double _CRTAPI1 fabs(double);
        !           133: double _CRTAPI1 floor(double);
        !           134: double _CRTAPI1 fmod(double, double);
        !           135: double _CRTAPI1 frexp(double, int *);
        !           136: double _CRTAPI1 _hypot(double, double);
        !           137: double _CRTAPI1 _j0(double);
        !           138: double _CRTAPI1 _j1(double);
        !           139: double _CRTAPI1 _jn(int, double);
        !           140: long   _CRTAPI1 labs(long);
        !           141: double _CRTAPI1 ldexp(double, int);
        !           142: double _CRTAPI1 log(double);
        !           143: double _CRTAPI1 log10(double);
        !           144: int    _CRTAPI1 _matherr(struct _exception *);
        !           145: double _CRTAPI1 modf(double, double *);
        !           146: double _CRTAPI1 pow(double, double);
        !           147: double _CRTAPI1 sin(double);
        !           148: double _CRTAPI1 sinh(double);
        !           149: double _CRTAPI1 sqrt(double);
        !           150: double _CRTAPI1 tan(double);
        !           151: double _CRTAPI1 tanh(double);
        !           152: double _CRTAPI1 _y0(double);
        !           153: double _CRTAPI1 _y1(double);
        !           154: double _CRTAPI1 _yn(int, double);
1.1       root      155: 
                    156: 
1.1.1.3 ! root      157: #ifdef _M_IX86
1.1       root      158: #pragma function(acos, asin, atan, atan2, cos, cosh, exp, fmod, log, log10, pow, sin, sinh, sqrt, tan, tanh)
                    159: #endif
                    160: 
                    161: #if !__STDC__
                    162: /* Non-ANSI names for compatibility */
                    163: 
                    164: #define DOMAIN         _DOMAIN
                    165: #define SING           _SING
                    166: #define OVERFLOW       _OVERFLOW
                    167: #define UNDERFLOW      _UNDERFLOW
                    168: #define TLOSS          _TLOSS
                    169: #define PLOSS          _PLOSS
                    170: 
                    171: #define matherr        _matherr
                    172: 
1.1.1.2   root      173: #ifdef _DLL
                    174: #define HUGE   (*HUGE_dll)
                    175: extern double * HUGE_dll;
                    176: #else
1.1       root      177: extern double HUGE;
1.1.1.2   root      178: #endif
1.1       root      179: 
                    180: #define cabs           _cabs
                    181: #define hypot          _hypot
                    182: #define j0             _j0
                    183: #define j1             _j1
                    184: #define jn             _jn
                    185: #define matherr        _matherr
                    186: #define y0             _y0
                    187: #define y1             _y1
                    188: #define yn             _yn
                    189: 
                    190: #define cabsl          _cabsl
                    191: #define hypotl         _hypotl
                    192: #endif /* __STDC__ */
                    193: 
                    194: #ifdef __cplusplus
                    195: }
                    196: #endif
                    197: 
                    198: #define _INC_MATH
                    199: #endif /* _INC_MATH */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.