|
1 --- stdcxx-4.2.1/include/ansi/cmath 2008-04-24 20:23:56.000000000 -0400 |
|
2 +++ stdcxx-4.2.1/include/ansi/cmath 2009-03-12 16:35:36.000000000 -0400 |
|
3 @@ -1,1053 +1,44 @@ |
|
4 // -*- C++ -*- |
|
5 -/*************************************************************************** |
|
6 +/** |
|
7 + * CDDL HEADER START |
|
8 * |
|
9 - * cmath - C++ Standard library interface to the ANSI C header math.h |
|
10 + * The contents of this file are subject to the terms of the |
|
11 + * Common Development and Distribution License (the "License"). |
|
12 + * You may not use this file except in compliance with the License. |
|
13 * |
|
14 - * $Id: cmath 550991 2007-06-26 23:58:07Z sebor $ |
|
15 + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
16 + * or http://www.opensolaris.org/os/licensing. |
|
17 + * See the License for the specific language governing permissions |
|
18 + * and limitations under the License. |
|
19 * |
|
20 - *************************************************************************** |
|
21 + * When distributing Covered Code, include this CDDL HEADER in each |
|
22 + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
23 + * If applicable, add the following below this CDDL HEADER, with the |
|
24 + * fields enclosed by brackets "[]" replaced with your own identifying |
|
25 + * information: Portions Copyright [yyyy] [name of copyright owner] |
|
26 * |
|
27 - * Licensed to the Apache Software Foundation (ASF) under one or more |
|
28 - * contributor license agreements. See the NOTICE file distributed |
|
29 - * with this work for additional information regarding copyright |
|
30 - * ownership. The ASF licenses this file to you under the Apache |
|
31 - * License, Version 2.0 (the "License"); you may not use this file |
|
32 - * except in compliance with the License. You may obtain a copy of |
|
33 - * the License at |
|
34 + * CDDL HEADER END |
|
35 * |
|
36 - * http://www.apache.org/licenses/LICENSE-2.0 |
|
37 * |
|
38 - * Unless required by applicable law or agreed to in writing, software |
|
39 - * distributed under the License is distributed on an "AS IS" BASIS, |
|
40 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
|
41 - * implied. See the License for the specific language governing |
|
42 - * permissions and limitations under the License. |
|
43 + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
|
44 + * Use is subject to license terms. |
|
45 * |
|
46 - * Copyright 1994-2006 Rogue Wave Software. |
|
47 - * |
|
48 - **************************************************************************/ |
|
49 - |
|
50 -#ifndef _RWSTD_CMATH_INCLUDED |
|
51 -#define _RWSTD_CMATH_INCLUDED |
|
52 - |
|
53 -#include <rw/_defs.h> |
|
54 - |
|
55 -#ifndef _RWSTD_NO_PURE_C_HEADERS |
|
56 -# include <ansi/_cmath.h> |
|
57 -#else |
|
58 - |
|
59 -#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS |
|
60 - |
|
61 -_RWSTD_NAMESPACE (std) { |
|
62 - |
|
63 -// avoid a conflicting exception structure on platforms where |
|
64 -// struct exception is defined unguarded in <math.h> |
|
65 -#ifndef _RWSTD_NO_MATH_EXCEPTION |
|
66 -# undef exception |
|
67 -# define exception _Math_exception |
|
68 -#endif // _RWSTD_NO_MATH_EXCEPTION |
|
69 - |
|
70 -#include _RWSTD_ANSI_C_MATH_H |
|
71 - |
|
72 -#undef exception |
|
73 - |
|
74 -} // namespace std |
|
75 - |
|
76 - |
|
77 -#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS) |
|
78 - |
|
79 -// avoid a conflicting exception structure on platforms where |
|
80 -// struct exception is defined unguarded in <math.h> |
|
81 -#ifndef _RWSTD_NO_MATH_EXCEPTION |
|
82 -# undef exception |
|
83 -# define exception math_exception |
|
84 -#endif // _RWSTD_NO_MATH_EXCEPTION |
|
85 - |
|
86 -#include _RWSTD_ANSI_C_MATH_H |
|
87 - |
|
88 -#undef exception |
|
89 -#undef abs |
|
90 -#undef acos |
|
91 -#undef asin |
|
92 -#undef atan |
|
93 -#undef atan2 |
|
94 -#undef cos |
|
95 -#undef exp |
|
96 -#undef fabs |
|
97 -#undef log |
|
98 -#undef log10 |
|
99 -#undef sin |
|
100 -#undef sqrt |
|
101 -#undef tan |
|
102 - |
|
103 - |
|
104 -#ifndef _RWSTD_NO_ACOSF |
|
105 -# define _ACOSF(x) ::acosf (x) |
|
106 -#elif !defined (_RWSTD_NO_ACOSF_IN_LIBM) |
|
107 -# undef acosf |
|
108 -extern "C" float acosf (float); |
|
109 -# define _ACOSF(x) ::acosf (x) |
|
110 -#else |
|
111 -# define _ACOSF(x) ::acos (double (x)) |
|
112 -#endif // _RWSTD_NO_ACOSF |
|
113 - |
|
114 -#ifndef _RWSTD_NO_ASINF |
|
115 -# define _ASINF(x) ::asinf (x) |
|
116 -#elif !defined (_RWSTD_NO_ASINF_IN_LIBM) |
|
117 -# undef asinf |
|
118 -extern "C" float asinf (float); |
|
119 -# define _ASINF(x) ::asinf (x) |
|
120 -#else |
|
121 -# define _ASINF(x) ::asin (double (x)) |
|
122 -#endif // _RWSTD_NO_ASINF |
|
123 - |
|
124 -#ifndef _RWSTD_NO_ATANF |
|
125 -# define _ATANF(x) ::atanf (x) |
|
126 -#elif !defined (_RWSTD_NO_ATANF_IN_LIBM) |
|
127 -# undef atanf |
|
128 -extern "C" float atanf (float); |
|
129 -# define _ATANF(x) ::atanf (x) |
|
130 -#else |
|
131 -# define _ATANF(x) ::atan (double (x)) |
|
132 -#endif // _RWSTD_NO_ATANF |
|
133 - |
|
134 -#ifndef _RWSTD_NO_ATAN2F |
|
135 -# define _ATAN2F(x, y) ::atan2f (x, y) |
|
136 -#elif !defined (_RWSTD_NO_ATAN2F_IN_LIBM) |
|
137 -# undef atan2f |
|
138 -extern "C" float atan2f (float, float); |
|
139 -# define _ATAN2F(x, y) ::atan2f (x, y) |
|
140 -#else |
|
141 -# define _ATAN2F(x, y) ::atan2 (double (x), double (y)) |
|
142 -#endif // _RWSTD_NO_ATAN2F |
|
143 - |
|
144 -#ifndef _RWSTD_NO_CEILF |
|
145 -# define _CEILF(x) ::ceilf (x) |
|
146 -#elif !defined (_RWSTD_NO_CEILF_IN_LIBM) |
|
147 -# undef ceilf |
|
148 -extern "C" float ceilf (float); |
|
149 -# define _CEILF(x) ::ceilf (x) |
|
150 -#else |
|
151 -# define _CEILF(x) ::ceil (double (x)) |
|
152 -#endif // _RWSTD_NO_CEILF |
|
153 - |
|
154 -#ifndef _RWSTD_NO_COSF |
|
155 -# define _COSF(x) ::cosf (x) |
|
156 -#elif !defined (_RWSTD_NO_COSF_IN_LIBM) |
|
157 -# undef cosf |
|
158 -extern "C" float cosf (float); |
|
159 -# define _COSF(x) ::cosf (x) |
|
160 -#else |
|
161 -# define _COSF(x) ::cos (double (x)) |
|
162 -#endif // _RWSTD_NO_COSF |
|
163 - |
|
164 -#ifndef _RWSTD_NO_COSHF |
|
165 -# define _COSHF(x) ::coshf (x) |
|
166 -#elif !defined (_RWSTD_NO_COSHF_IN_LIBM) |
|
167 -# undef coshf |
|
168 -extern "C" float coshf (float); |
|
169 -# define _COSHF(x) ::coshf (x) |
|
170 -#else |
|
171 -# define _COSHF(x) ::cosh (double (x)) |
|
172 -#endif // _RWSTD_NO_COSHF |
|
173 - |
|
174 -#ifndef _RWSTD_NO_EXPF |
|
175 -# define _EXPF(x) ::expf (x) |
|
176 -#elif !defined (_RWSTD_NO_EXPF_IN_LIBM) |
|
177 -# undef expf |
|
178 -extern "C" float expf (float); |
|
179 -# define _EXPF(x) ::expf (x) |
|
180 -#else |
|
181 -# define _EXPF(x) ::exp (double (x)) |
|
182 -#endif // _RWSTD_NO_EXPF |
|
183 - |
|
184 -#ifndef _RWSTD_NO_FABSF |
|
185 -# define _FABSF(x) fabsf (x) |
|
186 -#elif !defined (_RWSTD_NO_FABSF_IN_LIBM) |
|
187 -# undef fabsf |
|
188 -extern "C" float fabsf (float); |
|
189 -# define _FABSF(x) ::fabsf (x) |
|
190 -#else |
|
191 -# define _FABSF(x) ::fabs (double (x)) |
|
192 -#endif // _RWSTD_NO_FABSF |
|
193 - |
|
194 -#ifndef _RWSTD_NO_FLOORF |
|
195 -# define _FLOORF(x) ::floorf (x) |
|
196 -#elif !defined (_RWSTD_NO_FLOORF_IN_LIBM) |
|
197 -# undef floorf |
|
198 -extern "C" float floorf (float); |
|
199 -# define _FLOORF(x) ::floorf (x) |
|
200 -#else |
|
201 -# define _FLOORF(x) ::floor (double (x)) |
|
202 -#endif // _RWSTD_NO_FLOORF |
|
203 - |
|
204 -#ifndef _RWSTD_NO_FMODF |
|
205 -# define _FMODF(x, y) ::fmodf (x, y) |
|
206 -#elif !defined (_RWSTD_NO_FMODF_IN_LIBM) |
|
207 -# undef fmodf |
|
208 -extern "C" float fmodf (float, float); |
|
209 -# define _FMODF(x, y) ::fmodf (x, y) |
|
210 -#else |
|
211 -# define _FMODF(x, y) ::fmod (double (x), double (y)) |
|
212 -#endif // _RWSTD_NO_FMODF |
|
213 - |
|
214 -#ifndef _RWSTD_NO_FREXPF |
|
215 -# define _FREXPF(x, y) ::frexpf (x, y) |
|
216 -#elif !defined (_RWSTD_NO_FREXPF_IN_LIBM) |
|
217 -# undef frexpf |
|
218 -extern "C" float frexpf (float, int*); |
|
219 -# define _FREXPF(x, y) ::frexpf (x, y) |
|
220 -#else |
|
221 -# define _FREXPF(x, y) ::frexp (double (x), y) |
|
222 -#endif // _RWSTD_NO_FREXPF |
|
223 - |
|
224 -#ifndef _RWSTD_NO_LDEXPF |
|
225 -# define _LDEXPF(x, y) ::ldexpf (x, y) |
|
226 -#elif !defined (_RWSTD_NO_LDEXPF_IN_LIBM) |
|
227 -# undef ldexpf |
|
228 -extern "C" float ldexpf (float, int); |
|
229 -# define _LDEXPF(x, y) ::ldexpf (x, y) |
|
230 -#else |
|
231 -# define _LDEXPF(x, y) ::ldexp (double (x), y) |
|
232 -#endif // _RWSTD_NO_LDEXPF |
|
233 - |
|
234 -#ifndef _RWSTD_NO_LOGF |
|
235 -# define _LOGF(x) ::logf (x) |
|
236 -#elif !defined (_RWSTD_NO_LOGF_IN_LIBM) |
|
237 -# undef logf |
|
238 -extern "C" float logf (float); |
|
239 -# define _LOGF(x) ::logf (x) |
|
240 -#else |
|
241 -# define _LOGF(x) ::log (double (x)) |
|
242 -#endif // _RWSTD_NO_LOGF |
|
243 - |
|
244 -#ifndef _RWSTD_NO_LOG10F |
|
245 -# define _LOG10F(x) ::log10f (x) |
|
246 -#elif !defined (_RWSTD_NO_LOG10F_IN_LIBM) |
|
247 -# undef log10f |
|
248 -extern "C" float log10f (float); |
|
249 -# define _LOG10F(x) ::log10f (x) |
|
250 -#else |
|
251 -# define _LOG10F(x) ::log10 (double (x)) |
|
252 -#endif // _RWSTD_NO_LOG10F |
|
253 - |
|
254 -#ifndef _RWSTD_NO_MODFF |
|
255 -# define _MODFF(x, y) ::modff (x, y) |
|
256 -#elif !defined (_RWSTD_NO_MODFF_IN_LIBM) |
|
257 -# undef modff |
|
258 -extern "C" float modff (float, float*); |
|
259 -# define _MODFF(x, y) ::modff (x, y) |
|
260 -#else |
|
261 - |
|
262 -inline float __rw_modff (float __x, float *__y) |
|
263 -{ |
|
264 - double __tmp = *__y; |
|
265 - |
|
266 - __x = ::modf (__x, &__tmp); |
|
267 - |
|
268 - *__y = __tmp; |
|
269 - |
|
270 - return __x; |
|
271 -} |
|
272 - |
|
273 -# define _MODFF(x, y) __rw_modff (x, y) |
|
274 -#endif // _RWSTD_NO_MODFF |
|
275 - |
|
276 -#ifndef _RWSTD_NO_POWF |
|
277 -# define _POWF(x, y) ::powf (x, y) |
|
278 -#elif !defined (_RWSTD_NO_POWF_IN_LIBM) |
|
279 -# undef powf |
|
280 -extern "C" float powf (float, float); |
|
281 -# define _POWF(x, y) ::powf (x, y) |
|
282 -#else |
|
283 -# define _POWF(x, y) ::pow (double (x), double (y)) |
|
284 -#endif // _RWSTD_NO_POWF |
|
285 - |
|
286 -#ifndef _RWSTD_NO_SINF |
|
287 -# define _SINF(x) ::sinf (x) |
|
288 -#elif !defined (_RWSTD_NO_SINF_IN_LIBM) |
|
289 -# undef sinf |
|
290 -extern "C" float sinf (float); |
|
291 -# define _SINF(x) ::sinf (x) |
|
292 -#else |
|
293 -# define _SINF(x) ::sin (double (x)) |
|
294 -#endif // _RWSTD_NO_SINF |
|
295 - |
|
296 -#ifndef _RWSTD_NO_SINHF |
|
297 -# define _SINHF(x) ::sinhf (x) |
|
298 -#elif !defined (_RWSTD_NO_SINHF_IN_LIBM) |
|
299 -# undef sinhf |
|
300 -extern "C" float sinhf (float); |
|
301 -# define _SINHF(x) ::sinhf (x) |
|
302 -#else |
|
303 -# define _SINHF(x) ::sinh (double (x)) |
|
304 -#endif // _RWSTD_NO_SINHF |
|
305 - |
|
306 -#ifndef _RWSTD_NO_SQRTF |
|
307 -# define _SQRTF(x) ::sqrtf (x) |
|
308 -#elif !defined (_RWSTD_NO_SQRTF_IN_LIBM) |
|
309 -# undef sqrtf |
|
310 -extern "C" float sqrtf (float); |
|
311 -# define _SQRTF(x) ::sqrtf (x) |
|
312 -#else |
|
313 -# define _SQRTF(x) ::sqrt (double (x)) |
|
314 -#endif // _RWSTD_NO_SQRTF |
|
315 - |
|
316 -#ifndef _RWSTD_NO_TANF |
|
317 -# define _TANF(x) ::tanf (x) |
|
318 -#elif !defined (_RWSTD_NO_TANF_IN_LIBM) |
|
319 -# undef tanf |
|
320 -extern "C" float tanf (float); |
|
321 -# define _TANF(x) ::tanf (x) |
|
322 -#else |
|
323 -# define _TANF(x) ::tan (double (x)) |
|
324 -#endif // _RWSTD_NO_TANF |
|
325 - |
|
326 -#ifndef _RWSTD_NO_TANHF |
|
327 -# define _TANHF(x) ::tanhf (x) |
|
328 -#elif !defined (_RWSTD_NO_TANHF_IN_LIBM) |
|
329 -# undef tanhf |
|
330 -extern "C" float tanhf (float); |
|
331 -# define _TANHF(x) ::tanhf (x) |
|
332 -#else |
|
333 -# define _TANHF(x) ::tanh (double (x)) |
|
334 -#endif // _RWSTD_NO_TANHF |
|
335 - |
|
336 - |
|
337 -#ifndef _RWSTD_NO_ACOSL |
|
338 -# define _ACOSL(x) ::acosl (x) |
|
339 -#elif !defined (_RWSTD_NO_ACOSL_IN_LIBM) |
|
340 -# undef acosl |
|
341 -extern "C" long double acosl (long double); |
|
342 -# define _ACOSL(x) ::acosl (x) |
|
343 -#else |
|
344 -# define _ACOSL(x) ::acos (double (x)) |
|
345 -#endif // _RWSTD_NO_ACOSL |
|
346 - |
|
347 -#ifndef _RWSTD_NO_ASINL |
|
348 -# define _ASINL(x) ::asinl (x) |
|
349 -#elif !defined (_RWSTD_NO_ASINL_IN_LIBM) |
|
350 -# undef asinl |
|
351 -extern "C" long double asinl (long double); |
|
352 -# define _ASINL(x) ::asinl (x) |
|
353 -#else |
|
354 -# define _ASINL(x) ::asin (double (x)) |
|
355 -#endif // _RWSTD_NO_ASINL |
|
356 - |
|
357 -#ifndef _RWSTD_NO_ATANL |
|
358 -# define _ATANL(x) ::atanl (x) |
|
359 -#elif !defined (_RWSTD_NO_ATANL_IN_LIBM) |
|
360 -# undef atanl |
|
361 -extern "C" long double atanl (long double); |
|
362 -# define _ATANL(x) ::atanl (x) |
|
363 -#else |
|
364 -# define _ATANL(x) ::atan (double (x)) |
|
365 -#endif // _RWSTD_NO_ATANL |
|
366 - |
|
367 -#ifndef _RWSTD_NO_ATAN2L |
|
368 -# define _ATAN2L(x, y) ::atan2l (x, y) |
|
369 -#elif !defined (_RWSTD_NO_ATAN2L_IN_LIBM) |
|
370 -# undef atan2l |
|
371 -extern "C" long double atan2l (long double, long double); |
|
372 -# define _ATAN2L(x, y) ::atan2l (x, y) |
|
373 -#else |
|
374 -# define _ATAN2L(x, y) ::atan2 (double (x), double (y)) |
|
375 -#endif // _RWSTD_NO_ATAN2L |
|
376 - |
|
377 -#ifndef _RWSTD_NO_CEILL |
|
378 -# define _CEILL(x) ::ceill (x) |
|
379 -#elif !defined (_RWSTD_NO_CEILL_IN_LIBM) |
|
380 -# undef ceill |
|
381 -extern "C" double ceill (double); |
|
382 -# define _CEILL(x) ::ceill (x) |
|
383 -#else |
|
384 -# define _CEILL(x) ::ceil (double (x)) |
|
385 -#endif // _RWSTD_NO_CEILL |
|
386 - |
|
387 -#ifndef _RWSTD_NO_COSL |
|
388 -# define _COSL(x) ::cosl (x) |
|
389 -#elif !defined (_RWSTD_NO_COSL_IN_LIBM) |
|
390 -# undef cosl |
|
391 -extern "C" long double cosl (long double); |
|
392 -# define _COSL(x) ::cosl (x) |
|
393 -#else |
|
394 -# define _COSL(x) ::cos (double (x)) |
|
395 -#endif // _RWSTD_NO_COSL |
|
396 - |
|
397 -#ifndef _RWSTD_NO_COSHL |
|
398 -# define _COSHL(x) ::coshl (x) |
|
399 -#elif !defined (_RWSTD_NO_COSHL_IN_LIBM) |
|
400 -# undef coshl |
|
401 -extern "C" long double coshl (long double); |
|
402 -# define _COSHL(x) ::coshl (x) |
|
403 -#else |
|
404 -# define _COSHL(x) ::cosh (double (x)) |
|
405 -#endif // _RWSTD_NO_COSHL |
|
406 - |
|
407 -#ifndef _RWSTD_NO_EXPL |
|
408 -# define _EXPL(x) ::expl (x) |
|
409 -#elif !defined (_RWSTD_NO_EXPL_IN_LIBM) |
|
410 -# undef expl |
|
411 -extern "C" long double expl (long double); |
|
412 -# define _EXPL(x) ::expl (x) |
|
413 -#else |
|
414 -# define _EXPL(x) ::exp (double (x)) |
|
415 -#endif // _RWSTD_NO_EXPL |
|
416 - |
|
417 -#ifndef _RWSTD_NO_FABSL |
|
418 -# define _FABSL(x) ::fabsl (x) |
|
419 -#elif !defined (_RWSTD_NO_FABSL_IN_LIBM) |
|
420 -# undef fabsl |
|
421 -extern "C" long double fabsl (long double); |
|
422 -# define _FABSL(x) ::fabsl (x) |
|
423 -#else |
|
424 -# define _FABSL(x) ::fabs (double (x)) |
|
425 -#endif // _RWSTD_NO_FABSL |
|
426 - |
|
427 -#ifndef _RWSTD_NO_FLOORL |
|
428 -# define _FLOORL(x) ::floorl (x) |
|
429 -#elif !defined (_RWSTD_NO_FLOORL_IN_LIBM) |
|
430 -# undef floorl |
|
431 -extern "C" long double floorl (long double); |
|
432 -# define _FLOORL(x) ::floorl (x) |
|
433 -#else |
|
434 -# define _FLOORL(x) ::floor (double (x)) |
|
435 -#endif // _RWSTD_NO_FLOORL |
|
436 - |
|
437 -#ifndef _RWSTD_NO_FMODL |
|
438 -# define _FMODL(x, y) ::fmodl (x, y) |
|
439 -#elif !defined (_RWSTD_NO_FMODL_IN_LIBM) |
|
440 -# undef fmodl |
|
441 -extern "C" long double fmodl (long double, long double); |
|
442 -# define _FMODL(x, y) ::fmodl (x, y) |
|
443 -#else |
|
444 -# define _FMODL(x, y) ::fmod (double (x), double (y)) |
|
445 -#endif // _RWSTD_NO_FMODL |
|
446 - |
|
447 -#ifndef _RWSTD_NO_FREXPL |
|
448 -# define _FREXPL(x, y) ::frexpl (x, y) |
|
449 -#elif !defined (_RWSTD_NO_FREXPL_IN_LIBM) |
|
450 -# undef frexpl |
|
451 -extern "C" long double frexpl (long double, int*); |
|
452 -# define _FREXPL(x, y) ::frexpl (x, y) |
|
453 -#else |
|
454 -# define _FREXPL(x, y) ::frexp (double (x), y) |
|
455 -#endif // _RWSTD_NO_FREXPL |
|
456 - |
|
457 -#ifndef _RWSTD_NO_LDEXPL |
|
458 -# define _LDEXPL(x, y) ::ldexpl (x, y) |
|
459 -#elif !defined (_RWSTD_NO_LDEXPL_IN_LIBM) |
|
460 -# undef ldexpl |
|
461 -extern "C" long double ldexpl (long double, int); |
|
462 -# define _LDEXPL(x, y) ::ldexpl (x, y) |
|
463 -#else |
|
464 -# define _LDEXPL(x, y) ::ldexp (double (x), y) |
|
465 -#endif // _RWSTD_NO_LDEXPL |
|
466 - |
|
467 -#ifndef _RWSTD_NO_LOGL |
|
468 -# define _LOGL(x) ::logl (x) |
|
469 -#elif !defined (_RWSTD_NO_LOGL_IN_LIBM) |
|
470 -# undef logl |
|
471 -extern "C" long double logl (long double); |
|
472 -# define _LOGL(x) ::logl (x) |
|
473 -#else |
|
474 -# define _LOGL(x) ::log (double (x)) |
|
475 -#endif // _RWSTD_NO_LOGL |
|
476 - |
|
477 -#ifndef _RWSTD_NO_LOG10L |
|
478 -# define _LOG10L(x) ::log10l (x) |
|
479 -#elif !defined (_RWSTD_NO_LOG10L_IN_LIBM) |
|
480 -# undef log10l |
|
481 -extern "C" long double log10l (long double); |
|
482 -# define _LOG10L(x) ::log10l (x) |
|
483 -#else |
|
484 -# define _LOG10L(x) ::log10 (double (x)) |
|
485 -#endif // _RWSTD_NO_LOG10L |
|
486 - |
|
487 -#ifndef _RWSTD_NO_MODFL |
|
488 -# define _MODFL(x, y) ::modfl (x, y) |
|
489 -#elif !defined (_RWSTD_NO_MODFL_IN_LIBM) |
|
490 -# undef modfl |
|
491 -extern "C" long double modfl (long double, long double*); |
|
492 -# define _MODFL(x, y) ::modfl (x, y) |
|
493 -#else |
|
494 - |
|
495 -inline long double __rw_modfl (long double __x, long double *__y) |
|
496 -{ |
|
497 - double __tmp = *__y; |
|
498 - |
|
499 - __x = ::modf (__x, &__tmp); |
|
500 - |
|
501 - *__y = __tmp; |
|
502 - |
|
503 - return __x; |
|
504 -} |
|
505 - |
|
506 -# define _MODFL(x, y) __rw_modfl (x, y) |
|
507 -#endif // _RWSTD_NO_MODFL |
|
508 - |
|
509 -#ifndef _RWSTD_NO_POWL |
|
510 -# define _POWL(x, y) ::powl (x, y) |
|
511 -#elif !defined (_RWSTD_NO_POWL_IN_LIBM) |
|
512 -# undef powl |
|
513 -extern "C" long double powl (long double, long double); |
|
514 -# define _POWL(x, y) ::powl (x, y) |
|
515 -#else |
|
516 -# define _POWL(x, y) ::pow (double (x), double (y)) |
|
517 -#endif // _RWSTD_NO_POWL |
|
518 - |
|
519 -#ifndef _RWSTD_NO_SINL |
|
520 -# define _SINL(x) ::sinl (x) |
|
521 -#elif !defined (_RWSTD_NO_SINL_IN_LIBM) |
|
522 -# undef sinl |
|
523 -extern "C" long double sinl (long double); |
|
524 -# define _SINL(x) ::sinl (x) |
|
525 -#else |
|
526 -# define _SINL(x) ::sin (double (x)) |
|
527 -#endif // _RWSTD_NO_SINL |
|
528 - |
|
529 -#ifndef _RWSTD_NO_SINHL |
|
530 -# define _SINHL(x) ::sinhl (x) |
|
531 -#elif !defined (_RWSTD_NO_SINHL_IN_LIBM) |
|
532 -# undef sinhl |
|
533 -extern "C" long double sinhl (long double); |
|
534 -# define _SINHL(x) ::sinhl (x) |
|
535 -#else |
|
536 -# define _SINHL(x) ::sinh (double (x)) |
|
537 -#endif // _RWSTD_NO_SINHL |
|
538 - |
|
539 -#ifndef _RWSTD_NO_SQRTL |
|
540 -# define _SQRTL(x) ::sqrtl (x) |
|
541 -#elif !defined (_RWSTD_NO_SQRTL_IN_LIBM) |
|
542 -# undef sqrtl |
|
543 -extern "C" long double sqrtl (long double); |
|
544 -# define _SQRTL(x) ::sqrtl (x) |
|
545 -#else |
|
546 -# define _SQRTL(x) ::sqrt (double (x)) |
|
547 -#endif // _RWSTD_NO_SQRTL |
|
548 - |
|
549 -#ifndef _RWSTD_NO_TANL |
|
550 -# define _TANL(x) ::tanl (x) |
|
551 -#elif !defined (_RWSTD_NO_TANL_IN_LIBM) |
|
552 -# undef tanl |
|
553 -extern "C" long double tanl (long double); |
|
554 -# define _TANL(x) ::tanl (x) |
|
555 -#else |
|
556 -# define _TANL(x) ::tan (double (x)) |
|
557 -#endif // _RWSTD_NO_TANL |
|
558 - |
|
559 -#ifndef _RWSTD_NO_TANHL |
|
560 -# define _TANHL(x) ::tanhl (x) |
|
561 -#elif !defined (_RWSTD_NO_TANHL_IN_LIBM) |
|
562 -# undef tanhl |
|
563 -extern "C" long double tanhl (long double); |
|
564 -# define _TANHL(x) ::tanhl (x) |
|
565 -#else |
|
566 -# define _TANHL(x) ::tanh (double (x)) |
|
567 -#endif // _RWSTD_NO_TANHL |
|
568 - |
|
569 - |
|
570 -#if !defined (_RWSTD_NO_USING_LIBC_IN_STD) |
|
571 -_RWSTD_NAMESPACE (std) { |
|
572 -#endif // !_RWSTD_NO_USING_LIBC_IN_STD |
|
573 - |
|
574 -// float overloads |
|
575 -#if defined (_RWSTD_NO_ABS_FLT) |
|
576 -inline float abs (float __x) |
|
577 -{ |
|
578 - return _FABSF (__x); |
|
579 -} |
|
580 -# undef _RWSTD_NO_ABS_FLT |
|
581 -# else |
|
582 -_USING (::abs); |
|
583 -#endif // _RWSTD_NO_ABS_FLT |
|
584 - |
|
585 -#if defined (_RWSTD_NO_ACOS_FLT) |
|
586 -inline float acos (float __x) |
|
587 -{ |
|
588 - return _ACOSF (__x); |
|
589 -} |
|
590 -#endif // _RWSTD_NO_ACOS_FLT |
|
591 - |
|
592 -#if defined (_RWSTD_NO_ASIN_FLT) |
|
593 -inline float asin (float __x) |
|
594 -{ |
|
595 - return _ASINF (__x); |
|
596 -} |
|
597 -#endif // _RWSTD_NO_ASIN_FLT |
|
598 - |
|
599 -#if defined (_RWSTD_NO_ATAN_FLT) |
|
600 -inline float atan (float __x) |
|
601 -{ |
|
602 - return _ATANF (__x); |
|
603 -} |
|
604 -#endif // _RWSTD_NO_ATAN_FLT |
|
605 - |
|
606 - |
|
607 -#if defined (_RWSTD_NO_ATAN2_FLT) |
|
608 -inline float atan2 (float __x, float __y) |
|
609 -{ |
|
610 - return _ATAN2F (__x, __y); |
|
611 -} |
|
612 -#endif // _RWSTD_NO_ATAN2_FLT |
|
613 - |
|
614 - |
|
615 -#if defined (_RWSTD_NO_CEIL_FLT) |
|
616 -inline float ceil (float __x) |
|
617 -{ |
|
618 - return _CEILF (__x); |
|
619 -} |
|
620 -#endif // _RWSTD_NO_CEIL_FLT |
|
621 - |
|
622 - |
|
623 -#if defined (_RWSTD_NO_COS_FLT) |
|
624 -inline float cos (float __x) |
|
625 -{ |
|
626 - return _COSF (__x); |
|
627 -} |
|
628 -#endif // _RWSTD_NO_COS_FLT |
|
629 - |
|
630 - |
|
631 -#if defined (_RWSTD_NO_COSH_FLT) |
|
632 -inline float cosh (float __x) |
|
633 -{ |
|
634 - return _COSHF (__x); |
|
635 -} |
|
636 -#endif // _RWSTD_NO_COSH_FLT |
|
637 - |
|
638 - |
|
639 -#if defined (_RWSTD_NO_EXP_FLT) |
|
640 -inline float exp (float __x) |
|
641 -{ |
|
642 - return _EXPF (__x); |
|
643 -} |
|
644 -#endif // _RWSTD_NO_EXP_FLT |
|
645 - |
|
646 - |
|
647 -#if defined (_RWSTD_NO_FABS_FLT) |
|
648 -inline float fabs (float __x) |
|
649 -{ |
|
650 - return _FABSF (__x); |
|
651 -} |
|
652 -# undef _RWSTD_NO_FABS_FLT |
|
653 -#endif // _RWSTD_NO_FABS_FLT |
|
654 - |
|
655 - |
|
656 -#if defined (_RWSTD_NO_FLOOR_FLT) |
|
657 -inline float floor (float __x) |
|
658 -{ |
|
659 - return _FLOORF (__x); |
|
660 -} |
|
661 -#endif // _RWSTD_NO_FLOOR_FLT |
|
662 - |
|
663 - |
|
664 -#if defined (_RWSTD_NO_FMOD_FLT) |
|
665 -inline float fmod (float __x, float __y) |
|
666 -{ |
|
667 - return _FMODF (__x, __y); |
|
668 -} |
|
669 -#endif // _RWSTD_NO_FMOD_FLT |
|
670 - |
|
671 - |
|
672 -#if defined (_RWSTD_NO_FREXP_FLT) |
|
673 -inline float frexp (float __x, int *__e) |
|
674 -{ |
|
675 - return _FREXPF (__x, __e); |
|
676 -} |
|
677 -#endif // _RWSTD_NO_FREXP_FLT |
|
678 - |
|
679 - |
|
680 -#if defined (_RWSTD_NO_LDEXP_FLT_INT) |
|
681 -inline float ldexp (float __x, int __e) |
|
682 -{ |
|
683 - return _LDEXPF (__x, __e); |
|
684 -} |
|
685 -#endif // _RWSTD_NO_LDEXP_FLT_INT |
|
686 + * ident "@(#)cmath.11.diff 1.1 09/08/21 SMI" |
|
687 + */ |
|
688 |
|
689 +#ifndef _MATH_H |
|
690 |
|
691 -#if defined (_RWSTD_NO_LOG_FLT) |
|
692 -inline float log (float __x) |
|
693 -{ |
|
694 - return _LOGF (__x); |
|
695 -} |
|
696 -#endif // _RWSTD_NO_LOG_FLT |
|
697 +#include <sys/feature_tests.h> |
|
698 |
|
699 +#if defined(__cplusplus) && defined(__SUNPRO_CC) |
|
700 +# define __MATHERR_RENAME_EXCEPTION |
|
701 +#endif |
|
702 |
|
703 -#if defined (_RWSTD_NO_LOG10_FLT) |
|
704 -inline float log10 (float __x) |
|
705 -{ |
|
706 - return _LOG10F (__x); |
|
707 -} |
|
708 -#endif // _RWSTD_NO_LOG10_FLT |
|
709 - |
|
710 - |
|
711 -#if defined (_RWSTD_NO_MODF_FLT) |
|
712 -inline float modf (float __x, float *__y) |
|
713 -{ |
|
714 - return _MODFF (__x, __y); |
|
715 -} |
|
716 -#endif // _RWSTD_NO_MODF_FLT |
|
717 - |
|
718 - |
|
719 -#ifdef _RWSTD_NO_POW_FLT |
|
720 -inline float pow (float __x, float __y) |
|
721 -{ |
|
722 - return _POWF (__x, __y); |
|
723 -} |
|
724 -#endif // _RWSTD_NO_POW_FLT |
|
725 - |
|
726 -#ifdef _RWSTD_NO_POW_FLT_INT |
|
727 -inline float pow (float __x, int __y) |
|
728 -{ |
|
729 - float __res = __y % 2 ? __x : 1; |
|
730 - |
|
731 - for (int __i = __y < 0 ? -__y : __y; __i >>= 1; ) { |
|
732 - __x *= __x; |
|
733 - if (__i % 2) |
|
734 - __res *= __x; |
|
735 - } |
|
736 - |
|
737 - return __y < 0 ? __res ? 1 / __res : -1 / __res : __y ? __res : 1; |
|
738 -} |
|
739 -#endif // _RWSTD_NO_POW_FLT_INT |
|
740 - |
|
741 - |
|
742 -#if defined (_RWSTD_NO_SIN_FLT) |
|
743 -inline float sin (float __x) |
|
744 -{ |
|
745 - return _SINF (__x); |
|
746 -} |
|
747 -#endif // _RWSTD_NO_SIN_FLT |
|
748 - |
|
749 - |
|
750 -#if defined (_RWSTD_NO_SINH_FLT) |
|
751 -inline float sinh (float __x) |
|
752 -{ |
|
753 - return _SINHF (__x); |
|
754 -} |
|
755 -#endif // _RWSTD_NO_SINH_FLT |
|
756 - |
|
757 - |
|
758 -#if defined (_RWSTD_NO_SQRT_FLT) |
|
759 -inline float sqrt (float __x) |
|
760 -{ |
|
761 - return _SQRTF (__x); |
|
762 -} |
|
763 -#endif // _RWSTD_NO_SQRT_FLT |
|
764 - |
|
765 - |
|
766 -#if defined (_RWSTD_NO_TAN_FLT) |
|
767 -inline float tan (float __x) |
|
768 -{ |
|
769 - return _TANF (__x); |
|
770 -} |
|
771 -#endif // _RWSTD_NO_TAN_FLT |
|
772 - |
|
773 - |
|
774 -#if defined (_RWSTD_NO_TANH_FLT) |
|
775 -inline float tanh (float __x) |
|
776 -{ |
|
777 - return _TANHF (__x); |
|
778 -} |
|
779 -#endif // _RWSTD_NO_TANH_FLT |
|
780 - |
|
781 - |
|
782 -// double overloads |
|
783 - |
|
784 - |
|
785 -#if defined (_RWSTD_NO_ABS_DBL) |
|
786 -inline double abs (double __x) |
|
787 -{ |
|
788 - return ::fabs (__x); |
|
789 -} |
|
790 -# undef _RWSTD_NO_ABS_DBL |
|
791 -# else |
|
792 -_USING (::abs); |
|
793 -#endif // _RWSTD_NO_ABS_DBL |
|
794 - |
|
795 - |
|
796 -#if defined (_RWSTD_NO_POW_DBL) && !defined (_RWSTD_NO_POW_IN_LIBM) |
|
797 - |
|
798 -extern "C" double pow (double, double); |
|
799 - |
|
800 -#endif // _RWSTD_NO_POW_DBL && !_RWSTD_NO_POW_IN_LIBM |
|
801 - |
|
802 - |
|
803 -#ifdef _RWSTD_NO_POW_DBL_INT |
|
804 - |
|
805 -inline double pow (double __x, int __y) |
|
806 -{ |
|
807 - double __res = __y % 2 ? __x : 1; |
|
808 - |
|
809 - for (int __i = __y < 0 ? -__y : __y; __i >>= 1; ) { |
|
810 - __x *= __x; |
|
811 - if (__i % 2) |
|
812 - __res *= __x; |
|
813 - } |
|
814 - |
|
815 - return __y < 0 ? __res ? 1 / __res : -1 / __res : __y ? __res : 1; |
|
816 -} |
|
817 - |
|
818 -#endif // _RWSTD_NO_POW_DBL_INT |
|
819 - |
|
820 - |
|
821 -#ifndef _RWSTD_NO_LONG_DOUBLE |
|
822 - |
|
823 -// long double overloads |
|
824 - |
|
825 - |
|
826 -#if defined (_RWSTD_NO_ABS_LDBL) |
|
827 -inline long double abs (long double __x) |
|
828 -{ |
|
829 - return _FABSL (__x); |
|
830 -} |
|
831 -# undef _RWSTD_NO_ABS_LDBL |
|
832 -# else |
|
833 -_USING (::abs); |
|
834 -#endif // _RWSTD_NO_ABS_LDBL |
|
835 - |
|
836 - |
|
837 -#if defined (_RWSTD_NO_ACOS_LDBL) |
|
838 -inline long double acos (long double __x) |
|
839 -{ |
|
840 - return _ACOSL (__x); |
|
841 -} |
|
842 -#endif // _RWSTD_NO_ACOS_LDBL |
|
843 - |
|
844 - |
|
845 -#if defined (_RWSTD_NO_ASIN_LDBL) |
|
846 -inline long double asin (long double __x) |
|
847 -{ |
|
848 - return _ASINL (__x); |
|
849 -} |
|
850 -#endif // _RWSTD_NO_ASIN_LDBL |
|
851 - |
|
852 - |
|
853 -#if defined (_RWSTD_NO_ATAN_LDBL) |
|
854 -inline long double atan (long double __x) |
|
855 -{ |
|
856 - return _ATANL (__x); |
|
857 -} |
|
858 -#endif // _RWSTD_NO_ATAN_LDBL |
|
859 - |
|
860 - |
|
861 -#if defined (_RWSTD_NO_ATAN2_LDBL) |
|
862 -inline long double atan2 (long double __x, long double __y) |
|
863 -{ |
|
864 - return _ATAN2L (__x, __y); |
|
865 -} |
|
866 -#endif // _RWSTD_NO_ATAN2_LDBL |
|
867 - |
|
868 - |
|
869 -#if defined (_RWSTD_NO_CEIL_LDBL) |
|
870 -inline long double ceil (long double __x) |
|
871 -{ |
|
872 - return _CEILL (__x); |
|
873 -} |
|
874 -#endif // _RWSTD_NO_CEIL_LDBL |
|
875 - |
|
876 - |
|
877 -#if defined (_RWSTD_NO_COS_LDBL) |
|
878 -inline long double cos (long double __x) |
|
879 -{ |
|
880 - return _COSL (__x); |
|
881 -} |
|
882 -#endif // _RWSTD_NO_COS_LDBL |
|
883 - |
|
884 - |
|
885 -#if defined (_RWSTD_NO_COSH_LDBL) |
|
886 -inline long double cosh (long double __x) |
|
887 -{ |
|
888 - return _COSHL (__x); |
|
889 -} |
|
890 -#endif // _RWSTD_NO_COSH_LDBL |
|
891 - |
|
892 - |
|
893 -#if defined (_RWSTD_NO_EXP_LDBL) |
|
894 -inline long double exp (long double __x) |
|
895 -{ |
|
896 - return _EXPL (__x); |
|
897 -} |
|
898 -#endif // _RWSTD_NO_EXP_LDBL |
|
899 - |
|
900 - |
|
901 -#if defined (_RWSTD_NO_FABS_LDBL) |
|
902 -inline long double fabs (long double __x) |
|
903 -{ |
|
904 - return _FABSL (__x); |
|
905 -} |
|
906 -# undef _RWSTD_NO_FABS_LDBL |
|
907 -#endif // _RWSTD_NO_FABS_LDBL |
|
908 - |
|
909 - |
|
910 -#if defined (_RWSTD_NO_FLOOR_LDBL) |
|
911 -inline long double floor (long double __x) |
|
912 -{ |
|
913 - return _FLOORL (__x); |
|
914 -} |
|
915 -#endif // _RWSTD_NO_FLOOR_LDBL |
|
916 - |
|
917 - |
|
918 -#if defined (_RWSTD_NO_FMOD_LDBL) |
|
919 -inline long double fmod (long double __x, long double __y) |
|
920 -{ |
|
921 - return _FMODL (__x, __y); |
|
922 -} |
|
923 -#endif // _RWSTD_NO_FMOD_LDBL |
|
924 - |
|
925 - |
|
926 -#if defined (_RWSTD_NO_FREXP_LDBL) |
|
927 -inline long double frexp (long double __x, int *__e) |
|
928 -{ |
|
929 - return _FREXPL (__x, __e); |
|
930 -} |
|
931 -#endif // _RWSTD_NO_FREXP_LDBL |
|
932 - |
|
933 - |
|
934 -#if defined (_RWSTD_NO_LDEXP_LDBL_INT) |
|
935 -inline long double ldexp (long double __x, int __e) |
|
936 -{ |
|
937 - return _LDEXPL (__x, __e); |
|
938 -} |
|
939 -#endif // _RWSTD_NO_LDEXP_LDBL_INT |
|
940 - |
|
941 - |
|
942 -#if defined (_RWSTD_NO_LOG_LDBL) |
|
943 -inline long double log (long double __x) |
|
944 -{ |
|
945 - return _LOGL (__x); |
|
946 -} |
|
947 -#endif // _RWSTD_NO_LOG_LDBL |
|
948 - |
|
949 - |
|
950 -#if defined (_RWSTD_NO_LOG10_LDBL) |
|
951 -inline long double log10 (long double __x) |
|
952 -{ |
|
953 - return _LOG10L (__x); |
|
954 -} |
|
955 -#endif // _RWSTD_NO_LOG10_LDBL |
|
956 - |
|
957 - |
|
958 -#if defined (_RWSTD_NO_MODF_LDBL) |
|
959 -inline long double modf (long double __x, long double *__y) |
|
960 -{ |
|
961 - return _MODFL (__x, __y); |
|
962 -} |
|
963 -#endif // _RWSTD_NO_MODF_LDBL |
|
964 - |
|
965 - |
|
966 -#ifdef _RWSTD_NO_POW_LDBL |
|
967 -inline long double pow (long double __x, long double __y) |
|
968 -{ |
|
969 - return _POWL (__x, __y); |
|
970 -} |
|
971 -#endif // _RWSTD_NO_POW_LDBL |
|
972 - |
|
973 - |
|
974 -#ifdef _RWSTD_NO_POW_LDBL_INT |
|
975 -inline long double pow (long double __x, int __y) |
|
976 -{ |
|
977 - long double __res = __y % 2 ? __x : 1; |
|
978 - |
|
979 - for (int __i = __y < 0 ? -__y : __y; __i >>= 1; ) { |
|
980 - __x *= __x; |
|
981 - if (__i % 2) |
|
982 - __res *= __x; |
|
983 - } |
|
984 - |
|
985 - return __y < 0 ? __res ? 1 / __res : -1 / __res : __y ? __res : 1; |
|
986 -} |
|
987 -#endif // _RWSTD_NO_POW_LDBL_INT |
|
988 - |
|
989 - |
|
990 -#if defined (_RWSTD_NO_SIN_LDBL) |
|
991 -inline long double sin (long double __x) |
|
992 -{ |
|
993 - return _SINL (__x); |
|
994 -} |
|
995 -#endif // _RWSTD_NO_SIN_LDBL |
|
996 - |
|
997 - |
|
998 -#if defined (_RWSTD_NO_SINH_LDBL) |
|
999 -inline long double sinh (long double __x) |
|
1000 -{ |
|
1001 - return _SINHL (__x); |
|
1002 -} |
|
1003 -#endif // _RWSTD_NO_SINH_LDBL |
|
1004 - |
|
1005 - |
|
1006 -#if defined (_RWSTD_NO_SQRT_LDBL) |
|
1007 -inline long double sqrt (long double __x) |
|
1008 -{ |
|
1009 - return _SQRTL (__x); |
|
1010 -} |
|
1011 -#endif // _RWSTD_NO_SQRT_LDBL |
|
1012 - |
|
1013 - |
|
1014 -#if defined (_RWSTD_NO_TAN_LDBL) |
|
1015 -inline long double tan (long double __x) |
|
1016 -{ |
|
1017 - return _TANL (__x); |
|
1018 -} |
|
1019 -#endif // _RWSTD_NO_TAN_LDBL |
|
1020 - |
|
1021 - |
|
1022 -#if defined (_RWSTD_NO_TANH_LDBL) |
|
1023 -inline long double tanh (long double __x) |
|
1024 -{ |
|
1025 - return _TANHL (__x); |
|
1026 -} |
|
1027 -#endif // _RWSTD_NO_TANH_LDBL |
|
1028 - |
|
1029 - |
|
1030 -#endif // _RWSTD_NO_LONG_DOUBLE |
|
1031 - |
|
1032 - |
|
1033 -// using statements must come after the overloads. |
|
1034 -// working around MSVC6 PR# 27677 |
|
1035 -#if !defined (_RWSTD_NO_HONOR_STD) && !defined (_RWSTD_NO_USING_LIBC_IN_STD) |
|
1036 - |
|
1037 -_USING (::acos); |
|
1038 -_USING (::asin); |
|
1039 -_USING (::atan); |
|
1040 -_USING (::atan2); |
|
1041 -_USING (::ceil); |
|
1042 -_USING (::cos); |
|
1043 -_USING (::cosh); |
|
1044 -_USING (::exp); |
|
1045 -_USING (::fabs); |
|
1046 -_USING (::floor); |
|
1047 -_USING (::fmod); |
|
1048 -_USING (::frexp); |
|
1049 -_USING (::ldexp); |
|
1050 -_USING (::log); |
|
1051 -_USING (::log10); |
|
1052 -_USING (::modf); |
|
1053 -_USING (::pow); |
|
1054 -_USING (::sin); |
|
1055 -_USING (::sinh); |
|
1056 -_USING (::sqrt); |
|
1057 -_USING (::tan); |
|
1058 -_USING (::tanh); |
|
1059 - |
|
1060 -#endif // !_RWSTD_NO_HONOR_STD && !_RWSTD_NO_USING_LIBC_IN_STD |
|
1061 - |
|
1062 -#if !defined (_RWSTD_NO_USING_LIBC_IN_STD) |
|
1063 -} // namespace std |
|
1064 -#endif // !_RWSTD_NO_USING_LIBC_IN_STD |
|
1065 - |
|
1066 - |
|
1067 -#endif // _RWSTD_NO_DEPRECATED_C_HEADERS |
|
1068 - |
|
1069 +#include <math.h> |
|
1070 |
|
1071 -// MSVC provides its own complex macro |
|
1072 -#ifdef _MSC_VER |
|
1073 -# ifdef complex |
|
1074 -# undef complex |
|
1075 -# endif |
|
1076 +#if defined(__cplusplus) && defined(__SUNPRO_CC) |
|
1077 +# undef __MATHERR_RENAME_EXCEPTION |
|
1078 #endif |
|
1079 |
|
1080 +#endif /* _MATH_H */ |
|
1081 |
|
1082 -#endif // _RWSTD_NO_PURE_C_HEADERS |
|
1083 - |
|
1084 -#endif // _RWSTD_CMATH_INCLUDED |