2 *math.h - definitions and declarations for math library
4 * Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
7 * This file contains constant definitions and external subroutine
8 * declarations for the math subroutine library.
11 *******************************************************************************/
14 #ifndef NO_EXT_KEYS /* extensions enabled */
16 #else /* extensions not enabled */
18 #endif /* NO_EXT_KEYS */
21 /* definition of exception struct - this struct is passed to the matherr
22 * routine when a floating point exception is detected
25 #ifndef _EXCEPTION_DEFINED
27 int type; /* exception type - see below */
28 char *name; /* name of function where error occured */
29 double arg1; /* first argument to function */
30 double arg2; /* second argument (if any) to function */
31 double retval; /* value to be returned by function */
33 #define _EXCEPTION_DEFINED
37 /* definition of a complex struct to be used by those who use cabs and
38 * want type checking on their argument
41 #ifndef _COMPLEX_DEFINED
43 double x,y; /* real and imaginary parts */
45 #define _COMPLEX_DEFINED
49 /* Constant definitions for the exception type passed in the exception struct
52 #define DOMAIN 1 /* argument domain error */
53 #define SING 2 /* argument singularity */
54 #define OVERFLOW 3 /* overflow range error */
55 #define UNDERFLOW 4 /* underflow range error */
56 #define TLOSS 5 /* total loss of precision */
57 #define PLOSS 6 /* partial loss of precision */
63 /* definitions of HUGE and HUGE_VAL - respectively the XENIX and ANSI names
64 * for a value returned in case of error by a number of the floating point
73 /* function prototypes */
76 double _CDECL acos(double);
77 double _CDECL asin(double);
78 double _CDECL atan(double);
79 double _CDECL atan2(double, double);
80 double _CDECL atof(const char *);
81 double _CDECL cabs(struct complex);
82 double _CDECL ceil(double);
83 double _CDECL cos(double);
84 double _CDECL cosh(double);
85 int _CDECL dieeetomsbin(double *, double *);
86 int _CDECL dmsbintoieee(double *, double *);
87 double _CDECL exp(double);
88 double _CDECL fabs(double);
89 int _CDECL fieeetomsbin(float *, float *);
90 double _CDECL floor(double);
91 double _CDECL fmod(double, double);
92 int _CDECL fmsbintoieee(float *, float *);
93 double _CDECL frexp(double, int *);
94 double _CDECL hypot(double, double);
95 double _CDECL j0(double);
96 double _CDECL j1(double);
97 double _CDECL jn(int, double);
98 long _CDECL labs(long);
99 double _CDECL ldexp(double, int);
100 double _CDECL log(double);
101 double _CDECL log10(double);
102 int _CDECL matherr(struct exception *);
103 double _CDECL modf(double, double *);
104 double _CDECL pow(double, double);
105 double _CDECL sin(double);
106 double _CDECL sinh(double);
107 double _CDECL sqrt(double);
108 double _CDECL tan(double);
109 double _CDECL tanh(double);
110 double _CDECL y0(double);
111 double _CDECL y1(double);
112 double _CDECL yn(int, double);