4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
25 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
29 #ifndef _ISO_MATH_ISO_H
30 #define _ISO_MATH_ISO_H
32 #include <sys/feature_tests.h>
44 #endif /* !defined(__P) */
46 #if __cplusplus >= 199711L
50 extern double acos
__P((double));
51 extern double asin
__P((double));
52 extern double atan
__P((double));
53 extern double atan2
__P((double, double));
54 extern double cos
__P((double));
55 extern double sin
__P((double));
56 extern double tan
__P((double));
58 extern double cosh
__P((double));
59 extern double sinh
__P((double));
60 extern double tanh
__P((double));
62 extern double exp
__P((double));
63 extern double frexp
__P((double, int *));
64 extern double ldexp
__P((double, int));
65 extern double log
__P((double));
66 extern double log10
__P((double));
67 extern double modf
__P((double, double *));
69 extern double pow
__P((double, double));
70 extern double sqrt
__P((double));
72 extern double ceil
__P((double));
73 extern double fabs
__P((double));
74 extern double floor
__P((double));
75 extern double fmod
__P((double, double));
77 #if defined(__MATHERR_ERRNO_DONTCARE)
78 #pragma does_not_read_global_data(acos, asin, atan, atan2)
79 #pragma does_not_read_global_data(cos, sin, tan, cosh, sinh, tanh)
80 #pragma does_not_read_global_data(exp, log, log10, pow, sqrt)
81 #pragma does_not_read_global_data(frexp, ldexp, modf)
82 #pragma does_not_read_global_data(ceil, fabs, floor, fmod)
83 #pragma does_not_write_global_data(acos, asin, atan, atan2)
84 #pragma does_not_write_global_data(cos, sin, tan, cosh, sinh, tanh)
85 #pragma does_not_write_global_data(exp, log, log10, pow, sqrt)
86 #pragma does_not_write_global_data(ldexp)
87 #pragma does_not_write_global_data(ceil, fabs, floor, fmod)
88 #pragma no_side_effect(acos, asin, atan, atan2)
89 #pragma no_side_effect(cos, sin, tan, cosh, sinh, tanh)
90 #pragma no_side_effect(exp, log, log10, pow, sqrt)
91 #pragma no_side_effect(ldexp)
92 #pragma no_side_effect(ceil, fabs, floor, fmod)
95 #if __cplusplus >= 199711L
96 extern float __acosf(float);
97 extern float __asinf(float);
98 extern float __atanf(float);
99 extern float __atan2f(float, float);
100 extern float __ceilf(float);
101 extern float __cosf(float);
102 extern float __coshf(float);
103 extern float __expf(float);
104 extern float __fabsf(float);
105 extern float __floorf(float);
106 extern float __fmodf(float, float);
107 extern float __frexpf(float, int *);
108 extern float __ldexpf(float, int);
109 extern float __logf(float);
110 extern float __log10f(float);
111 extern float __modff(float, float *);
112 extern float __powf(float, float);
113 extern float __sinf(float);
114 extern float __sinhf(float);
115 extern float __sqrtf(float);
116 extern float __tanf(float);
117 extern float __tanhf(float);
119 extern long double __acosl(long double);
120 extern long double __asinl(long double);
121 extern long double __atanl(long double);
122 extern long double __atan2l(long double, long double);
123 extern long double __ceill(long double);
124 extern long double __cosl(long double);
125 extern long double __coshl(long double);
126 extern long double __expl(long double);
127 extern long double __fabsl(long double);
128 extern long double __floorl(long double);
129 extern long double __fmodl(long double, long double);
130 extern long double __frexpl(long double, int *);
131 extern long double __ldexpl(long double, int);
132 extern long double __logl(long double);
133 extern long double __log10l(long double);
134 extern long double __modfl(long double, long double *);
135 extern long double __powl(long double, long double);
136 extern long double __sinl(long double);
137 extern long double __sinhl(long double);
138 extern long double __sqrtl(long double);
139 extern long double __tanl(long double);
140 extern long double __tanhl(long double);
145 inline double abs(double __X
) { return fabs(__X
); }
146 inline double pow(double __X
, int __Y
) { return
147 pow(__X
, (double) (__Y
)); }
149 inline float abs(float __X
) { return __fabsf(__X
); }
150 inline float acos(float __X
) { return __acosf(__X
); }
151 inline float asin(float __X
) { return __asinf(__X
); }
152 inline float atan(float __X
) { return __atanf(__X
); }
153 inline float atan2(float __X
, float __Y
) { return __atan2f(__X
, __Y
); }
154 inline float ceil(float __X
) { return __ceilf(__X
); }
155 inline float cos(float __X
) { return __cosf(__X
); }
156 inline float cosh(float __X
) { return __coshf(__X
); }
157 inline float exp(float __X
) { return __expf(__X
); }
158 inline float fabs(float __X
) { return __fabsf(__X
); }
159 inline float floor(float __X
) { return __floorf(__X
); }
160 inline float fmod(float __X
, float __Y
) { return __fmodf(__X
, __Y
); }
161 inline float frexp(float __X
, int *__Y
) { return __frexpf(__X
, __Y
); }
162 inline float ldexp(float __X
, int __Y
) { return __ldexpf(__X
, __Y
); }
163 inline float log(float __X
) { return __logf(__X
); }
164 inline float log10(float __X
) { return __log10f(__X
); }
165 inline float modf(float __X
, float *__Y
) { return __modff(__X
, __Y
); }
166 inline float pow(float __X
, float __Y
) { return __powf(__X
, __Y
); }
167 inline float pow(float __X
, int __Y
) { return
168 pow((double) (__X
), (double) (__Y
)); }
169 inline float sin(float __X
) { return __sinf(__X
); }
170 inline float sinh(float __X
) { return __sinhf(__X
); }
171 inline float sqrt(float __X
) { return __sqrtf(__X
); }
172 inline float tan(float __X
) { return __tanf(__X
); }
173 inline float tanh(float __X
) { return __tanhf(__X
); }
175 inline long double abs(long double __X
) { return __fabsl(__X
); }
176 inline long double acos(long double __X
) { return __acosl(__X
); }
177 inline long double asin(long double __X
) { return __asinl(__X
); }
178 inline long double atan(long double __X
) { return __atanl(__X
); }
179 inline long double atan2(long double __X
, long double __Y
) { return
180 __atan2l(__X
, __Y
); }
181 inline long double ceil(long double __X
) { return __ceill(__X
); }
182 inline long double cos(long double __X
) { return __cosl(__X
); }
183 inline long double cosh(long double __X
) { return __coshl(__X
); }
184 inline long double exp(long double __X
) { return __expl(__X
); }
185 inline long double fabs(long double __X
) { return __fabsl(__X
); }
186 inline long double floor(long double __X
) { return __floorl(__X
); }
187 inline long double fmod(long double __X
, long double __Y
) { return
189 inline long double frexp(long double __X
, int *__Y
) { return
190 __frexpl(__X
, __Y
); }
191 inline long double ldexp(long double __X
, int __Y
) { return
192 __ldexpl(__X
, __Y
); }
193 inline long double log(long double __X
) { return __logl(__X
); }
194 inline long double log10(long double __X
) { return __log10l(__X
); }
195 inline long double modf(long double __X
, long double *__Y
) { return
197 inline long double pow(long double __X
, long double __Y
) { return
199 inline long double pow(long double __X
, int __Y
) { return
200 __powl(__X
, (long double) (__Y
)); }
201 inline long double sin(long double __X
) { return __sinl(__X
); }
202 inline long double sinh(long double __X
) { return __sinhl(__X
); }
203 inline long double sqrt(long double __X
) { return __sqrtl(__X
); }
204 inline long double tan(long double __X
) { return __tanl(__X
); }
205 inline long double tanh(long double __X
) { return __tanhl(__X
); }
206 } /* end of extern "C++" */
207 #endif /* __cplusplus >= 199711L */
209 #if __cplusplus >= 199711L
210 } /* end of namespace std */
217 #endif /* _ISO_MATH_ISO_H */