00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _GL_MATH_H
00022
00023 #if __GNUC__ >= 3
00024 #pragma GCC system_header
00025 #endif
00026
00027
00028
00029 #include_next <math.h>
00030
00031 #ifndef _GL_MATH_H
00032 #define _GL_MATH_H
00033
00034
00035
00036 #ifndef _GL_CXXDEFS_H
00037 #define _GL_CXXDEFS_H
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100 #if defined __cplusplus
00101 # define _GL_EXTERN_C extern "C"
00102 #else
00103 # define _GL_EXTERN_C extern
00104 #endif
00105
00106
00107
00108
00109
00110
00111
00112
00113 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
00114 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
00115 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
00116 _GL_EXTERN_C rettype rpl_func parameters_and_attributes
00117
00118
00119
00120
00121
00122
00123
00124
00125 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
00126 _GL_EXTERN_C rettype func parameters_and_attributes
00127
00128
00129
00130
00131
00132
00133
00134 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
00135 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
00136 #if defined __cplusplus && defined GNULIB_NAMESPACE
00137 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
00138 namespace GNULIB_NAMESPACE \
00139 { \
00140 rettype (*const func) parameters = ::rpl_func; \
00141 } \
00142 _GL_EXTERN_C int _gl_cxxalias_dummy
00143 #else
00144 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
00145 _GL_EXTERN_C int _gl_cxxalias_dummy
00146 #endif
00147
00148
00149
00150
00151
00152
00153 #if defined __cplusplus && defined GNULIB_NAMESPACE
00154 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
00155 namespace GNULIB_NAMESPACE \
00156 { \
00157 rettype (*const func) parameters = \
00158 reinterpret_cast<rettype(*)parameters>(::rpl_func); \
00159 } \
00160 _GL_EXTERN_C int _gl_cxxalias_dummy
00161 #else
00162 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
00163 _GL_EXTERN_C int _gl_cxxalias_dummy
00164 #endif
00165
00166
00167
00168
00169
00170
00171
00172
00173 #if defined __cplusplus && defined GNULIB_NAMESPACE
00174
00175
00176
00177
00178
00179
00180 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
00181 namespace GNULIB_NAMESPACE \
00182 { \
00183 static rettype (*func) parameters = ::func; \
00184 } \
00185 _GL_EXTERN_C int _gl_cxxalias_dummy
00186 #else
00187 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
00188 _GL_EXTERN_C int _gl_cxxalias_dummy
00189 #endif
00190
00191
00192
00193
00194
00195
00196 #if defined __cplusplus && defined GNULIB_NAMESPACE
00197 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
00198 namespace GNULIB_NAMESPACE \
00199 { \
00200 static rettype (*func) parameters = \
00201 reinterpret_cast<rettype(*)parameters>(::func); \
00202 } \
00203 _GL_EXTERN_C int _gl_cxxalias_dummy
00204 #else
00205 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
00206 _GL_EXTERN_C int _gl_cxxalias_dummy
00207 #endif
00208
00209
00210
00211
00212
00213
00214
00215 #if defined __cplusplus && defined GNULIB_NAMESPACE
00216
00217
00218
00219
00220
00221 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
00222 namespace GNULIB_NAMESPACE \
00223 { \
00224 static rettype (*func) parameters = \
00225 reinterpret_cast<rettype(*)parameters>( \
00226 (rettype2(*)parameters2)(::func)); \
00227 } \
00228 _GL_EXTERN_C int _gl_cxxalias_dummy
00229 #else
00230 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
00231 _GL_EXTERN_C int _gl_cxxalias_dummy
00232 #endif
00233
00234
00235
00236
00237
00238 #if defined __cplusplus && defined GNULIB_NAMESPACE
00239 # define _GL_CXXALIASWARN(func) \
00240 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
00241 # define _GL_CXXALIASWARN_1(func,namespace) \
00242 _GL_CXXALIASWARN_2 (func, namespace)
00243
00244
00245 # if !__OPTIMIZE__
00246 # define _GL_CXXALIASWARN_2(func,namespace) \
00247 _GL_WARN_ON_USE (func, \
00248 "The symbol ::" #func " refers to the system function. " \
00249 "Use " #namespace "::" #func " instead.")
00250 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
00251 # define _GL_CXXALIASWARN_2(func,namespace) \
00252 extern __typeof__ (func) func
00253 # else
00254 # define _GL_CXXALIASWARN_2(func,namespace) \
00255 _GL_EXTERN_C int _gl_cxxalias_dummy
00256 # endif
00257 #else
00258 # define _GL_CXXALIASWARN(func) \
00259 _GL_EXTERN_C int _gl_cxxalias_dummy
00260 #endif
00261
00262
00263
00264
00265 #if defined __cplusplus && defined GNULIB_NAMESPACE
00266 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
00267 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
00268 GNULIB_NAMESPACE)
00269 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
00270 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
00271
00272
00273 # if !__OPTIMIZE__
00274 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
00275 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
00276 "The symbol ::" #func " refers to the system function. " \
00277 "Use " #namespace "::" #func " instead.")
00278 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
00279 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
00280 extern __typeof__ (func) func
00281 # else
00282 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
00283 _GL_EXTERN_C int _gl_cxxalias_dummy
00284 # endif
00285 #else
00286 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
00287 _GL_EXTERN_C int _gl_cxxalias_dummy
00288 #endif
00289
00290 #endif
00291
00292
00293
00294
00295
00296 #ifndef _GL_ARG_NONNULL
00297 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
00298 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
00299 # else
00300 # define _GL_ARG_NONNULL(params)
00301 # endif
00302 #endif
00303
00304
00305 #ifndef _GL_WARN_ON_USE
00306
00307 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
00308
00309 # define _GL_WARN_ON_USE(function, message) \
00310 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
00311 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
00312
00313 # define _GL_WARN_ON_USE(function, message) \
00314 extern __typeof__ (function) function
00315 # else
00316 # define _GL_WARN_ON_USE(function, message) \
00317 _GL_WARN_EXTERN_C int _gl_warn_on_use
00318 # endif
00319 #endif
00320
00321
00322
00323
00324
00325
00326
00327 #ifndef _GL_WARN_ON_USE_CXX
00328 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
00329 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
00330 extern rettype function parameters_and_attributes \
00331 __attribute__ ((__warning__ (msg)))
00332 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
00333
00334 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
00335 extern rettype function parameters_and_attributes
00336 # else
00337 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
00338 _GL_WARN_EXTERN_C int _gl_warn_on_use
00339 # endif
00340 #endif
00341
00342
00343
00344 #ifndef _GL_WARN_EXTERN_C
00345 # if defined __cplusplus
00346 # define _GL_WARN_EXTERN_C extern "C"
00347 # else
00348 # define _GL_WARN_EXTERN_C extern
00349 # endif
00350 #endif
00351
00352
00353
00354
00355
00356 #define _GL_WARN_REAL_FLOATING_DECL(func) \
00357 static inline int \
00358 rpl_ ## func ## f (float f) \
00359 { \
00360 return func (f); \
00361 } \
00362 static inline int \
00363 rpl_ ## func ## d (double d) \
00364 { \
00365 return func (d); \
00366 } \
00367 static inline int \
00368 rpl_ ## func ## l (long double l) \
00369 { \
00370 return func (l); \
00371 } \
00372 _GL_WARN_ON_USE (rpl_ ## func ## f, #func " is unportable - " \
00373 "use gnulib module " #func " for portability"); \
00374 _GL_WARN_ON_USE (rpl_ ## func ## d, #func " is unportable - " \
00375 "use gnulib module " #func " for portability"); \
00376 _GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - " \
00377 "use gnulib module " #func " for portability")
00378 #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
00379 (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \
00380 : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \
00381 : rpl_ ## func ## l (value))
00382
00383
00384
00385
00386
00387
00388
00389 #if !defined NAN || 0
00390 # if !GNULIB_defined_NAN
00391 # undef NAN
00392
00393 # ifdef __DECC
00394 static float
00395 _NaN ()
00396 {
00397 static float zero = 0.0f;
00398 return zero / zero;
00399 }
00400 # define NAN (_NaN())
00401 # else
00402 # define NAN (0.0f / 0.0f)
00403 # endif
00404 # define GNULIB_defined_NAN 1
00405 # endif
00406 #endif
00407
00408
00409
00410 #if 0
00411 # undef HUGE_VAL
00412 # define HUGE_VAL (1.0 / 0.0)
00413 #endif
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423 #if 0
00424 # if 0
00425 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00426 # define frexp rpl_frexp
00427 # endif
00428 _GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2)));
00429 _GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr));
00430 # else
00431 _GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr));
00432 # endif
00433 _GL_CXXALIASWARN (frexp);
00434 #elif defined GNULIB_POSIXCHECK
00435 # undef frexp
00436
00437 _GL_WARN_ON_USE (frexp, "frexp is unportable - "
00438 "use gnulib module frexp for portability");
00439 #endif
00440
00441
00442 #if 0
00443 # if !1
00444 _GL_EXTERN_C double logb (double x);
00445 # endif
00446 #elif defined GNULIB_POSIXCHECK
00447 # undef logb
00448 # if HAVE_RAW_DECL_LOGB
00449 _GL_WARN_ON_USE (logb, "logb is unportable - "
00450 "use gnulib module logb for portability");
00451 # endif
00452 #endif
00453
00454
00455 #if 0
00456 # if !1 || !1
00457 _GL_FUNCDECL_SYS (acosl, long double, (long double x));
00458 # endif
00459 _GL_CXXALIAS_SYS (acosl, long double, (long double x));
00460 _GL_CXXALIASWARN (acosl);
00461 #elif defined GNULIB_POSIXCHECK
00462 # undef acosl
00463 # if HAVE_RAW_DECL_ACOSL
00464 _GL_WARN_ON_USE (acosl, "acosl is unportable - "
00465 "use gnulib module mathl for portability");
00466 # endif
00467 #endif
00468
00469
00470 #if 0
00471 # if !1 || !1
00472 _GL_FUNCDECL_SYS (asinl, long double, (long double x));
00473 # endif
00474 _GL_CXXALIAS_SYS (asinl, long double, (long double x));
00475 _GL_CXXALIASWARN (asinl);
00476 #elif defined GNULIB_POSIXCHECK
00477 # undef asinl
00478 # if HAVE_RAW_DECL_ASINL
00479 _GL_WARN_ON_USE (asinl, "asinl is unportable - "
00480 "use gnulib module mathl for portability");
00481 # endif
00482 #endif
00483
00484
00485 #if 0
00486 # if !1 || !1
00487 _GL_FUNCDECL_SYS (atanl, long double, (long double x));
00488 # endif
00489 _GL_CXXALIAS_SYS (atanl, long double, (long double x));
00490 _GL_CXXALIASWARN (atanl);
00491 #elif defined GNULIB_POSIXCHECK
00492 # undef atanl
00493 # if HAVE_RAW_DECL_ATANL
00494 _GL_WARN_ON_USE (atanl, "atanl is unportable - "
00495 "use gnulib module mathl for portability");
00496 # endif
00497 #endif
00498
00499
00500 #if 0
00501 # if 0
00502 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00503 # define ceilf rpl_ceilf
00504 # endif
00505 _GL_FUNCDECL_RPL (ceilf, float, (float x));
00506 _GL_CXXALIAS_RPL (ceilf, float, (float x));
00507 # else
00508 # if !1
00509 _GL_FUNCDECL_SYS (ceilf, float, (float x));
00510 # endif
00511 _GL_CXXALIAS_SYS (ceilf, float, (float x));
00512 # endif
00513 _GL_CXXALIASWARN (ceilf);
00514 #elif defined GNULIB_POSIXCHECK
00515 # undef ceilf
00516 # if HAVE_RAW_DECL_CEILF
00517 _GL_WARN_ON_USE (ceilf, "ceilf is unportable - "
00518 "use gnulib module ceilf for portability");
00519 # endif
00520 #endif
00521
00522 #if 0
00523 # if 0
00524 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00525 # define ceil rpl_ceil
00526 # endif
00527 _GL_FUNCDECL_RPL (ceil, double, (double x));
00528 _GL_CXXALIAS_RPL (ceil, double, (double x));
00529 # else
00530 _GL_CXXALIAS_SYS (ceil, double, (double x));
00531 # endif
00532 _GL_CXXALIASWARN (ceil);
00533 #endif
00534
00535 #if 0
00536 # if 0
00537 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00538 # define ceill rpl_ceill
00539 # endif
00540 _GL_FUNCDECL_RPL (ceill, long double, (long double x));
00541 _GL_CXXALIAS_RPL (ceill, long double, (long double x));
00542 # else
00543 # if !1
00544 _GL_FUNCDECL_SYS (ceill, long double, (long double x));
00545 # endif
00546 _GL_CXXALIAS_SYS (ceill, long double, (long double x));
00547 # endif
00548 _GL_CXXALIASWARN (ceill);
00549 #elif defined GNULIB_POSIXCHECK
00550 # undef ceill
00551 # if HAVE_RAW_DECL_CEILL
00552 _GL_WARN_ON_USE (ceill, "ceill is unportable - "
00553 "use gnulib module ceill for portability");
00554 # endif
00555 #endif
00556
00557
00558 #if 0
00559 # if !1 || !1
00560 _GL_FUNCDECL_SYS (cosl, long double, (long double x));
00561 # endif
00562 _GL_CXXALIAS_SYS (cosl, long double, (long double x));
00563 _GL_CXXALIASWARN (cosl);
00564 #elif defined GNULIB_POSIXCHECK
00565 # undef cosl
00566 # if HAVE_RAW_DECL_COSL
00567 _GL_WARN_ON_USE (cosl, "cosl is unportable - "
00568 "use gnulib module mathl for portability");
00569 # endif
00570 #endif
00571
00572
00573 #if 0
00574 # if !1 || !1
00575 _GL_FUNCDECL_SYS (expl, long double, (long double x));
00576 # endif
00577 _GL_CXXALIAS_SYS (expl, long double, (long double x));
00578 _GL_CXXALIASWARN (expl);
00579 #elif defined GNULIB_POSIXCHECK
00580 # undef expl
00581 # if HAVE_RAW_DECL_EXPL
00582 _GL_WARN_ON_USE (expl, "expl is unportable - "
00583 "use gnulib module mathl for portability");
00584 # endif
00585 #endif
00586
00587
00588 #if 0
00589 # if 0
00590 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00591 # define floorf rpl_floorf
00592 # endif
00593 _GL_FUNCDECL_RPL (floorf, float, (float x));
00594 _GL_CXXALIAS_RPL (floorf, float, (float x));
00595 # else
00596 # if !1
00597 _GL_FUNCDECL_SYS (floorf, float, (float x));
00598 # endif
00599 _GL_CXXALIAS_SYS (floorf, float, (float x));
00600 # endif
00601 _GL_CXXALIASWARN (floorf);
00602 #elif defined GNULIB_POSIXCHECK
00603 # undef floorf
00604 # if HAVE_RAW_DECL_FLOORF
00605 _GL_WARN_ON_USE (floorf, "floorf is unportable - "
00606 "use gnulib module floorf for portability");
00607 # endif
00608 #endif
00609
00610 #if 1
00611 # if 0
00612 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00613 # define floor rpl_floor
00614 # endif
00615 _GL_FUNCDECL_RPL (floor, double, (double x));
00616 _GL_CXXALIAS_RPL (floor, double, (double x));
00617 # else
00618 _GL_CXXALIAS_SYS (floor, double, (double x));
00619 # endif
00620 _GL_CXXALIASWARN (floor);
00621 #endif
00622
00623 #if 0
00624 # if 0
00625 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00626 # define floorl rpl_floorl
00627 # endif
00628 _GL_FUNCDECL_RPL (floorl, long double, (long double x));
00629 _GL_CXXALIAS_RPL (floorl, long double, (long double x));
00630 # else
00631 # if !1
00632 _GL_FUNCDECL_SYS (floorl, long double, (long double x));
00633 # endif
00634 _GL_CXXALIAS_SYS (floorl, long double, (long double x));
00635 # endif
00636 _GL_CXXALIASWARN (floorl);
00637 #elif defined GNULIB_POSIXCHECK
00638 # undef floorl
00639 # if HAVE_RAW_DECL_FLOORL
00640 _GL_WARN_ON_USE (floorl, "floorl is unportable - "
00641 "use gnulib module floorl for portability");
00642 # endif
00643 #endif
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653 #if 0 && 0
00654 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00655 # define frexpl rpl_frexpl
00656 # endif
00657 _GL_FUNCDECL_RPL (frexpl, long double,
00658 (long double x, int *expptr) _GL_ARG_NONNULL ((2)));
00659 _GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr));
00660 #else
00661 # if !1
00662 _GL_FUNCDECL_SYS (frexpl, long double,
00663 (long double x, int *expptr) _GL_ARG_NONNULL ((2)));
00664 # endif
00665 # if 0
00666 _GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr));
00667 # endif
00668 #endif
00669 #if 0 && !(0 && !1)
00670 _GL_CXXALIASWARN (frexpl);
00671 #endif
00672 #if !0 && defined GNULIB_POSIXCHECK
00673 # undef frexpl
00674 # if HAVE_RAW_DECL_FREXPL
00675 _GL_WARN_ON_USE (frexpl, "frexpl is unportable - "
00676 "use gnulib module frexpl for portability");
00677 # endif
00678 #endif
00679
00680
00681
00682 #if 0 && 0
00683 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00684 # define ldexpl rpl_ldexpl
00685 # endif
00686 _GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp));
00687 _GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp));
00688 #else
00689 # if !1
00690 _GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp));
00691 # endif
00692 # if 0
00693 _GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp));
00694 # endif
00695 #endif
00696 #if 0
00697 _GL_CXXALIASWARN (ldexpl);
00698 #endif
00699 #if !0 && defined GNULIB_POSIXCHECK
00700 # undef ldexpl
00701 # if HAVE_RAW_DECL_LDEXPL
00702 _GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - "
00703 "use gnulib module ldexpl for portability");
00704 # endif
00705 #endif
00706
00707
00708 #if 0
00709 # if !1 || !1
00710 _GL_FUNCDECL_SYS (logl, long double, (long double x));
00711 # endif
00712 _GL_CXXALIAS_SYS (logl, long double, (long double x));
00713 _GL_CXXALIASWARN (logl);
00714 #elif defined GNULIB_POSIXCHECK
00715 # undef logl
00716 # if HAVE_RAW_DECL_LOGL
00717 _GL_WARN_ON_USE (logl, "logl is unportable - "
00718 "use gnulib module mathl for portability");
00719 # endif
00720 #endif
00721
00722
00723 #if 1
00724 # if 0
00725 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00726 # undef roundf
00727 # define roundf rpl_roundf
00728 # endif
00729 _GL_FUNCDECL_RPL (roundf, float, (float x));
00730 _GL_CXXALIAS_RPL (roundf, float, (float x));
00731 # else
00732 # if !1
00733 _GL_FUNCDECL_SYS (roundf, float, (float x));
00734 # endif
00735 _GL_CXXALIAS_SYS (roundf, float, (float x));
00736 # endif
00737 _GL_CXXALIASWARN (roundf);
00738 #elif defined GNULIB_POSIXCHECK
00739 # undef roundf
00740 # if HAVE_RAW_DECL_ROUNDF
00741 _GL_WARN_ON_USE (roundf, "roundf is unportable - "
00742 "use gnulib module roundf for portability");
00743 # endif
00744 #endif
00745
00746 #if 1
00747 # if 0
00748 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00749 # undef round
00750 # define round rpl_round
00751 # endif
00752 _GL_FUNCDECL_RPL (round, double, (double x));
00753 _GL_CXXALIAS_RPL (round, double, (double x));
00754 # else
00755 # if !1
00756 _GL_FUNCDECL_SYS (round, double, (double x));
00757 # endif
00758 _GL_CXXALIAS_SYS (round, double, (double x));
00759 # endif
00760 _GL_CXXALIASWARN (round);
00761 #elif defined GNULIB_POSIXCHECK
00762 # undef round
00763 # if HAVE_RAW_DECL_ROUND
00764 _GL_WARN_ON_USE (round, "round is unportable - "
00765 "use gnulib module round for portability");
00766 # endif
00767 #endif
00768
00769 #if 0
00770 # if 0
00771 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00772 # undef roundl
00773 # define roundl rpl_roundl
00774 # endif
00775 _GL_FUNCDECL_RPL (roundl, long double, (long double x));
00776 _GL_CXXALIAS_RPL (roundl, long double, (long double x));
00777 # else
00778 # if !1
00779 _GL_FUNCDECL_SYS (roundl, long double, (long double x));
00780 # endif
00781 _GL_CXXALIAS_SYS (roundl, long double, (long double x));
00782 # endif
00783 _GL_CXXALIASWARN (roundl);
00784 #elif defined GNULIB_POSIXCHECK
00785 # undef roundl
00786 # if HAVE_RAW_DECL_ROUNDL
00787 _GL_WARN_ON_USE (roundl, "roundl is unportable - "
00788 "use gnulib module roundl for portability");
00789 # endif
00790 #endif
00791
00792
00793 #if 0
00794 # if !1 || !1
00795 _GL_FUNCDECL_SYS (sinl, long double, (long double x));
00796 # endif
00797 _GL_CXXALIAS_SYS (sinl, long double, (long double x));
00798 _GL_CXXALIASWARN (sinl);
00799 #elif defined GNULIB_POSIXCHECK
00800 # undef sinl
00801 # if HAVE_RAW_DECL_SINL
00802 _GL_WARN_ON_USE (sinl, "sinl is unportable - "
00803 "use gnulib module mathl for portability");
00804 # endif
00805 #endif
00806
00807
00808 #if 0
00809 # if !1 || !1
00810 _GL_FUNCDECL_SYS (sqrtl, long double, (long double x));
00811 # endif
00812 _GL_CXXALIAS_SYS (sqrtl, long double, (long double x));
00813 _GL_CXXALIASWARN (sqrtl);
00814 #elif defined GNULIB_POSIXCHECK
00815 # undef sqrtl
00816 # if HAVE_RAW_DECL_SQRTL
00817 _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - "
00818 "use gnulib module mathl for portability");
00819 # endif
00820 #endif
00821
00822
00823 #if 0
00824 # if !1 || !1
00825 _GL_FUNCDECL_SYS (tanl, long double, (long double x));
00826 # endif
00827 _GL_CXXALIAS_SYS (tanl, long double, (long double x));
00828 _GL_CXXALIASWARN (tanl);
00829 #elif defined GNULIB_POSIXCHECK
00830 # undef tanl
00831 # if HAVE_RAW_DECL_TANL
00832 _GL_WARN_ON_USE (tanl, "tanl is unportable - "
00833 "use gnulib module mathl for portability");
00834 # endif
00835 #endif
00836
00837
00838 #if 1
00839 # if 0
00840 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00841 # define truncf rpl_truncf
00842 # endif
00843 _GL_FUNCDECL_RPL (truncf, float, (float x));
00844 _GL_CXXALIAS_RPL (truncf, float, (float x));
00845 # else
00846 # if !1
00847 _GL_FUNCDECL_SYS (truncf, float, (float x));
00848 # endif
00849 _GL_CXXALIAS_SYS (truncf, float, (float x));
00850 # endif
00851 _GL_CXXALIASWARN (truncf);
00852 #elif defined GNULIB_POSIXCHECK
00853 # undef truncf
00854 # if HAVE_RAW_DECL_TRUNCF
00855 _GL_WARN_ON_USE (truncf, "truncf is unportable - "
00856 "use gnulib module truncf for portability");
00857 # endif
00858 #endif
00859
00860 #if 1
00861 # if 0
00862 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00863 # define trunc rpl_trunc
00864 # endif
00865 _GL_FUNCDECL_RPL (trunc, double, (double x));
00866 _GL_CXXALIAS_RPL (trunc, double, (double x));
00867 # else
00868 # if !1
00869 _GL_FUNCDECL_SYS (trunc, double, (double x));
00870 # endif
00871 _GL_CXXALIAS_SYS (trunc, double, (double x));
00872 # endif
00873 _GL_CXXALIASWARN (trunc);
00874 #elif defined GNULIB_POSIXCHECK
00875 # undef trunc
00876 # if HAVE_RAW_DECL_TRUNC
00877 _GL_WARN_ON_USE (trunc, "trunc is unportable - "
00878 "use gnulib module trunc for portability");
00879 # endif
00880 #endif
00881
00882 #if 0
00883 # if 0
00884 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00885 # undef truncl
00886 # define truncl rpl_truncl
00887 # endif
00888 _GL_FUNCDECL_RPL (truncl, long double, (long double x));
00889 _GL_CXXALIAS_RPL (truncl, long double, (long double x));
00890 # else
00891 # if !1
00892 _GL_FUNCDECL_SYS (truncl, long double, (long double x));
00893 # endif
00894 _GL_CXXALIAS_SYS (truncl, long double, (long double x));
00895 # endif
00896 _GL_CXXALIASWARN (truncl);
00897 #elif defined GNULIB_POSIXCHECK
00898 # undef truncl
00899 # if HAVE_RAW_DECL_TRUNCL
00900 _GL_WARN_ON_USE (truncl, "truncl is unportable - "
00901 "use gnulib module truncl for portability");
00902 # endif
00903 #endif
00904
00905
00906 #if 0
00907 # if 0
00908 _GL_EXTERN_C int gl_isfinitef (float x);
00909 _GL_EXTERN_C int gl_isfinited (double x);
00910 _GL_EXTERN_C int gl_isfinitel (long double x);
00911 # undef isfinite
00912 # define isfinite(x) \
00913 (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
00914 sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
00915 gl_isfinitef (x))
00916 # endif
00917 #elif defined GNULIB_POSIXCHECK
00918 # if defined isfinite
00919 _GL_WARN_REAL_FLOATING_DECL (isfinite);
00920 # undef isfinite
00921 # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
00922 # endif
00923 #endif
00924
00925
00926 #if 0
00927 # if 0
00928 _GL_EXTERN_C int gl_isinff (float x);
00929 _GL_EXTERN_C int gl_isinfd (double x);
00930 _GL_EXTERN_C int gl_isinfl (long double x);
00931 # undef isinf
00932 # define isinf(x) \
00933 (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
00934 sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
00935 gl_isinff (x))
00936 # endif
00937 #elif defined GNULIB_POSIXCHECK
00938 # if defined isinf
00939 _GL_WARN_REAL_FLOATING_DECL (isinf);
00940 # undef isinf
00941 # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
00942 # endif
00943 #endif
00944
00945
00946 #if 0
00947
00948 # if 1
00949
00950
00951 # if __GNUC__ >= 4
00952
00953 # undef isnanf
00954 # define isnanf(x) __builtin_isnanf ((float)(x))
00955 # elif defined isnan
00956 # undef isnanf
00957 # define isnanf(x) isnan ((float)(x))
00958 # endif
00959 # else
00960
00961 # undef isnanf
00962 # define isnanf rpl_isnanf
00963 _GL_EXTERN_C int isnanf (float x);
00964 # endif
00965 #endif
00966
00967 #if 0
00968
00969
00970
00971 # if 1
00972
00973
00974 # if __GNUC__ >= 4
00975
00976 # undef isnand
00977 # define isnand(x) __builtin_isnan ((double)(x))
00978 # else
00979 # undef isnand
00980 # define isnand(x) isnan ((double)(x))
00981 # endif
00982 # else
00983
00984 # undef isnand
00985 # define isnand rpl_isnand
00986 _GL_EXTERN_C int isnand (double x);
00987 # endif
00988 #endif
00989
00990 #if 0
00991
00992 # if 1
00993
00994
00995 # if __GNUC__ >= 4
00996
00997 # undef isnanl
00998 # define isnanl(x) __builtin_isnanl ((long double)(x))
00999 # elif defined isnan
01000 # undef isnanl
01001 # define isnanl(x) isnan ((long double)(x))
01002 # endif
01003 # else
01004
01005 # undef isnanl
01006 # define isnanl rpl_isnanl
01007 _GL_EXTERN_C int isnanl (long double x);
01008 # endif
01009 #endif
01010
01011
01012 #if 0
01013 # if 0
01014
01015
01016
01017
01018 # if 1 && __GNUC__ >= 4
01019 # define gl_isnan_f(x) __builtin_isnanf ((float)(x))
01020 # else
01021 _GL_EXTERN_C int rpl_isnanf (float x);
01022 # define gl_isnan_f(x) rpl_isnanf (x)
01023 # endif
01024 # if 1 && __GNUC__ >= 4
01025 # define gl_isnan_d(x) __builtin_isnan ((double)(x))
01026 # else
01027 _GL_EXTERN_C int rpl_isnand (double x);
01028 # define gl_isnan_d(x) rpl_isnand (x)
01029 # endif
01030 # if 1 && __GNUC__ >= 4
01031 # define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
01032 # else
01033 _GL_EXTERN_C int rpl_isnanl (long double x);
01034 # define gl_isnan_l(x) rpl_isnanl (x)
01035 # endif
01036 # undef isnan
01037 # define isnan(x) \
01038 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
01039 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
01040 gl_isnan_f (x))
01041 # elif __GNUC__ >= 4
01042 # undef isnan
01043 # define isnan(x) \
01044 (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \
01045 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
01046 __builtin_isnanf ((float)(x)))
01047 # endif
01048
01049 # ifndef isnan
01050 # define isnan isnan
01051 # endif
01052 #elif defined GNULIB_POSIXCHECK
01053 # if defined isnan
01054 _GL_WARN_REAL_FLOATING_DECL (isnan);
01055 # undef isnan
01056 # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
01057 # endif
01058 #endif
01059
01060
01061 #if 0
01062 # if 0
01063 # undef signbit
01064
01065 # define signbit(x) \
01066 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
01067 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
01068 __builtin_signbitf (x))
01069 # endif
01070 # if 0
01071 # undef signbit
01072 _GL_EXTERN_C int gl_signbitf (float arg);
01073 _GL_EXTERN_C int gl_signbitd (double arg);
01074 _GL_EXTERN_C int gl_signbitl (long double arg);
01075 # if __GNUC__ >= 2 && !__STRICT_ANSI__
01076 # define _GL_NUM_UINT_WORDS(type) \
01077 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
01078 # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
01079 # define gl_signbitf_OPTIMIZED_MACRO
01080 # define gl_signbitf(arg) \
01081 ({ union { float _value; \
01082 unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \
01083 } _m; \
01084 _m._value = (arg); \
01085 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
01086 })
01087 # endif
01088 # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
01089 # define gl_signbitd_OPTIMIZED_MACRO
01090 # define gl_signbitd(arg) \
01091 ({ union { double _value; \
01092 unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \
01093 } _m; \
01094 _m._value = (arg); \
01095 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
01096 })
01097 # endif
01098 # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
01099 # define gl_signbitl_OPTIMIZED_MACRO
01100 # define gl_signbitl(arg) \
01101 ({ union { long double _value; \
01102 unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
01103 } _m; \
01104 _m._value = (arg); \
01105 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
01106 })
01107 # endif
01108 # endif
01109 # define signbit(x) \
01110 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
01111 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
01112 gl_signbitf (x))
01113 # endif
01114 #elif defined GNULIB_POSIXCHECK
01115 # if defined signbit
01116 _GL_WARN_REAL_FLOATING_DECL (signbit);
01117 # undef signbit
01118 # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
01119 # endif
01120 #endif
01121
01122
01123 #endif
01124 #endif