+1999-10-31 Ulrich Drepper <drepper@cygnus.com>
+
+ * includes/features.h: Replace __USE_ISOC9X by __USE_ISOC99 and also
+ recognize _ISOC99_SOURCE.
+ * libio/stdio.h: Likewise.
+ * math/math.h: Likewise.
+ * math/bits/mathcalls.h: Likewise.
+ * math/stdio.h: Likewise.
+ * stdlib/stdlib.h: Likewise.
+ * sysdeps/alpha/fpu/bits/mathdef.h: Likewise.
+ * sysdeps/alpha/fpu/bits/mathinline.h: Likewise.
+ * sysdeps/arm/bits/huge_val.h: Likewise.
+ * sysdeps/generic/bits/mathdef.h: Likewise.
+ * sysdeps/i386/bits/huge_val.h: Likewise.
+ * sysdeps/i386/fpu/bits/mathdef.h: Likewise.
+ * sysdeps/i386/fpu/bits/mathinline.h: Likewise.
+ * sysdeps/ieee754/bits/huge_val.h: Likewise.
+ * sysdeps/m68k/bits/huge_val.h: Likewise.
+ * sysdeps/m68k/fpu/bits/mathdef.h: Likewise.
+ * sysdeps/m68k/fpu/bits/mathinline.h: Likewise.
+ * sysdeps/powerpc/bits/mathdef.h: Likewise.
+ * sysdeps/powerpc/bits/mathinline.h: Likewise.
+ * sysdeps/sparc/fpu/bits/mathdef.h: Likewise.
+ * sysdeps/sparc/fpu/bits/mathinline.h: Likewise.
+ * sysdeps/sparc/sparc32/fpu/bits/huge_val.h: Likewise.
+ * wcsmbs/wchar.h: Likewise.
+
+ * sysdeps/powerpc/bits/mathdef.h: Moved to...
+ * sysdeps/powerpc/fpu/bits/mathdef.h: ...here.
+ * sysdeps/powerpc/bits/mathinline.h: Moved to...
+ * sysdeps/powerpc/fpu/bits/mathinline.h: ...here.
+
+1999-10-31 Andreas Jaeger <aj@suse.de>
+
+ * manual/math.texi (Errors in Math Functions): Correct TeX code.
+
+1999-10-31 Andreas Jaeger <aj@suse.de>
+
+ * math/libm-test.inc: Change comments to use ISO C99 instead of
+ ISO C9x.
+ * math/w_lgamma.c: Likewise.
+ * math/w_lgammaf.c: Likewise.
+ * math/w_lgammal.c: Likewise.
+ * math/test-fenv.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/printf_fphex.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/printf_fphex.c: Likewise.
+ * sysdeps/generic/printf_fphex.c: Likewise.
+
+1999-10-31 Andreas Jaeger <aj@suse.de>
+
+ * manual/arith.texi (Parsing of Floats): Remove C from ISO C comment.
+
+ * manual/math.texi: Change ISO C9x to ISO C99.
+ * manual/startup.texi: Likewise.
+ * manual/stdio.texi: Likewise.
+
+1999-10-31 Andreas Jaeger <aj@suse.de>
+
+ * manual/arith.texi: Change ISO C9x to ISO C99.
+ * manual/time.texi (Low-Level Time String Parsing): Likewise.
+
1999-10-30 Ulrich Drepper <drepper@cygnus.com>
* socket/Makefile (distribute): Add ifreq.h.
cabs cabs
cabsf cabsf
cabsl cabsl
- > cacos NEW: ISO C 9x
- > cacosf NEW: ISO C 9x
- > cacosh NEW: ISO C 9x
- > cacoshf NEW: ISO C 9x
- > cacoshl NEW: ISO C 9x
- > cacosl NEW: ISO C 9x
+ > cacos NEW: ISO C99
+ > cacosf NEW: ISO C99
+ > cacosh NEW: ISO C99
+ > cacoshf NEW: ISO C99
+ > cacoshl NEW: ISO C99
+ > cacosl NEW: ISO C99
calloc calloc
callrpc callrpc
canonicalize_file_name canonicalize_file_name
> capget NEW: kernel
> capset NEW: kernel
- > carg NEW: ISO C 9x
- > cargf NEW: ISO C 9x
- > cargl NEW: ISO C 9x
- > casin NEW: ISO C 9x
- > casinf NEW: ISO C 9x
- > casinh NEW: ISO C 9x
- > casinhf NEW: ISO C 9x
- > casinhl NEW: ISO C 9x
- > casinl NEW: ISO C 9x
- > catan NEW: ISO C 9x
- > catanf NEW: ISO C 9x
- > catanh NEW: ISO C 9x
- > catanhf NEW: ISO C 9x
- > catanhl NEW: ISO C 9x
- > catanl NEW: ISO C 9x
+ > carg NEW: ISO C99
+ > cargf NEW: ISO C99
+ > cargl NEW: ISO C99
+ > casin NEW: ISO C99
+ > casinf NEW: ISO C99
+ > casinh NEW: ISO C99
+ > casinhf NEW: ISO C99
+ > casinhl NEW: ISO C99
+ > casinl NEW: ISO C99
+ > catan NEW: ISO C99
+ > catanf NEW: ISO C99
+ > catanh NEW: ISO C99
+ > catanhf NEW: ISO C99
+ > catanhl NEW: ISO C99
+ > catanl NEW: ISO C99
catclose catclose
catgets catgets
catopen catopen
cbrt cbrt
cbrtf cbrtf
cbrtl cbrtl
- > ccos NEW: ISO C 9x
- > ccosf NEW: ISO C 9x
- > ccosh NEW: ISO C 9x
- > ccoshf NEW: ISO C 9x
- > ccoshl NEW: ISO C 9x
- > ccosl NEW: ISO C 9x
+ > ccos NEW: ISO C99
+ > ccosf NEW: ISO C99
+ > ccosh NEW: ISO C99
+ > ccoshf NEW: ISO C99
+ > ccoshl NEW: ISO C99
+ > ccosl NEW: ISO C99
ceil ceil
ceilf ceilf
ceill ceill
- > cexp NEW: ISO C 9x
- > cexpf NEW: ISO C 9x
- > cexpl NEW: ISO C 9x
+ > cexp NEW: ISO C99
+ > cexpf NEW: ISO C99
+ > cexpl NEW: ISO C99
cfgetispeed cfgetispeed
cfgetospeed cfgetospeed
cfmakeraw cfmakeraw
chmod chmod
chown chown
chroot chroot
- > cimag NEW: ISO C 9x
- > cimagf NEW: ISO C 9x
- > cimagl NEW: ISO C 9x
+ > cimag NEW: ISO C99
+ > cimagf NEW: ISO C99
+ > cimagl NEW: ISO C99
clearenv clearenv
clearerr clearerr
clearerr_locked < REMOVED
clntudp_create clntudp_create
> clntunix_create NEW: sunrpc ext
clock clock
- > clog NEW: ISO C 9x
- > clog10 NEW: ISO C 9x
- > clog10f NEW: ISO C 9x
- > clog10l NEW: ISO C 9x
- > clogf NEW: ISO C 9x
- > clogl NEW: ISO C 9x
+ > clog NEW: ISO C99
+ > clog10 NEW: ISO C99
+ > clog10f NEW: ISO C99
+ > clog10l NEW: ISO C99
+ > clogf NEW: ISO C99
+ > clogl NEW: ISO C99
clone clone
close close
closedir closedir
closelog closelog
confstr confstr
- > conj NEW: ISO C 9x
- > conjf NEW: ISO C 9x
- > conjl NEW: ISO C 9x
+ > conj NEW: ISO C99
+ > conjf NEW: ISO C99
+ > conjl NEW: ISO C99
connect connect
copysign copysign
copysignf copysignf
coshf coshf
coshl coshl
cosl cosl
- > cpow NEW: ISO C 9x
- > cpowf NEW: ISO C 9x
- > cpowl NEW: ISO C 9x
- > cproj NEW: ISO C 9x
- > cprojf NEW: ISO C 9x
- > cprojl NEW: ISO C 9x
- > creal NEW: ISO C 9x
- > crealf NEW: ISO C 9x
- > creall NEW: ISO C 9x
+ > cpow NEW: ISO C99
+ > cpowf NEW: ISO C99
+ > cpowl NEW: ISO C99
+ > cproj NEW: ISO C99
+ > cprojf NEW: ISO C99
+ > cprojl NEW: ISO C99
+ > creal NEW: ISO C99
+ > crealf NEW: ISO C99
+ > creall NEW: ISO C99
creat creat
> creat64 NEW: LFS
create_module create_module
- > csin NEW: ISO C 9x
- > csinf NEW: ISO C 9x
- > csinh NEW: ISO C 9x
- > csinhf NEW: ISO C 9x
- > csinhl NEW: ISO C 9x
- > csinl NEW: ISO C 9x
- > csqrt NEW: ISO C 9x
- > csqrtf NEW: ISO C 9x
- > csqrtl NEW: ISO C 9x
- > ctan NEW: ISO C 9x
- > ctanf NEW: ISO C 9x
- > ctanh NEW: ISO C 9x
- > ctanhf NEW: ISO C 9x
- > ctanhl NEW: ISO C 9x
- > ctanl NEW: ISO C 9x
+ > csin NEW: ISO C99
+ > csinf NEW: ISO C99
+ > csinh NEW: ISO C99
+ > csinhf NEW: ISO C99
+ > csinhl NEW: ISO C99
+ > csinl NEW: ISO C99
+ > csqrt NEW: ISO C99
+ > csqrtf NEW: ISO C99
+ > csqrtl NEW: ISO C99
+ > ctan NEW: ISO C99
+ > ctanf NEW: ISO C99
+ > ctanh NEW: ISO C99
+ > ctanhf NEW: ISO C99
+ > ctanhl NEW: ISO C99
+ > ctanl NEW: ISO C99
ctermid ctermid
ctime ctime
ctime_r ctime_r
execvp execvp
exit exit
exp exp
- > exp10 NEW: ISO C 9x
- > exp10f NEW: ISO C 9x
- > exp10l NEW: ISO C 9x
- > exp2 NEW: ISO C 9x
- > exp2f NEW: ISO C 9x
- > exp2l NEW: ISO C 9x
+ > exp10 NEW: ISO C99
+ > exp10f NEW: ISO C99
+ > exp10l NEW: ISO C99
+ > exp2 NEW: ISO C99
+ > exp2f NEW: ISO C99
+ > exp2l NEW: ISO C99
expf expf
expl expl
expm1 expm1
fcvt_r fcvt_r
fdatasync fdatasync
> fdetach NEW: STREAMS
- > fdim NEW: ISO C 9x
- > fdimf NEW: ISO C 9x
- > fdiml NEW: ISO C 9x
+ > fdim NEW: ISO C99
+ > fdimf NEW: ISO C99
+ > fdiml NEW: ISO C99
fdopen fdopen
- > feclearexcept NEW: ISO C 9x
- > fegetenv NEW: ISO C 9x
- > fegetexceptflag NEW: ISO C 9x
- > fegetround NEW: ISO C 9x
- > feholdexcept NEW: ISO C 9x
+ > feclearexcept NEW: ISO C99
+ > fegetenv NEW: ISO C99
+ > fegetexceptflag NEW: ISO C99
+ > fegetround NEW: ISO C99
+ > feholdexcept NEW: ISO C99
feof feof
feof_locked < REMOVED
feof_unlocked feof_unlocked
- > feraiseexcept NEW: ISO C 9x
+ > feraiseexcept NEW: ISO C99
ferror ferror
ferror_locked < REMOVED
ferror_unlocked ferror_unlocked
- > fesetenv NEW: ISO C 9x
- > fesetexceptflag NEW: ISO C 9x
- > fesetround NEW: ISO C 9x
- > fetestexcept NEW: ISO C 9x
- > feupdateenv NEW: ISO C 9x
+ > fesetenv NEW: ISO C99
+ > fesetexceptflag NEW: ISO C99
+ > fesetround NEW: ISO C99
+ > fetestexcept NEW: ISO C99
+ > feupdateenv NEW: ISO C99
fexecve fexecve
fflush fflush
fflush_locked < REMOVED
floor floor
floorf floorf
floorl floorl
- > fma NEW: ISO C 9x
- > fmaf NEW: ISO C 9x
- > fmal NEW: ISO C 9x
- > fmax NEW: ISO C 9x
- > fmaxf NEW: ISO C 9x
- > fmaxl NEW: ISO C 9x
- > fmin NEW: ISO C 9x
- > fminf NEW: ISO C 9x
- > fminl NEW: ISO C 9x
+ > fma NEW: ISO C99
+ > fmaf NEW: ISO C99
+ > fmal NEW: ISO C99
+ > fmax NEW: ISO C99
+ > fmaxf NEW: ISO C99
+ > fmaxl NEW: ISO C99
+ > fmin NEW: ISO C99
+ > fminf NEW: ISO C99
+ > fminl NEW: ISO C99
fmod fmod
fmodf fmodf
fmodl fmodl
listen listen
llabs llabs
lldiv lldiv
- > llrint NEW: ISO C 9x
- > llrintf NEW: ISO C 9x
- > llrintl NEW: ISO C 9x
- > llround NEW: ISO C 9x
- > llroundf NEW: ISO C 9x
- > llroundl NEW: ISO C 9x
+ > llrint NEW: ISO C99
+ > llrintf NEW: ISO C99
+ > llrintl NEW: ISO C99
+ > llround NEW: ISO C99
+ > llroundf NEW: ISO C99
+ > llroundl NEW: ISO C99
llseek llseek
loc1 loc1
loc2 loc2
log1p log1p
log1pf log1pf
log1pl log1pl
- > log2 NEW: ISO C 9x
- > log2f NEW: ISO C 9x
- > log2l NEW: ISO C 9x
+ > log2 NEW: ISO C99
+ > log2f NEW: ISO C99
+ > log2l NEW: ISO C99
logb logb
logbf logbf
logbl logbl
longjmp longjmp
lrand48 lrand48
lrand48_r lrand48_r
- > lrint NEW: ISO C 9x
- > lrintf NEW: ISO C 9x
- > lrintl NEW: ISO C 9x
- > lround NEW: ISO C 9x
- > lroundf NEW: ISO C 9x
- > lroundl NEW: ISO C 9x
+ > lrint NEW: ISO C99
+ > lrintf NEW: ISO C99
+ > lrintl NEW: ISO C99
+ > lround NEW: ISO C99
+ > lroundf NEW: ISO C99
+ > lroundl NEW: ISO C99
lsearch lsearch
lseek lseek
> lseek64 NEW: LFS
munlockall munlockall
munmap munmap
muntrace muntrace
- > nan NEW: ISO C 9x
- > nanf NEW: ISO C 9x
- > nanl NEW: ISO C 9x
+ > nan NEW: ISO C99
+ > nanf NEW: ISO C99
+ > nanl NEW: ISO C99
nanosleep nanosleep
- > nearbyint NEW: ISO C 9x
- > nearbyintf NEW: ISO C 9x
- > nearbyintl NEW: ISO C 9x
+ > nearbyint NEW: ISO C99
+ > nearbyintf NEW: ISO C99
+ > nearbyintl NEW: ISO C99
> netname2host NEW: Secure RPC
> netname2user NEW: Secure RPC
nextafter nextafter
nextafterf nextafterf
nextafterl nextafterl
- > nexttoward NEW: ISO C 9x
- > nexttowardf NEW: ISO C 9x
- > nexttowardl NEW: ISO C 9x
+ > nexttoward NEW: ISO C99
+ > nexttowardf NEW: ISO C99
+ > nexttowardl NEW: ISO C99
nfsservctl nfsservctl
> nftw NEW: Unix98
> nftw64 NEW: LFS
remainderl remainderl
remove remove
remque remque
- > remquo NEW: ISO C 9x
- > remquof NEW: ISO C 9x
- > remquol NEW: ISO C 9x
+ > remquo NEW: ISO C99
+ > remquof NEW: ISO C99
+ > remquol NEW: ISO C99
rename rename
res_init res_init
revoke revoke
rintf rintf
rintl rintl
rmdir rmdir
- > round NEW: ISO C 9x
- > roundf NEW: ISO C 9x
- > roundl NEW: ISO C 9x
+ > round NEW: ISO C99
+ > roundf NEW: ISO C99
+ > roundl NEW: ISO C99
rpc_createerr rpc_createerr
rpmatch rpmatch
rresvport rresvport
scalb scalb
scalbf scalbf
scalbl scalbl
- > scalbln NEW: ISO C 9x
- > scalblnf NEW: ISO C 9x
- > scalblnl NEW: ISO C 9x
+ > scalbln NEW: ISO C99
+ > scalblnf NEW: ISO C99
+ > scalblnl NEW: ISO C99
scalbn scalbn
scalbnf scalbnf
scalbnl scalbnl
strstr strstr
strtod strtod
strtof strtof
- > strtoimax NEW: ISO C 9x
+ > strtoimax NEW: ISO C99
strtok strtok
strtok_r strtok_r
strtol strtol
strtoq strtoq
strtoul strtoul
strtoull strtoull
- > strtoumax NEW: ISO C 9x
+ > strtoumax NEW: ISO C99
strtouq strtouq
> strverscmp NEW: GNU ext.
strxfrm strxfrm
tempnam tempnam
textdomain textdomain
tfind tfind
- > tgamma NEW: ISO C 9x
- > tgammaf NEW: ISO C 9x
- > tgammal NEW: ISO C 9x
+ > tgamma NEW: ISO C99
+ > tgammaf NEW: ISO C99
+ > tgammal NEW: ISO C99
time time
timegm timegm
timelocal timelocal
towlower towlower
towupper towupper
tr_break tr_break
- > trunc NEW: ISO C 9x
+ > trunc NEW: ISO C99
truncate truncate
> truncate64 NEW: LFS
- > truncf NEW: ISO C 9x
- > truncl NEW: ISO C 9x
+ > truncf NEW: ISO C99
+ > truncl NEW: ISO C99
tsearch tsearch
ttyname ttyname
ttyname_r ttyname_r
wcsstr wcsstr
wcstod wcstod
wcstof wcstof
- > wcstoimax NEW: ISO C 9x
+ > wcstoimax NEW: ISO C99
wcstok wcstok
wcstol wcstol
wcstold wcstold
- > wcstoll NEW: ISO C 9x
+ > wcstoll NEW: ISO C99
wcstombs wcstombs
wcstoq wcstoq
wcstoul wcstoul
- > wcstoull NEW: ISO C 9x
- > wcstoumax NEW: ISO C 9x
+ > wcstoull NEW: ISO C99
+ > wcstoumax NEW: ISO C99
wcstouq wcstouq
> wcswcs NEW: Unix98
wcswidth wcswidth
with long double arguments.
Beside this most of the complex math functions which are new in
- ISO C 9X should be improved. Writing some of them in assembler is
+ ISO C99 should be improved. Writing some of them in assembler is
useful to exploit the parallelism which often is available.
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
-#if defined __USE_ISOC9X && defined _MATH_H
+#if defined __USE_ISOC99 && defined _MATH_H
/* Normally, there is no long double type and the `float' and `double'
expressions are evaluated as `double'. */
typedef double float_t; /* `float' expressions are evaluated as
/* Number of decimal digits for the `double' type. */
# define DECIMAL_DIG 15
-#endif /* ISO C 9X */
+#endif /* ISO C99 */
#ifndef __NO_LONG_DOUBLE_MATH
/* Signal that we do not really have a `long double'. The disables the
to specify the desired environment:
__STRICT_ANSI__ ISO Standard C.
- _ISOC9X_SOURCE Extensions to ISO C 89 from ISO C 9x.
+ _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
_POSIX_SOURCE IEEE Std 1003.1.
_POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
if >=199309L, add IEEE Std 1003.1b-1993;
These are defined by this file and are used by the
header files to decide what to declare or define:
- __USE_ISOC9X Define ISO C 9X things.
+ __USE_ISOC99 Define ISO C99 things.
__USE_POSIX Define IEEE Std 1003.1 things.
__USE_POSIX2 Define IEEE Std 1003.2 things.
__USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
/* Undefine everything, so we get a clean slate. */
-#undef __USE_ISOC9X
+#undef __USE_ISOC99
#undef __USE_POSIX
#undef __USE_POSIX2
#undef __USE_POSIX199309
/* If _GNU_SOURCE was defined by the user, turn on all the other features. */
#ifdef _GNU_SOURCE
-# undef _ISOC9X_SOURCE
-# define _ISOC9X_SOURCE 1
+# undef _ISOC99_SOURCE
+# define _ISOC99_SOURCE 1
# undef _POSIX_SOURCE
# define _POSIX_SOURCE 1
# undef _POSIX_C_SOURCE
/* If nothing (other than _GNU_SOURCE) is defined,
define _BSD_SOURCE and _SVID_SOURCE. */
-#if (!defined __STRICT_ANSI__ && !defined _ISOC9X_SOURCE && \
+#if (!defined __STRICT_ANSI__ && !defined _ISOC99_SOURCE && \
!defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE && \
!defined _XOPEN_SOURCE && !defined _XOPEN_SOURCE_EXTENDED && \
!defined _BSD_SOURCE && !defined _SVID_SOURCE)
# define _SVID_SOURCE 1
#endif
-/* This is to enable the ISO C 9x extension. It will go away as soon
- as this standard is officially released. */
-#ifdef _ISOC9X_SOURCE
-# define __USE_ISOC9X 1
+/* This is to enable the ISO C99 extension. Also recognize the old macro
+ which was used prior to the standard acceptance. This macro will
+ eventually go away and the features enabled by default once the ISO C99
+ standard is widely adopted. */
+#if defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE
+# define __USE_ISOC99 1
#endif
/* If none of the ANSI/POSIX macros are defined, use POSIX.1 and POSIX.2
extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
_G_va_list __arg) __THROW;
-#if defined __USE_BSD || defined __USE_ISOC9X || defined __USE_UNIX98
+#if defined __USE_BSD || defined __USE_ISOC99 || defined __USE_UNIX98
/* Maximum chars of output to write in MAXLEN. */
extern int snprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, ...)
extern int sscanf (__const char *__restrict __s,
__const char *__restrict __format, ...) __THROW;
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
/* Read formatted input from S into argument list ARG. */
extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
_G_va_list __arg)
@cindex classes, floating-point
@pindex math.h
-@w{ISO C 9x} defines macros that let you determine what sort of
+@w{ISO C99} defines macros that let you determine what sort of
floating-point number a variable holds.
@comment math.h
Another set of floating-point classification functions was provided by
BSD. The GNU C library also supports these functions; however, we
-recommend that you use the C9x macros in new code. Those are standard
+recommend that you use the ISO C99 macros in new code. Those are standard
and will be available more widely. Also, since they are macros, you do
not have to worry about the type of their argument.
This function returns a nonzero value if @var{x} is a ``not a number''
value, and zero otherwise.
-@strong{Note:} The @code{isnan} macro defined by @w{ISO C 9x} overrides
+@strong{Note:} The @code{isnan} macro defined by @w{ISO C99} overrides
the BSD function. This is normally not a problem, because the two
routines behave identically. However, if you really need to get the BSD
function for some reason, you can write
to this macro. However, this is not recommended; you should use the
@code{isfinite} macro instead. @xref{Floating Point Classes}.
-This macro was introduced in the @w{ISO C 9X} standard.
+This macro was introduced in the @w{ISO C99} standard.
@end deftypevr
@comment math.h
@node Status bit operations
@subsection Examining the FPU status word
-@w{ISO C 9x} defines functions to query and manipulate the
+@w{ISO C99} defines functions to query and manipulate the
floating-point status word. You can use these functions to check for
untrapped exceptions when it's convenient, rather than worrying about
them in the middle of a calculation.
the absolute value of @code{INT_MIN} (the smallest possible @code{int})
cannot be represented; thus, @w{@code{abs (INT_MIN)}} is not defined.
-@code{llabs} and @code{imaxdiv} are new to @w{ISO C 9x}.
+@code{llabs} and @code{imaxdiv} are new to @w{ISO C99}.
@end deftypefun
@comment math.h
@cindex FP arithmetic
There are some operations that are too complicated or expensive to
-perform by hand on floating-point numbers. @w{ISO C 9x} defines
+perform by hand on floating-point numbers. @w{ISO C99} defines
functions to do these operations, which mostly involve changing single
bits.
will raise an exception if @var{a} is NaN. (This does @emph{not}
happen with @code{==} and @code{!=}; those merely return false and true,
respectively, when NaN is examined.) Frequently this exception is
-undesirable. @w{ISO C 9x} therefore defines comparison functions that
+undesirable. @w{ISO C99} therefore defines comparison functions that
do not raise exceptions when NaN is examined. All of the functions are
implemented as macros which allow their arguments to be of any
floating-point type. The macros are guaranteed to evaluate their
@pindex complex.h
@cindex complex numbers
-@w{ISO C 9x} introduces support for complex numbers in C. This is done
+@w{ISO C99} introduces support for complex numbers in C. This is done
with a new type qualifier, @code{complex}. It is a keyword if and only
if @file{complex.h} has been included. There are three complex types,
corresponding to the three real types: @code{float complex},
@cindex decompose complex numbers
@pindex complex.h
-@w{ISO C 9x} also defines functions that perform basic operations on
+@w{ISO C99} also defines functions that perform basic operations on
complex numbers, such as decomposition and conjugation. The prototypes
for all these functions are in @file{complex.h}. All functions are
available in three variants, one for each of the three complex types.
arguments are of type @code{long long int} and the result is returned as
a structure of type @code{lldiv_t}.
-The @code{lldiv} function was added in @w{ISO C 9x}.
+The @code{lldiv} function was added in @w{ISO C99}.
@end deftypefun
@comment inttypes.h
arguments are of type @code{intmax_t} and the result is returned as
a structure of type @code{imaxdiv_t}.
-The @code{imaxdiv} function was added in @w{ISO C 9x}.
+The @code{imaxdiv} function was added in @w{ISO C99}.
@end deftypefun
appropriate for the sign of the value. It also sets @code{errno} to
@code{ERANGE} to indicate there was overflow.
-The @code{strtoll} function was introduced in @w{ISO C 9x}.
+The @code{strtoll} function was introduced in @w{ISO C99}.
@end deftypefun
@comment stdlib.h
returns an @code{unsigned long long int}. The value returned on overflow
is @code{ULONG_LONG_MAX} (@pxref{Range of Type}).
-The @code{strtoull} function was introduced in @w{ISO C 9x}.
+The @code{strtoull} function was introduced in @w{ISO C99}.
@end deftypefun
@comment stdlib.h
This function is similar to @code{atol}, except it returns a @code{long
long int}.
-The @code{atoll} function was introduced in @w{ISO C 9x}. It too is
+The @code{atoll} function was introduced in @w{ISO C99}. It too is
obsolete (despite having just been added); use @code{strtoll} instead.
@end deftypefun
@end deftypefun
@comment stdlib.h
-@comment ISO C
+@comment ISO
@deftypefun float strtof (const char *@var{string}, char **@var{tailptr})
@comment stdlib.h
-@comment ISO C
+@comment ISO
@deftypefunx {long double} strtold (const char *@var{string}, char **@var{tailptr})
These functions are analogous to @code{strtod}, but return @code{float}
and @code{long double} values respectively. They report errors in the
can be much slower but has more precision (on systems where @code{long
double} is a separate type).
-These functions have been GNU extensions and are new to @w{ISO C 9x}.
+These functions have been GNU extensions and are new to @w{ISO C99}.
@end deftypefun
@comment stdlib.h
@pindex wchar.h
This type is defined in @file{wchar.h} and got introduced in the second
-amendment to @w{ISO C 89}.
+amendment to @w{ISO C89}.
@end deftp
As there are for the @code{char} data type there also exist macros
All mathematical functions which take a floating-point argument
have three variants, one each for @code{double}, @code{float}, and
@code{long double} arguments. The @code{double} versions are mostly
-defined in @w{ISO C 89}. The @code{float} and @code{long double}
-versions are from the numeric extensions to C included in @w{ISO C 9X}.
+defined in @w{ISO C89}. The @code{float} and @code{long double}
+versions are from the numeric extensions to C included in @w{ISO C99}.
Which of the three versions of a function should be used depends on the
situation. For most calculations, the @code{float} functions are the
@cindex complex trigonometric functions
-@w{ISO C 9x} defines variants of the trig functions which work on
+@w{ISO C99} defines variants of the trig functions which work on
complex numbers. The GNU C library provides these functions, but they
are only useful if your compiler supports the new complex types defined
by the standard.
-@c Change this when gcc is fixed. -zw
+@c XXX Change this when gcc is fixed. -zw
(As of this writing GCC supports complex numbers, but there are bugs in
the implementation.)
@end deftypefun
@cindex inverse complex trigonometric functions
-@w{ISO C 9x} defines complex versions of the inverse trig functions.
+@w{ISO C99} defines complex versions of the inverse trig functions.
@comment complex.h
@comment ISO
@code{ilogb} returns this value if its argument is @code{0}. The
numeric value is either @code{INT_MIN} or @code{-INT_MAX}.
-This macro is defined in @w{ISO C 9X}.
+This macro is defined in @w{ISO C99}.
@end deftypevr
@comment math.h
@code{ilogb} returns this value if its argument is @code{NaN}. The
numeric value is either @code{INT_MIN} or @code{INT_MAX}.
-This macro is defined in @w{ISO C 9X}.
+This macro is defined in @w{ISO C99}.
@end deftypevr
These values are system specific. They might even be the same. The
@cindex complex exponentiation functions
@cindex complex logarithm functions
-@w{ISO C 9X} defines complex variants of some of the exponentiation and
+@w{ISO C99} defines complex variants of some of the exponentiation and
logarithm functions.
@comment complex.h
These functions exist for compatibility reasons. They are equivalent to
@code{lgamma} etc. It is better to use @code{lgamma} since for one the
name reflects better the actual computation, moreover @code{lgamma} is
-standardized in @w{ISO C 9x} while @code{gamma} is not.
+standardized in @w{ISO C99} while @code{gamma} is not.
@end deftypefun
@comment math.h
-@comment XPG
+@comment XPG, ISO
@deftypefun double tgamma (double @var{x})
@comment math.h
-@comment XPG
+@comment XPG, ISO
@deftypefunx float tgammaf (float @var{x})
@comment math.h
-@comment XPG
+@comment XPG, ISO
@deftypefunx {long double} tgammal (long double @var{x})
@code{tgamma} applies the gamma function to @var{x}. The gamma
function is defined as
@end smallexample
@end ifnottex
-This function was introduced in @w{ISO C 9x}.
+This function was introduced in @w{ISO C99}.
@end deftypefun
@comment math.h
floating-point numbers with base 2) the ULP is represented by
@tex
-$$\frac{|{\mathrm d.d\dots d - (z/2^e)|}{2^{p-1}}$$
+$${|d.d\dots d - (z/2^e)|}\over {2^{p-1}}$$
@end tex
@ifnottex
@smallexample
@code{_exit} and @code{_Exit} were compatible so they have not used the
POSIX name.
-This function was introduced in @w{ISO C9x} and is declared in
+This function was introduced in @w{ISO C99} and is declared in
@file{stdlib.h}.
@end deftypefun
anyway, but the @samp{h} modifier says to convert it back to a
@code{char} again.
-This modifier was introduced in @w{ISO C 9x}.
+This modifier was introduced in @w{ISO C99}.
@item h
Specifies that the argument is a @code{short int} or @code{unsigned
Specifies that the argument is a @code{intmax_t} or @code{uintmax_t}, as
appropriate.
-This modifier was introduced in @w{ISO C 9x}.
+This modifier was introduced in @w{ISO C99}.
@item l
Specifies that the argument is a @code{long int} or @code{unsigned long
@item t
Specifies that the argument is a @code{ptrdiff_t}.
-This modifier was introduced in @w{ISO C 9x}.
+This modifier was introduced in @w{ISO C99}.
@item z
@itemx Z
Specifies that the argument is a @code{size_t}.
-@samp{z} was introduced in @w{ISO C 9x}. @samp{Z} is a GNU extension
+@samp{z} was introduced in @w{ISO C99}. @samp{Z} is a GNU extension
predating this addition and should not be used in new code.
@end table
is the number of characters stored, not including the terminating null.
If this value equals @code{@var{size} - 1}, then there was not enough
space in @var{s} for all the output. This change was necessary with
-the adoption of snprintf by ISO C9x.
+the adoption of snprintf by ISO C99.
@end deftypefun
@node Dynamic Output
Specifies that the argument is a @code{signed char *} or @code{unsigned
char *}.
-This modifier was introduced in @w{ISO C 9x}.
+This modifier was introduced in @w{ISO C99}.
@item h
Specifies that the argument is a @code{short int *} or @code{unsigned
@item j
Specifies that the argument is a @code{intmax_t *} or @code{uintmax_t *}.
-This modifier was introduced in @w{ISO C 9x}.
+This modifier was introduced in @w{ISO C99}.
@item l
Specifies that the argument is a @code{long int *} or @code{unsigned
@item t
Specifies that the argument is a @code{ptrdiff_t *}.
-This modifier was introduced in @w{ISO C 9x}.
+This modifier was introduced in @w{ISO C99}.
@item z
Specifies that the argument is a @code{size_t *}.
-This modifier was introduced in @w{ISO C 9x}.
+This modifier was introduced in @w{ISO C99}.
@end table
All of the @samp{%e}, @samp{%f}, @samp{%g}, @samp{%E}, and @samp{%G}
@end smallexample
@strong{Compatibility Note:} The string collation functions are a new
-feature of @w{ISO C 89}. Older C dialects have no equivalent feature.
+feature of @w{ISO C89}. Older C dialects have no equivalent feature.
@node Search Functions
@section Search Functions
Equivalent to the use of @code{%Y-%m-%d} which is the @w{ISO 8601} date
format.
-This is a GNU extension following an @w{ISO C 9X} extension to
+This is a GNU extension following an @w{ISO C99} extension to
@code{strftime}.
@item %g
/* Hyperbolic tangent of X. */
__MATHCALL (tanh,, (_Mdouble_ __x));
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
/* Hyperbolic arc cosine of X. */
__MATHCALL (acosh,, (_Mdouble_ __x));
/* Hyperbolic arc sine of X. */
/* Break VALUE into integral and fractional parts. */
__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr));
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
/* Return exp(X) - 1. */
__MATHCALL (expm1,, (_Mdouble_ __x));
__MATHCALL (logb,, (_Mdouble_ __x));
#endif
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
/* Compute base-2 exponential of X. */
__MATHCALL (exp2,, (_Mdouble_ __x));
/* Return the square root of X. */
__MATHCALL (sqrt,, (_Mdouble_ __x));
-#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
/* Return `sqrt(X*X + Y*Y)'. */
__MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
#endif
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
/* Return the cube root of X. */
__MATHCALL (cbrt,, (_Mdouble_ __x));
#endif
__MATHCALL (significand,, (_Mdouble_ __x));
#endif /* Use misc. */
-#if defined __USE_MISC || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_ISOC99
/* Return X with its signed changed to Y's. */
__MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
#endif
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
/* Return representation of NaN for double type. */
__MATHCALLX (nan,, (__const char *__tagb), (__const__));
#endif
#endif
-#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
/* Error and gamma functions. */
__MATHCALL (erf,, (_Mdouble_));
__MATHCALL (erfc,, (_Mdouble_));
#endif
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
/* Return the integer nearest X in the direction of the
prevailing rounding mode. */
__MATHCALL (rint,, (_Mdouble_ __x));
/* Return X + epsilon if X < Y, X - epsilon if X > Y. */
__MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
-# ifdef __USE_ISOC9X
+# ifdef __USE_ISOC99
__MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__));
# endif
__MATHDECL (int,ilogb,, (_Mdouble_ __x));
#endif
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
/* Return X times (2 to the Nth power). */
__MATHCALL (scalbln,, (_Mdouble_ __x, long int __n));
/* Multiply-add function computed as a ternary operation. */
__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z));
-#endif /* Use ISO C 9X. */
+#endif /* Use ISO C99. */
testing. Handling of specific inputs (e.g. infinity, not-a-number)
is also tested. Correct handling of exceptions is checked
against. These implemented tests should check all cases that are
- specified in ISO C 9X.
+ specified in ISO C99.
Exception testing: At the moment only divide-by-zero and invalid
exceptions are tested. Overflow/underflow and inexact exceptions
check_ulp ();
#endif
- /* Keep the tests a wee bit ordered (according to ISO 9X). */
+ /* Keep the tests a wee bit ordered (according to ISO C99). */
/* Classification macros: */
fpclassify_test ();
isfinite_test ();
#include <bits/huge_val.h>
/* Get machine-dependent NAN value (returned for some domain errors). */
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
# include <bits/nan.h>
#endif
-/* Get general and ISO C 9X specific information. */
+/* Get general and ISO C99 specific information. */
#include <bits/mathdef.h>
#undef _Mdouble_
#undef __MATH_PRECNAME
-#if defined __USE_MISC || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_ISOC99
/* Include the file of declarations again, this time using `float'
# endif /* __STDC__ || __GNUC__ */
-#endif /* Use misc or ISO C 9X. */
+#endif /* Use misc or ISO C99. */
#undef __MATHDECL_1
#undef __MATHDECL
#undef __MATHCALL
-#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
/* This variable is used by `gamma' and `lgamma'. */
extern int signgam;
#endif
-/* ISO C 9X defines some generic macros which work on any data type. */
-#if __USE_ISOC9X
+/* ISO C99 defines some generic macros which work on any data type. */
+#if __USE_ISOC99
/* Get the architecture specific values describing the floating-point
evaluation. The following symbols will get defined:
? __isinf (x) : __isinfl (x))
# endif
-#endif /* Use ISO C 9X. */
+#endif /* Use ISO C99. */
#ifdef __USE_MISC
/* Support for various different standard error handling behaviors. */
_SVID_, /* According to System V, release 4. */
_XOPEN_, /* Nowadays also Unix98. */
_POSIX_,
- _ISOC_ /* Actually this is ISO C 9X. */
+ _ISOC_ /* Actually this is ISO C99. */
} _LIB_VERSION_TYPE;
/* This variable can be changed at run-time to any of the values above to
#endif
-#if __USE_ISOC9X
-/* ISO C 9X defines some macros to compare number while taking care
+#if __USE_ISOC99
+/* ISO C99 defines some macros to compare number while taking care
for unordered numbers. Since many FPUs provide special
instructions to support these operations and these tests are
defined in <bits/mathinline.h>, we define the generic macros at
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* Tests for ISO C 9X 7.6: Floating-point environment */
+/* Tests for ISO C99 7.6: Floating-point environment */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
int local_signgam;
y = __ieee754_lgamma_r(x,&local_signgam);
if (_LIB_VERSION != _ISOC_)
- /* ISO C 9x does not define the global variable. */
+ /* ISO C99 does not define the global variable. */
signgam = local_signgam;
if(_LIB_VERSION == _IEEE_) return y;
if(!__finite(y)&&__finite(x)) {
int local_signgam;
y = __ieee754_lgammaf_r(x,&local_signgam);
if (_LIB_VERSION != _ISOC_)
- /* ISO C 9x does not define the global variable. */
+ /* ISO C99 does not define the global variable. */
signgam = local_signgam;
if(_LIB_VERSION == _IEEE_) return y;
if(!__finitef(y)&&__finitef(x)) {
int local_signgam;
y = __ieee754_lgammal_r(x,&local_signgam);
if (_LIB_VERSION != _ISOC_)
- /* ISO C 9x does not define the global variable. */
+ /* ISO C99 does not define the global variable. */
signgam = local_signgam;
if(_LIB_VERSION == _IEEE_) return y;
if(!__finitel(y)&&__finitel(x)) {
}
#endif /* Optimizing. */
-#if defined __USE_BSD || defined __USE_ISOC9X
+#if defined __USE_BSD || defined __USE_ISOC99
/* Maximum chars of output to write in MAXLEN. */
extern int __snprintf (char *__s, size_t __maxlen,
__const char *__format, ...)
extern int sscanf (__const char *__restrict __s,
__const char *__restrict __format, ...) __THROW;
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
/* Read formatted input from S into argument list ARG. */
extern int __vfscanf (FILE *__s, __const char *__format,
__gnuc_va_list __arg) __THROW;
# define __ldiv_t_defined 1
#endif
-#if defined __USE_ISOC9X && !defined __lldiv_t_defined
+#if defined __USE_ISOC99 && !defined __lldiv_t_defined
/* Returned by `lldiv'. */
__extension__ typedef struct
{
/* Convert a string to a long integer. */
extern long int atol (__const char *__nptr) __THROW;
-#if defined __USE_ISOC9X || (defined __GNUC__ && defined __USE_MISC)
-/* These functions will part of the standard C library in ISO C 9X. */
+#if defined __USE_ISOC99 || (defined __GNUC__ && defined __USE_MISC)
+/* These functions will part of the standard C library in ISO C99. */
__extension__ extern long long int atoll (__const char *__nptr) __THROW;
#endif
extern double strtod (__const char *__restrict __nptr,
char **__restrict __endptr) __THROW;
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
/* Likewise for `float' and `long double' sizes of floating-point numbers. */
extern float strtof (__const char *__restrict __nptr,
char **__restrict __endptr) __THROW;
__THROW;
#endif /* GCC and use BSD. */
-#if defined __USE_ISOC9X || (defined __GNUC__ && defined __USE_MISC)
-/* These functions will part of the standard C library in ISO C 9X. */
+#if defined __USE_ISOC99 || (defined __GNUC__ && defined __USE_MISC)
+/* These functions will part of the standard C library in ISO C99. */
/* Convert a string to a quadword integer. */
__extension__
extern unsigned long long int strtoull (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
__THROW;
-#endif /* ISO C 9X or GCC and use MISC. */
+#endif /* ISO C99 or GCC and use MISC. */
#ifdef __USE_GNU
int __base, int __group) __THROW;
# define __strtoul_internal_defined 1
#endif
-#if defined __GNUC__ || defined __USE_ISOC9X
+#if defined __GNUC__ || defined __USE_ISOC99
# ifndef __strtoll_internal_defined
__extension__
extern long long int __strtoll_internal (__const char *__restrict __nptr,
return __strtoul_internal (__nptr, __endptr, __base, 0);
}
-# ifdef __USE_ISOC9X
+# ifdef __USE_ISOC99
extern __inline float
strtof (__const char *__restrict __nptr, char **__restrict __endptr) __THROW
{
}
# endif
-# if defined __USE_MISC || defined __USE_ISOC9X
+# if defined __USE_MISC || defined __USE_ISOC99
__extension__ extern __inline long long int
strtoll (__const char *__restrict __nptr, char **__restrict __endptr,
int __base) __THROW
return strtol (__nptr, (char **) NULL, 10);
}
-# if defined __USE_MISC || defined __USE_ISOC9X
+# if defined __USE_MISC || defined __USE_ISOC99
__extension__ extern __inline long long int
atoll (__const char *__nptr) __THROW
{
perform stdio cleanup, and terminate program execution with STATUS. */
extern void exit (int __status) __THROW __attribute__ ((__noreturn__));
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
/* Terminate the program with STATUS without calling any of the
functions registered with `atexit' or `on_exit'. */
extern void _Exit (int __status) __THROW __attribute__ ((__noreturn__));
/* Return the absolute value of X. */
extern int abs (int __x) __THROW __attribute__ ((__const__));
extern long int labs (long int __x) __THROW __attribute__ ((__const__));
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
__extension__ extern long long int llabs (long long int __x)
__THROW __attribute__ ((__const__));
#endif
__THROW __attribute__ ((__const__));
extern ldiv_t ldiv (long int __numer, long int __denom)
__THROW __attribute__ ((__const__));
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
__extension__ extern lldiv_t lldiv (long long int __numer,
long long int __denom)
__THROW __attribute__ ((__const__));
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* FIXME! This file describes properties of the compiler, not the machine;
it should not be part of libc! */
-#if defined __USE_ISOC9X && defined _MATH_H
+#if defined __USE_ISOC99 && defined _MATH_H
# ifdef __GNUC__
# if __STDC__ == 1
/* Number of decimal digits for the `double' type. */
# define DECIMAL_DIG 15
-#endif /* ISO C 9X */
+#endif /* ISO C99 */
#ifndef __NO_LONG_DOUBLE_MATH
/* Signal that we do not really have a `long double'. The disables the
/* Inline math functions for Alpha.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger-Tang.
# define __MATH_INLINE extern __inline
#endif
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
# define isunordered(x, y) \
(__extension__ \
({ double __r; \
(__extension__ \
({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
!isunordered(__x, __y) && __x != __y; }))
-#endif /* ISOC9X */
+#endif /* ISO C99 */
#define __inline_copysign(NAME, TYPE) \
__MATH_INLINE TYPE \
#endif /* GCC. */
-/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
+/* ISO C99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
# ifdef __GNUC__
same as `double'. */
# define HUGE_VALL HUGE_VAL
-#endif /* __USE_ISOC9X. */
+#endif /* __USE_ISOC99. */
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
-#if defined __USE_ISOC9X && defined _MATH_H
+#if defined __USE_ISOC99 && defined _MATH_H
/* Normally, there is no long double type and the `float' and `double'
expressions are evaluated as `double'. */
typedef double float_t; /* `float' expressions are evaluated as
/* Number of decimal digits for the `double' type. */
# define DECIMAL_DIG 15
-#endif /* ISO C 9X */
+#endif /* ISO C99 */
#ifndef __NO_LONG_DOUBLE_MATH
/* Signal that we do not really have a `long double'. The disables the
/* Print floating point number in hexadecimal notation according to
- ISO C 9X.
+ ISO C99.
Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#endif /* GCC 2.95 */
-/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
+/* ISO C99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
# if __GNUC_PREREQ(2,95)
# endif /* GCC 2.95 */
-#endif /* __USE_ISOC9X. */
+#endif /* __USE_ISOC99. */
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
-#if defined __USE_ISOC9X && defined _MATH_H
+#if defined __USE_ISOC99 && defined _MATH_H
/* The ix87 FPUs evaluate all values in the 80 bit floating-point format
which is also available for the user as `long double'. Therefore we
define: */
/* Number of decimal digits for the `long double' type. */
# define DECIMAL_DIG 18
-#endif /* ISO C 9X */
+#endif /* ISO C99 */
#endif
-#if defined __USE_ISOC9X && defined __GNUC__ && __GNUC__ >= 2
-/* ISO C 9X defines some macros to perform unordered comparisons. The
+#if defined __USE_ISOC99 && defined __GNUC__ && __GNUC__ >= 2
+/* ISO C99 defines some macros to perform unordered comparisons. The
ix87 FPU supports this with special opcodes and we should use them.
These must not be inline functions since we have to be able to handle
all floating-point types. */
be suffixed with f and l for the float and long double version,
respectively). OP is the name of the FPU operation. */
-#if defined __USE_MISC || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_ISOC99
# define __inline_mathop(func, op) \
__inline_mathop_ (double, func, op) \
__inline_mathop_ (float, __CONCAT(func,f), op) \
__inline_mathop_decl_ (float_type, func, op, "0" (__x))
-#if defined __USE_MISC || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_ISOC99
# define __inline_mathop_decl(func, op, params...) \
__inline_mathop_decl_ (double, func, op, params) \
__inline_mathop_decl_ (float, __CONCAT(func,f), op, params) \
}
-#if defined __USE_MISC || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_ISOC99
# define __inline_mathcode(func, arg, code) \
__inline_mathcode_ (double, func, arg, code) \
__inline_mathcode_ (float, __CONCAT(func,f), arg, code) \
/* Optimized versions for some non-standardized functions. */
-#if defined __USE_ISOC9X || defined __USE_MISC
+#if defined __USE_ISOC99 || defined __USE_MISC
__inline_mathcode (expm1, __x, __expm1_code)
#endif
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
__inline_mathop_decl (log2, "fld1; fxch; fyl2x", "0" (__x) : "st(1)")
__MATH_INLINE float ldexpf (float __x, int __y);
#endif /* GCC. */
-/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
+/* ISO C99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
# ifdef __GNUC__
same as `double'. */
# define HUGE_VALL HUGE_VAL
-#endif /* __USE_ISOC9X. */
+#endif /* __USE_ISOC99. */
/* Print floating point number in hexadecimal notation according to
- ISO C 9X.
+ ISO C99.
Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Print floating point number in hexadecimal notation according to
- ISO C 9X.
+ ISO C99.
Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#endif /* GCC. */
-/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
+/* ISO C 99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
# if __GNUC_PREREQ(2,95)
# endif /* GCC 2.95. */
-#endif /* __USE_ISOC9X. */
+#endif /* __USE_ISOC99. */
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
-#if defined __USE_ISOC9X && defined _MATH_H
+#if defined __USE_ISOC99 && defined _MATH_H
/* The m68k FPUs evaluate all values in the 96 bit floating-point format
which is also available for the user as `long double'. Therefore we
define: */
/* Number of decimal digits for the `long double' type. */
# define DECIMAL_DIG 18
-#endif /* ISO C 9X */
+#endif /* ISO C99 */
#ifdef __GNUC__
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
-/* ISO C 9X defines some macros to perform unordered comparisons. The
+/* ISO C99 defines some macros to perform unordered comparisons. The
m68k FPU supports this with special opcodes and we should use them.
These must not be inline functions since we have to be able to handle
all floating-point types. */
suffixed with f and l for the float and long double version, resp). OP
is the name of the fpu operation (without leading f). */
-#if defined __USE_MISC || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_ISOC99
# define __inline_mathop(func, op) \
__inline_mathop1(double, func, op) \
__inline_mathop1(float, __CONCAT(func,f), op) \
__inline_mathop(__tanh, tanh)
__inline_mathop(__fabs, abs)
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
__inline_mathop(__rint, int)
__inline_mathop(__expm1, etoxm1)
__inline_mathop(__log1p, lognp1)
__inline_mathop(__significand, getman)
#endif
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
__inline_mathop(__log2, log2)
__inline_mathop(__trunc, intrz)
#endif
__inline_mathop(tan, tan)
__inline_mathop(tanh, tanh)
-# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
+# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
__inline_mathop(rint, int)
__inline_mathop(expm1, etoxm1)
__inline_mathop(log1p, lognp1)
__inline_mathop(significand, getman)
# endif
-# ifdef __USE_ISOC9X
+# ifdef __USE_ISOC99
__inline_mathop(log2, log2)
__inline_mathop(trunc, intrz)
# endif
}
__inline_functions(double,)
-#if defined __USE_MISC || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_ISOC99
__inline_functions(float,f)
__inline_functions(long double,l)
#endif
#endif
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
# define __inline_functions(float_type, s) \
__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \
__inline_forward_c(double,floor, (double __x), (__x))
__inline_forward_c(double,ceil, (double __x), (__x))
# ifdef __USE_MISC
-# ifndef __USE_ISOC9X /* Conflict with macro of same name. */
+# ifndef __USE_ISOC99 /* Conflict with macro of same name. */
__inline_forward_c(int,isinf, (double __value), (__value))
# endif
__inline_forward_c(int,finite, (double __value), (__value))
__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n))
# endif
# if defined __USE_MISC || defined __USE_XOPEN
-# ifndef __USE_ISOC9X /* Conflict with macro of same name. */
+# ifndef __USE_ISOC99 /* Conflict with macro of same name. */
__inline_forward_c(int,isnan, (double __value), (__value))
# endif
# endif
-# ifdef __USE_ISOC9X
+# ifdef __USE_ISOC99
__inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n))
__inline_forward_c(double,nearbyint, (double __value), (__value))
__inline_forward_c(long int,lrint, (double __value), (__value))
(__x, __sinx, __cosx))
# endif
-# if defined __USE_MISC || defined __USE_ISOC9X
+# if defined __USE_MISC || defined __USE_ISOC99
__inline_forward(float,frexpf, (float __value, int *__expptr),
(__value, __expptr))
__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n))
__inline_forward_c(int,isnanf, (float __value), (__value))
# endif
-# ifdef __USE_ISOC9X
+# ifdef __USE_ISOC99
__inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n))
__inline_forward_c(float,nearbyintf, (float __value), (__value))
__inline_forward_c(long int,lrintf, (float __value), (__value))
__inline_forward_c(long double,scalbnl, (long double __x, int __n), (__x, __n))
__inline_forward_c(int,isnanl, (long double __value), (__value))
# endif
-# ifdef __USE_ISOC9X
+# ifdef __USE_ISOC99
__inline_forward_c(long double,scalblnl, (long double __x, long int __n),
(__x, __n))
__inline_forward_c(long double,nearbyintl, (long double __value), (__value))
(__x, __sinx, __cosx))
# endif
-#endif /* Use misc or ISO C9X */
+#endif /* Use misc or ISO C99 */
#undef __inline_forward
#undef __inline_forward_c
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
FIXME! This file does not deal with the -fshort-double option of
gcc! */
-#if defined __USE_ISOC9X && defined _MATH_H
+#if defined __USE_ISOC99 && defined _MATH_H
# ifdef __GNUC__
# if __STDC__ == 1
/* Number of decimal digits for the `double' type. */
# define DECIMAL_DIG 15
-#endif /* ISO C 9X */
+#endif /* ISO C99 */
#ifndef __NO_LONG_DOUBLE_MATH
/* Signal that we do not really have a `long double'. The disables the
/* Inline math functions for powerpc.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#if defined __GNUC__ && !defined _SOFT_FLOAT
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
# define __unordered_cmp(x, y) \
(__extension__ \
({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
# define islessequal(x, y) ((__unordered_cmp (x, y) & 0xA) != 0)
# define islessgreater(x, y) ((__unordered_cmp (x, y) & 0xC) != 0)
# define isunordered(x, y) (__unordered_cmp (x, y) & 1)
-#endif /* __USE_ISOC9X && !_SOFT_FLOAT */
+#endif /* __USE_ISOC99 && !_SOFT_FLOAT */
#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
# define __MATH_INLINE extern __inline
#endif /* __cplusplus */
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
__MATH_INLINE long int lrint (double __x);
__MATH_INLINE long int
lrint (double __x)
return __x < __y ? 0 : __x - __y;
}
-#endif /* __USE_ISOC9X */
+#endif /* __USE_ISOC99 */
#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
#endif /* __GNUC__ && !_SOFT_FLOAT */
--- /dev/null
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#if !defined _MATH_H && !defined _COMPLEX_H
+# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
+#endif
+
+
+/* FIXME! This file describes properties of the compiler, not the machine;
+ it should not be part of libc!
+
+ FIXME! This file does not deal with the -fshort-double option of
+ gcc! */
+
+#if defined __USE_ISOC99 && defined _MATH_H
+# ifdef __GNUC__
+# if __STDC__ == 1
+
+/* In GNU or ANSI mode, gcc leaves `float' expressions as-is. */
+typedef float float_t; /* `float' expressions are evaluated as
+ `float'. */
+typedef double double_t; /* `double' expressions are evaluated as
+ `double'. */
+
+/* Signal that types stay as they were declared. */
+# define FLT_EVAL_METHOD 0
+
+/* Define `INFINITY' as value of type `float'. */
+# define INFINITY HUGE_VALF
+
+# else
+
+/* For `gcc -traditional', `float' expressions are evaluated as `double'. */
+typedef double float_t; /* `float' expressions are evaluated as
+ `double'. */
+typedef double double_t; /* `double' expressions are evaluated as
+ `double'. */
+
+/* Signal that both types are `double'. */
+# define FLT_EVAL_METHOD 1
+
+/* Define `INFINITY' as value of type `float'. */
+# define INFINITY HUGE_VALF
+
+# endif
+# else
+
+/* Wild guess at types for float_t and double_t. */
+typedef double float_t;
+typedef double double_t;
+
+/* Strange compiler, we don't know how it works. */
+# define FLT_EVAL_METHOD -1
+
+/* Define `INFINITY' as value of type `float'. */
+# define INFINITY HUGE_VALF
+
+# endif
+
+/* The values returned by `ilogb' for 0 and NaN respectively. */
+# define FP_ILOGB0 0x80000001
+# define FP_ILOGBNAN 0x7fffffff
+
+/* Number of decimal digits for the `double' type. */
+# define DECIMAL_DIG 15
+
+#endif /* ISO C99 */
+
+#ifndef __NO_LONG_DOUBLE_MATH
+/* Signal that we do not really have a `long double'. The disables the
+ declaration of all the `long double' function variants. */
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
--- /dev/null
+/* Inline math functions for powerpc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#if defined __GNUC__ && !defined _SOFT_FLOAT
+
+#ifdef __USE_ISOC99
+# define __unordered_cmp(x, y) \
+ (__extension__ \
+ ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
+ unsigned __r; \
+ __asm__("fcmpu 7,%1,%2 ; mfcr %0" : "=r" (__r) : "f" (__x), "f"(__y) \
+ : "cr7"); \
+ __r; }))
+
+# define isgreater(x, y) (__unordered_cmp (x, y) >> 2 & 1)
+# define isgreaterequal(x, y) ((__unordered_cmp (x, y) & 6) != 0)
+# define isless(x, y) (__unordered_cmp (x, y) >> 3 & 1)
+# define islessequal(x, y) ((__unordered_cmp (x, y) & 0xA) != 0)
+# define islessgreater(x, y) ((__unordered_cmp (x, y) & 0xC) != 0)
+# define isunordered(x, y) (__unordered_cmp (x, y) & 1)
+#endif /* __USE_ISOC99 && !_SOFT_FLOAT */
+
+#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
+
+#ifdef __cplusplus
+# define __MATH_INLINE __inline
+#else
+# define __MATH_INLINE extern __inline
+#endif /* __cplusplus */
+
+#ifdef __USE_ISOC99
+__MATH_INLINE long int lrint (double __x);
+__MATH_INLINE long int
+lrint (double __x)
+{
+ union {
+ double __d;
+ long int __ll[2];
+ } __u;
+ __asm__ ("fctiw %0,%1" : "=f"(__u.__d) : "f"(__x));
+ return __u.__ll[1];
+}
+
+__MATH_INLINE long int lrintf (float __x);
+__MATH_INLINE long int
+lrintf (float __x)
+{
+ union {
+ double __d;
+ long int __ll[2];
+ } __u;
+ __asm__ ("fctiw %0,%1" : "=f"(__u.__d) : "f"(__x));
+ return __u.__ll[1];
+}
+
+__MATH_INLINE double fdim (double __x, double __y);
+__MATH_INLINE double
+fdim (double __x, double __y)
+{
+ return __x < __y ? 0 : __x - __y;
+}
+
+__MATH_INLINE float fdimf (float __x, float __y);
+__MATH_INLINE float
+fdimf (float __x, float __y)
+{
+ return __x < __y ? 0 : __x - __y;
+}
+
+#endif /* __USE_ISOC99 */
+#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
+#endif /* __GNUC__ && !_SOFT_FLOAT */
/* FIXME! This file describes properties of the compiler, not the machine;
it should not be part of libc! */
-#if defined __USE_ISOC9X && defined _MATH_H
+#if defined __USE_ISOC99 && defined _MATH_H
# ifdef __GNUC__
# if __STDC__ == 1
/* Number of decimal digits for the `double' type. */
# define DECIMAL_DIG 15
-#endif /* ISO C 9X */
+#endif /* ISO C99 */
#ifndef __NO_LONG_DOUBLE_MATH
#if defined __GNUC__
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
#if __WORDSIZE == 32
__r = qop; \
} \
__r; }))
-
+
# define isgreater(x, y) __unordered_v9cmp(x, y, "g", _Qp_cmp (&__x, &__y) == 2)
# define isgreaterequal(x, y) __unordered_v9cmp(x, y, "ge", (_Qp_cmp (&__x, &__y) & 1) == 0)
# define isless(x, y) __unordered_v9cmp(x, y, "l", _Qp_cmp (&__x, &__y) == 1)
#endif /* sparc64 */
-#endif /* __USE_ISOC9X */
+#endif /* __USE_ISOC99 */
#if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) && defined __OPTIMIZE__
#endif /* __LIBC_INTERNAL_MATH_INLINES */
#endif /* gcc 2.8+ */
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
__MATH_INLINE double fdim (double __x, double __y);
__MATH_INLINE double
return __x < __y ? 0 : __x - __y;
}
-#endif /* __USE_ISOC9X */
+#endif /* __USE_ISOC99 */
#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
#endif /* __GNUC__ */
#endif /* GCC. */
-/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
+/* ISO C99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
# if __GNUC_PREREQ(2,95)
# endif /* GCC 2.95. */
-#endif /* __USE_ISOC9X. */
+#endif /* __USE_ISOC99. */
extern double wcstod (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) __THROW;
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
/* Likewise for `float' and `long double' sizes of floating-point numbers. */
extern float wcstof (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) __THROW;
int __base) __THROW;
#endif /* GCC and use GNU. */
-#if defined __USE_ISOC9X || (defined __GNUC__ && defined __USE_GNU)
+#if defined __USE_ISOC99 || (defined __GNUC__ && defined __USE_GNU)
/* Convert initial portion of wide string NPTR to `long int'
representation. */
__extension__
extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base) __THROW;
-#endif /* ISO C 9X or GCC and GNU. */
+#endif /* ISO C99 or GCC and GNU. */
#ifdef __USE_GNU
/* The concept of one static locale per category is not very well
/* Wide character I/O functions. */
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
/* Select orientation for stream. */
extern int fwide (FILE *__fp, int __mode) __THROW;