mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 02:40:08 +00:00
Update.
1997-04-30 17:35 Ulrich Drepper <drepper@cygnus.com> * math/libm-test.c: Implement test for exceptions. Partly due to Andreas Jaeger. (csin_test): New function. * sysdeps/libm-i387/s_cexp.S: Raise correct exceptions. * sysdeps/libm-i387/s_cexpf.S: Likewise. * sysdeps/libm-i387/s_cexpl.S: Likewise. * sysdeps/libm-ieee754/s_ccos.c: Likewise. * sysdeps/libm-ieee754/s_ccosf.c: Likewise. * sysdeps/libm-ieee754/s_ccosl.c: Likewise. * sysdeps/libm-ieee754/s_ccosh.c: Likewise. * sysdeps/libm-ieee754/s_ccoshf.c: Likewise. * sysdeps/libm-ieee754/s_ccoshl.c: Likewise. * sysdeps/libm-ieee754/s_cexp.c: Likewise. * sysdeps/libm-ieee754/s_cexpf.c: Likewise. * sysdeps/libm-ieee754/s_cexpl.c: Likewise. * sysdeps/libm-ieee754/s_csinh.c: Likewise. * sysdeps/libm-ieee754/s_csinhf.c: Likewise. * sysdeps/libm-ieee754/s_csinhl.c: Likewise. * sysdeps/libm-ieee754/s_ctanh.c: Likewise. * sysdeps/libm-ieee754/s_ctanhf.c: Likewise. * sysdeps/libm-ieee754/s_ctanhl.c: Likewise. * sysdeps/libm-ieee754/s_ccosh.c: Correct computation. * sysdeps/libm-ieee754/s_ccoshf.c: Likewise. * sysdeps/libm-ieee754/s_ccoshl.c: Likewise. * sysdeps/libm-ieee754/s_csinh.c: Likewise. * sysdeps/libm-ieee754/s_csinhf.c: Likewise. * sysdeps/libm-ieee754/s_csinhl.c: Likewise. * sysdeps/libm-ieee754/s_csin.c: Rewrite. * sysdeps/libm-ieee754/s_csinf.c: Likewise. * sysdeps/libm-ieee754/s_csinl.c: Likewise. * stdlib/random_r.c (__srandom_r): Don't use seed 0. Use 1 in this case. * sysdeps/i386/dl-machine.h (elf_machine_load_address): Use notation for local label. * time/strftime.c (add): Respect `0' padding flag. Reported by Richard Stallman <rms@gnu.ai.mit.edu>. 1997-04-30 15:46 Ulrich Drepper <drepper@cygnus.com> * Makeconfig (start-installed-name): Define here, not in csu/Makefile. Use in +link macro. * csu/Makefile (distribute): Add abi-note.S and abi-tag.h. (start-installed-name): Don't define here. When ELF generate file named by start-installed-name from start.o and abi-note.o. * csu/abi-note.S: New file. * sysdeps/stub/abi-tag.h: New file. * sysdpes/unix/sysv/linux/abi-tag.h: New file. Patches by Roland McGrath <roland@gnu.ai.mit.edu>. 1997-04-30 01:32 Ulrich Drepper <drepper@cygnus.com> * manual/stdio.texi: Use @vtable where possible. Add TeX version of @multitable since texi2dvi cannot handle them correct in the moment. * po/de.po: Update. 1997-04-29 21:06 Ulrich Drepper <drepper@cygnus.com> * Makeconfig: Don't set cross-compiling based on $(BUILD_CC) != $(CC). * config.make.in: Set cross-compiling from configure result. * configure.in: Emit definition of `cross_compiling'. Patches by Marcus G. Daniels <marcus@cathcart.sysc.pdx.edu>. 1997-04-27 21:50 Philip Blundell <pjb27@cam.ac.uk> * sysdeps/unix/sysv/linux/net/route.h (struct in6_rtmsg): Use correct `int' sizes for struct members. 1997-04-29 19:14 Ulrich Drepper <drepper@cygnus.com> * sysdeps/libm-i387/e_powf.S Generate invalid exception correctly. * sysdeps/libm-i387/e_pow.S: Likewise. * sysdeps/libm-i387/e_powl.S: Likewise. 1997-04-23 10:08 Andreas Jaeger <aj@arthur.rhein-neckar.de> * math/fenv.h: Correct typos. 1997-04-28 10:04 Richard Henderson <rth@tamu.edu> * sysdeps/unix/sysv/linux/alpha/clone.S: Save the function argument in t0 rather than a4 to avoid it being clobbered. 1997-04-27 23:52 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/summary.awk: Recognize @defmumblex. * manual/signal.texi (Miscellaneous Signals): Use @deftypevrx for second description header. 1997-04-27 23:29 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/arith.texi (Floating-Point Classes): Don't indent text, makeinfo doesn't like that. 1997-04-27 20:52 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * malloc/obstack.h (obstack_specify_allocation_with_arg, obstack_chunkfun, obstack_freefun): Fix casts. 1997-04-27 18:21 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/xtract-typefun.awk: Allow names with only one character. 1997-04-26 14:16 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/netinet/ip_fw.h: Use <netinet/ip_icmp.h> not <netinet/icmp.h>. Reported by Michael Deutschmann <ldeutsch@mail.netshop.net>. 1997-04-25 12:31 Ulrich Drepper <drepper@cygnus.com> * csu/Makefile ($(objpfx)initfini.s): Add CPPFLAGS, CFLAGS and -g0 to command line of compiler. Patch by Marcus G. Daniels <marcus@sysc.pdx.edu>. * sysdeps/generic/sigset.h (__sigandset, __sigorset): Fix typos. Patch by Marcus G. Daniels <marcus@sysc.pdx.edu>. * signal/signal.h (_sys_siglist, sys_siglist): Use _NSIG, not NSIG in declaration. Patch by Michael Widenius <monty@tcx.se>. * time/strptime.c (strptime_internal): Fix %I format specifier being off by one. Patch by Mark Kettenis <kettenis@phys.uva.nl>. 1997-04-24 12:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * stdlib/lcong48_r.c: Include <limits.h>. * stdlib/seed48_r.c: Likewise. * stdio-common/printf_size.c (printf_size): Correct type of `units' and make robust against future changes. 1997-04-23 18:58 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/libm-ieee754/s_cproj.c: Use isfinite instead of finite. * sysdeps/libm-ieee754/s_cprojl.c: Likewise. * sysdeps/libm-ieee754/s_cprojf.c: Likewise. 1997-04-23 18:53 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/arith.texi, manual/math.texi: Use @defmumblex for additional description headers. * manual/xtract-typefun.awk: Recognize them. 1997-04-22 15:58 Andreas Jaeger <aj@arthur.rhein-neckar.de> * stdio-common/printf_size.c (printf_size): Correct size of array units.
This commit is contained in:
parent
a12ea214db
commit
779ae82ecd
161
ChangeLog
161
ChangeLog
@ -1,3 +1,164 @@
|
||||
1997-04-30 17:35 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* math/libm-test.c: Implement test for exceptions.
|
||||
Partly due to Andreas Jaeger.
|
||||
(csin_test): New function.
|
||||
* sysdeps/libm-i387/s_cexp.S: Raise correct exceptions.
|
||||
* sysdeps/libm-i387/s_cexpf.S: Likewise.
|
||||
* sysdeps/libm-i387/s_cexpl.S: Likewise.
|
||||
* sysdeps/libm-ieee754/s_ccos.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_ccosf.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_ccosl.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_ccosh.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_ccoshf.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_ccoshl.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_cexp.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_cexpf.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_cexpl.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_csinh.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_csinhf.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_csinhl.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_ctanh.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_ctanhf.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_ctanhl.c: Likewise.
|
||||
|
||||
* sysdeps/libm-ieee754/s_ccosh.c: Correct computation.
|
||||
* sysdeps/libm-ieee754/s_ccoshf.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_ccoshl.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_csinh.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_csinhf.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_csinhl.c: Likewise.
|
||||
|
||||
* sysdeps/libm-ieee754/s_csin.c: Rewrite.
|
||||
* sysdeps/libm-ieee754/s_csinf.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_csinl.c: Likewise.
|
||||
|
||||
* stdlib/random_r.c (__srandom_r): Don't use seed 0. Use 1 in this
|
||||
case.
|
||||
|
||||
* sysdeps/i386/dl-machine.h (elf_machine_load_address): Use notation
|
||||
for local label.
|
||||
|
||||
* time/strftime.c (add): Respect `0' padding flag.
|
||||
Reported by Richard Stallman <rms@gnu.ai.mit.edu>.
|
||||
|
||||
1997-04-30 15:46 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* Makeconfig (start-installed-name): Define here, not in csu/Makefile.
|
||||
Use in +link macro.
|
||||
* csu/Makefile (distribute): Add abi-note.S and abi-tag.h.
|
||||
(start-installed-name): Don't define here.
|
||||
When ELF generate file named by start-installed-name from start.o
|
||||
and abi-note.o.
|
||||
* csu/abi-note.S: New file.
|
||||
* sysdeps/stub/abi-tag.h: New file.
|
||||
* sysdpes/unix/sysv/linux/abi-tag.h: New file.
|
||||
Patches by Roland McGrath <roland@gnu.ai.mit.edu>.
|
||||
|
||||
1997-04-30 01:32 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* manual/stdio.texi: Use @vtable where possible.
|
||||
Add TeX version of @multitable since texi2dvi cannot handle them
|
||||
correct in the moment.
|
||||
|
||||
* po/de.po: Update.
|
||||
|
||||
1997-04-29 21:06 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* Makeconfig: Don't set cross-compiling based on $(BUILD_CC) != $(CC).
|
||||
* config.make.in: Set cross-compiling from configure result.
|
||||
* configure.in: Emit definition of `cross_compiling'.
|
||||
Patches by Marcus G. Daniels <marcus@cathcart.sysc.pdx.edu>.
|
||||
|
||||
1997-04-27 21:50 Philip Blundell <pjb27@cam.ac.uk>
|
||||
|
||||
* sysdeps/unix/sysv/linux/net/route.h (struct in6_rtmsg): Use
|
||||
correct `int' sizes for struct members.
|
||||
|
||||
1997-04-29 19:14 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* sysdeps/libm-i387/e_powf.S Generate invalid exception correctly.
|
||||
* sysdeps/libm-i387/e_pow.S: Likewise.
|
||||
* sysdeps/libm-i387/e_powl.S: Likewise.
|
||||
|
||||
1997-04-23 10:08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
|
||||
|
||||
* math/fenv.h: Correct typos.
|
||||
|
||||
1997-04-28 10:04 Richard Henderson <rth@tamu.edu>
|
||||
|
||||
* sysdeps/unix/sysv/linux/alpha/clone.S: Save the function argument
|
||||
in t0 rather than a4 to avoid it being clobbered.
|
||||
|
||||
1997-04-27 23:52 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
|
||||
* manual/summary.awk: Recognize @defmumblex.
|
||||
|
||||
* manual/signal.texi (Miscellaneous Signals): Use @deftypevrx for
|
||||
second description header.
|
||||
|
||||
1997-04-27 23:29 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
|
||||
* manual/arith.texi (Floating-Point Classes): Don't indent text,
|
||||
makeinfo doesn't like that.
|
||||
|
||||
1997-04-27 20:52 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
|
||||
* malloc/obstack.h (obstack_specify_allocation_with_arg,
|
||||
obstack_chunkfun, obstack_freefun): Fix casts.
|
||||
|
||||
1997-04-27 18:21 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
|
||||
* manual/xtract-typefun.awk: Allow names with only one character.
|
||||
|
||||
1997-04-26 14:16 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/netinet/ip_fw.h: Use <netinet/ip_icmp.h>
|
||||
not <netinet/icmp.h>.
|
||||
Reported by Michael Deutschmann <ldeutsch@mail.netshop.net>.
|
||||
|
||||
1997-04-25 12:31 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* csu/Makefile ($(objpfx)initfini.s): Add CPPFLAGS, CFLAGS and -g0
|
||||
to command line of compiler.
|
||||
Patch by Marcus G. Daniels <marcus@sysc.pdx.edu>.
|
||||
|
||||
* sysdeps/generic/sigset.h (__sigandset, __sigorset): Fix typos.
|
||||
Patch by Marcus G. Daniels <marcus@sysc.pdx.edu>.
|
||||
|
||||
* signal/signal.h (_sys_siglist, sys_siglist): Use _NSIG, not NSIG
|
||||
in declaration.
|
||||
Patch by Michael Widenius <monty@tcx.se>.
|
||||
|
||||
* time/strptime.c (strptime_internal): Fix %I format specifier
|
||||
being off by one.
|
||||
Patch by Mark Kettenis <kettenis@phys.uva.nl>.
|
||||
|
||||
1997-04-24 12:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
|
||||
* stdlib/lcong48_r.c: Include <limits.h>.
|
||||
* stdlib/seed48_r.c: Likewise.
|
||||
|
||||
* stdio-common/printf_size.c (printf_size): Correct type of
|
||||
`units' and make robust against future changes.
|
||||
|
||||
1997-04-23 18:58 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
|
||||
* sysdeps/libm-ieee754/s_cproj.c: Use isfinite instead of finite.
|
||||
* sysdeps/libm-ieee754/s_cprojl.c: Likewise.
|
||||
* sysdeps/libm-ieee754/s_cprojf.c: Likewise.
|
||||
|
||||
1997-04-23 18:53 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
|
||||
* manual/arith.texi, manual/math.texi: Use @defmumblex for
|
||||
additional description headers.
|
||||
* manual/xtract-typefun.awk: Recognize them.
|
||||
|
||||
1997-04-22 15:58 Andreas Jaeger <aj@arthur.rhein-neckar.de>
|
||||
|
||||
* stdio-common/printf_size.c (printf_size): Correct size of array
|
||||
units.
|
||||
|
||||
1997-04-21 07:50 H.J. Lu <hjl@gnu.ai.mit.edu>
|
||||
|
||||
* libgen.h: New file.
|
||||
|
@ -195,9 +195,9 @@ dist.tar: README $(tardir) $(+tsrcs)
|
||||
|
||||
$(tardir).tar: dist.tar subdir_dist
|
||||
@echo Files listed here have names exceeding 14 chars.
|
||||
tar xfv $< -C /tmp | sed -n '/[^/]\{15,\}/p'
|
||||
tar covf $@ -C /tmp $(tardir)
|
||||
-rm -fr /tmp/$(tardir) dist.tar &
|
||||
tar xfv $< -C $${TMPDIR-/tmp} | sed -n '/[^/]\{15,\}/p'
|
||||
tar covf $@ -C $${TMPDIR-/tmp} $(tardir)
|
||||
-rm -fr $${TMPDIR-/tmp}/$(tardir) dist.tar &
|
||||
|
||||
%.Z: %
|
||||
compress -c $< > $@
|
||||
|
27
Makeconfig
27
Makeconfig
@ -318,13 +318,28 @@ ifndef asm-CPPFLAGS
|
||||
asm-CPPFLAGS =
|
||||
endif
|
||||
|
||||
# Installed name of the startup code.
|
||||
ifneq ($(elf),yes)
|
||||
# When not using ELF, there is just one startfile, called crt0.o.
|
||||
start-installed-name = crt0.o
|
||||
else
|
||||
# In the ELF universe, crt0.o is called crt1.o, and there are
|
||||
# some additional bizarre files.
|
||||
start-installed-name = crt1.o
|
||||
have-initfini = yes
|
||||
endif
|
||||
|
||||
|
||||
# Command for linking programs with the C library.
|
||||
ifndef +link
|
||||
+link = $(CC) -nostdlib -nostartfiles -o $@ \
|
||||
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) \
|
||||
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+prector) \
|
||||
$(filter-out $(addprefix $(csu-objpfx),start.o) $(+preinit) \
|
||||
$(link-extra-libs) $(common-objpfx)libc% $(+postinit),$^) \
|
||||
$(addprefix $(csu-objpfx),$(start-installed-name)) \
|
||||
$(+preinit) $(+prector) \
|
||||
$(filter-out $(addprefix $(csu-objpfx),start.o \
|
||||
$(start-installed-name))\
|
||||
$(+preinit) $(link-extra-libs) \
|
||||
$(common-objpfx)libc% $(+postinit),$^) \
|
||||
$(link-extra-libs) $(link-libc) $(+postctor) $(+postinit)
|
||||
endif
|
||||
ifndef config-LDFLAGS
|
||||
@ -536,12 +551,6 @@ endif
|
||||
ifndef BUILD_CC
|
||||
BUILD_CC = $(CC)
|
||||
endif
|
||||
|
||||
ifneq ($(BUILD_CC),$(CC))
|
||||
cross-compiling := yes
|
||||
else
|
||||
cross-compiling := no
|
||||
endif
|
||||
|
||||
# Figure out the version numbers from version.h.
|
||||
|
||||
|
@ -42,6 +42,7 @@ build-omitfp = @omitfp@
|
||||
build-bounded = @bounded@
|
||||
stdio = @stdio@
|
||||
add-ons = @subdirs@
|
||||
cross-compiling = @cross_compiling@
|
||||
|
||||
# Build tools.
|
||||
CC = @CC@
|
||||
|
80
configure
vendored
80
configure
vendored
@ -1345,8 +1345,9 @@ test -n "$BUILD_CC" && break
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||
echo "configure:1350: checking how to run the C preprocessor" >&5
|
||||
echo "configure:1351: checking how to run the C preprocessor" >&5
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
@ -1361,13 +1362,13 @@ else
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1365 "configure"
|
||||
#line 1366 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
@ -1378,13 +1379,13 @@ else
|
||||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1382 "configure"
|
||||
#line 1383 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
@ -1415,7 +1416,7 @@ fi
|
||||
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ar; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1419: checking for $ac_word" >&5
|
||||
echo "configure:1420: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1446,7 +1447,7 @@ fi
|
||||
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1450: checking for $ac_word" >&5
|
||||
echo "configure:1451: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1477,7 +1478,7 @@ if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||
set dummy ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1481: checking for $ac_word" >&5
|
||||
echo "configure:1482: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1512,7 +1513,7 @@ fi
|
||||
# Extract the first word of "bash", so it can be a program name with args.
|
||||
set dummy bash; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1516: checking for $ac_word" >&5
|
||||
echo "configure:1517: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1553,7 +1554,7 @@ if test "$BASH" = no; then
|
||||
# Extract the first word of "ksh", so it can be a program name with args.
|
||||
set dummy ksh; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1557: checking for $ac_word" >&5
|
||||
echo "configure:1558: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1595,7 +1596,7 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6
|
||||
echo "configure:1599: checking for signed size_t type" >&5
|
||||
echo "configure:1600: checking for signed size_t type" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1619,12 +1620,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6
|
||||
echo "configure:1623: checking for libc-friendly stddef.h" >&5
|
||||
echo "configure:1624: checking for libc-friendly stddef.h" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1628 "configure"
|
||||
#line 1629 "configure"
|
||||
#include "confdefs.h"
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
@ -1639,7 +1640,7 @@ size_t size; wchar_t wchar;
|
||||
if (&size == NULL || &wchar == NULL) abort ();
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
libc_cv_friendly_stddef=yes
|
||||
else
|
||||
@ -1658,7 +1659,7 @@ override stddef.h = # The installed <stddef.h> seems to be libc-friendly."
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6
|
||||
echo "configure:1662: checking whether we need to use -P to assemble .S files" >&5
|
||||
echo "configure:1663: checking whether we need to use -P to assemble .S files" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1681,7 +1682,7 @@ asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6
|
||||
echo "configure:1685: checking for assembler global-symbol directive" >&5
|
||||
echo "configure:1686: checking for assembler global-symbol directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1711,7 +1712,7 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6
|
||||
echo "configure:1715: checking for .set assembler directive" >&5
|
||||
echo "configure:1716: checking for .set assembler directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1745,7 +1746,7 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for .symver assembler directive""... $ac_c" 1>&6
|
||||
echo "configure:1749: checking for .symver assembler directive" >&5
|
||||
echo "configure:1750: checking for .symver assembler directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_symver_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1764,7 +1765,7 @@ fi
|
||||
|
||||
echo "$ac_t""$libc_cv_asm_symver_directive" 1>&6
|
||||
echo $ac_n "checking for ld --version-script""... $ac_c" 1>&6
|
||||
echo "configure:1768: checking for ld --version-script" >&5
|
||||
echo "configure:1769: checking for ld --version-script" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_ld_version_script_option'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1781,7 +1782,7 @@ VERS {
|
||||
EOF
|
||||
if ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.s 1>&5 2>&5; then
|
||||
if { ac_try='${CC-cc} $CFLAGS --shared -o conftest.so conftest.o
|
||||
-Wl,--version-script,conftest.map'; { (eval echo configure:1785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
|
||||
-Wl,--version-script,conftest.map'; { (eval echo configure:1786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
|
||||
then
|
||||
libc_cv_ld_version_script_option=yes
|
||||
else
|
||||
@ -1811,7 +1812,7 @@ fi
|
||||
|
||||
if test $elf = yes; then
|
||||
echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6
|
||||
echo "configure:1815: checking for .previous assembler directive" >&5
|
||||
echo "configure:1816: checking for .previous assembler directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_previous_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1819,7 +1820,7 @@ else
|
||||
.section foo_section
|
||||
.previous
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_asm_previous_directive=yes
|
||||
else
|
||||
libc_cv_asm_previous_directive=no
|
||||
@ -1835,7 +1836,7 @@ EOF
|
||||
|
||||
else
|
||||
echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6
|
||||
echo "configure:1839: checking for .popsection assembler directive" >&5
|
||||
echo "configure:1840: checking for .popsection assembler directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_popsection_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1843,7 +1844,7 @@ else
|
||||
.pushsection foo_section
|
||||
.popsection
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_asm_popsection_directive=yes
|
||||
else
|
||||
libc_cv_asm_popsection_directive=no
|
||||
@ -1863,12 +1864,12 @@ fi
|
||||
|
||||
if test $elf != yes; then
|
||||
echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
|
||||
echo "configure:1867: checking for .init and .fini sections" >&5
|
||||
echo "configure:1868: checking for .init and .fini sections" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1872 "configure"
|
||||
#line 1873 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
@ -1877,7 +1878,7 @@ asm (".section .init");
|
||||
asm (".text");
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
libc_cv_have_initfini=yes
|
||||
else
|
||||
@ -1902,19 +1903,19 @@ if test $elf = yes; then
|
||||
libc_cv_asm_underscores=no
|
||||
else
|
||||
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
|
||||
echo "configure:1906: checking for _ prefix on C symbol names" >&5
|
||||
echo "configure:1907: checking for _ prefix on C symbol names" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1911 "configure"
|
||||
#line 1912 "configure"
|
||||
#include "confdefs.h"
|
||||
asm ("_glibc_foobar:");
|
||||
int main() {
|
||||
glibc_foobar ();
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
libc_cv_asm_underscores=yes
|
||||
else
|
||||
@ -1941,7 +1942,7 @@ if test $elf = yes; then
|
||||
libc_cv_asm_weakext_directive=no
|
||||
else
|
||||
echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6
|
||||
echo "configure:1945: checking for assembler .weak directive" >&5
|
||||
echo "configure:1946: checking for assembler .weak directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1964,7 +1965,7 @@ echo "$ac_t""$libc_cv_asm_weak_directive" 1>&6
|
||||
|
||||
if test $libc_cv_asm_weak_directive = no; then
|
||||
echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6
|
||||
echo "configure:1968: checking for assembler .weakext directive" >&5
|
||||
echo "configure:1969: checking for assembler .weakext directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -2001,7 +2002,7 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
|
||||
echo "configure:2005: checking for ld --no-whole-archive" >&5
|
||||
echo "configure:2006: checking for ld --no-whole-archive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -2012,7 +2013,7 @@ __throw () {}
|
||||
EOF
|
||||
if { ac_try='${CC-cc} $CFLAGS
|
||||
-nostdlib -nostartfiles -Wl,--no-whole-archive
|
||||
-o conftest conftest.c'; { (eval echo configure:2016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
-o conftest conftest.c'; { (eval echo configure:2017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_ld_no_whole_archive=yes
|
||||
else
|
||||
libc_cv_ld_no_whole_archive=no
|
||||
@ -2023,7 +2024,7 @@ fi
|
||||
echo "$ac_t""$libc_cv_ld_no_whole_archive" 1>&6
|
||||
|
||||
echo $ac_n "checking for gcc -fno-exceptions""... $ac_c" 1>&6
|
||||
echo "configure:2027: checking for gcc -fno-exceptions" >&5
|
||||
echo "configure:2028: checking for gcc -fno-exceptions" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_gcc_no_exceptions'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -2034,7 +2035,7 @@ __throw () {}
|
||||
EOF
|
||||
if { ac_try='${CC-cc} $CFLAGS
|
||||
-nostdlib -nostartfiles -fno-exceptions
|
||||
-o conftest conftest.c'; { (eval echo configure:2038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
-o conftest conftest.c'; { (eval echo configure:2039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_gcc_no_exceptions=yes
|
||||
else
|
||||
libc_cv_gcc_no_exceptions=no
|
||||
@ -2086,7 +2087,7 @@ if test "$uname" = generic; then
|
||||
fi
|
||||
|
||||
echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
|
||||
echo "configure:2090: checking OS release for uname" >&5
|
||||
echo "configure:2091: checking OS release for uname" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -2108,7 +2109,7 @@ echo "$ac_t""$libc_cv_uname_release" 1>&6
|
||||
uname_release="$libc_cv_uname_release"
|
||||
|
||||
echo $ac_n "checking OS version for uname""... $ac_c" 1>&6
|
||||
echo "configure:2112: checking OS version for uname" >&5
|
||||
echo "configure:2113: checking OS version for uname" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -2130,7 +2131,7 @@ else
|
||||
fi
|
||||
|
||||
echo $ac_n "checking stdio selection""... $ac_c" 1>&6
|
||||
echo "configure:2134: checking stdio selection" >&5
|
||||
echo "configure:2135: checking stdio selection" >&5
|
||||
|
||||
case $stdio in
|
||||
libio) cat >> confdefs.h <<\EOF
|
||||
@ -2342,6 +2343,7 @@ s%@build_cpu@%$build_cpu%g
|
||||
s%@build_vendor@%$build_vendor%g
|
||||
s%@build_os@%$build_os%g
|
||||
s%@BUILD_CC@%$BUILD_CC%g
|
||||
s%@cross_compiling@%$cross_compiling%g
|
||||
s%@CPP@%$CPP%g
|
||||
s%@AR@%$AR%g
|
||||
s%@RANLIB@%$RANLIB%g
|
||||
|
@ -366,6 +366,7 @@ AC_CANONICAL_BUILD
|
||||
if test $host != $build; then
|
||||
AC_CHECK_PROGS(BUILD_CC, gcc cc)
|
||||
fi
|
||||
AC_SUBST(cross_compiling)
|
||||
AC_PROG_CPP
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
|
36
csu/Makefile
36
csu/Makefile
@ -36,25 +36,12 @@ omit-deps = $(patsubst %.o,%,$(start-installed-name) g$(start-installed-name) \
|
||||
$(csu-dummies))
|
||||
install-lib = $(start-installed-name) g$(start-installed-name) \
|
||||
$(csu-dummies)
|
||||
distribute = initfini.c gmon-start.c start.c defs.awk
|
||||
distribute = initfini.c gmon-start.c start.c defs.awk abi-note.S abi-tag.h
|
||||
|
||||
all: # Make this the default target; it will be defined in Rules.
|
||||
|
||||
include ../Makeconfig
|
||||
|
||||
ifneq ($(elf),yes)
|
||||
|
||||
# When not using ELF, there is just one startfile, called crt0.o.
|
||||
start-installed-name = crt0.o
|
||||
|
||||
else
|
||||
|
||||
# In the ELF universe, crt0.o is called crt1.o, and there are
|
||||
# some additional bizarre files.
|
||||
start-installed-name = crt1.o
|
||||
have-initfini = yes
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(have-initfini),yes)
|
||||
|
||||
@ -75,7 +62,8 @@ $(objpfx)crt%.o: $(objpfx)crt%.S $(objpfx)defs.h
|
||||
$(CC) -c -fPIC -g0 -I$(..) -I$(common-objpfx) -DASSEMBLER $< -o $@
|
||||
|
||||
$(objpfx)initfini.s: initfini.c
|
||||
$(CC) -S -fPIC -finhibit-size-directive $(no-exceptions) $< -o $@
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -g0 -S -fPIC -finhibit-size-directive \
|
||||
$(no-exceptions) $< -o $@
|
||||
|
||||
$(objpfx)crti.S: $(objpfx)initfini.s
|
||||
sed -n -e '1,/@HEADER_ENDS/p' \
|
||||
@ -95,19 +83,31 @@ endif
|
||||
|
||||
include ../Rules
|
||||
|
||||
define link-relocatable
|
||||
$(CC) -nostdlib -nostartfiles -r -o $@ $^
|
||||
endef
|
||||
|
||||
ifndef start-installed-name-rule
|
||||
ifeq (yes,$(elf))
|
||||
# We link the ELF startfile along with a SHT_NOTE section indicating
|
||||
# the the kernel ABI the binaries linked with this library will require.
|
||||
$(objpfx)$(start-installed-name): $(objpfx)start.o $(objpfx)abi-note.o
|
||||
$(link-relocatable)
|
||||
else
|
||||
# The startfile is installed under different names, so we just call our
|
||||
# source file `start.c' and copy to the installed name after compiling.
|
||||
$(objpfx)$(start-installed-name): $(objpfx)start.o
|
||||
-rm -f $@
|
||||
rm -f $@
|
||||
ln $< $@
|
||||
endif
|
||||
endif
|
||||
|
||||
# The profiling startfile is made by linking together the normal
|
||||
# startfile with gmon-start.o, which defines a constructor function
|
||||
# to turn on profiling code at startup.
|
||||
$(objpfx)g$(start-installed-name): $(objpfx)start.o $(objpfx)gmon-start.o
|
||||
$(CC) -nostdlib -nostartfiles -r -o $@ $^
|
||||
$(objpfx)g$(start-installed-name): $(objpfx)$(start-installed-name) \
|
||||
$(objpfx)gmon-start.o
|
||||
$(link-relocatable)
|
||||
|
||||
# These extra files are sometimes expected by system standard linking
|
||||
# procedures, but we have nothing for them to do. So compile empty files.
|
||||
|
69
csu/abi-note.S
Normal file
69
csu/abi-note.S
Normal file
@ -0,0 +1,69 @@
|
||||
/* Special .init and .fini section support.
|
||||
Copyright (C) 1997 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.
|
||||
|
||||
In addition to the permissions in the GNU Library General Public
|
||||
License, the Free Software Foundation gives you unlimited
|
||||
permission to link the compiled version of this file with other
|
||||
programs, and to distribute those programs without any restriction
|
||||
coming from the use of this file. (The Library General Public
|
||||
License restrictions do apply in other respects; for example, they
|
||||
cover modification of the file, and distribution when not linked
|
||||
into another program.)
|
||||
|
||||
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, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
/* The basic layout of note sections is specified by the ELF format. */
|
||||
|
||||
#define ELF_NOTE_BEGIN(sectname, sectflags, type, name) \
|
||||
.section sectname, sectflags; \
|
||||
.align ALIGNARG(2); /* Notes are 4-byte aligned. */ \
|
||||
.long 1f - 0f; /* 32-bit word: length of name field */ \
|
||||
.long 3f - 2f; /* 32-bit word: length of desc field */ \
|
||||
.long (type); /* 32-bit word: vendor-defined type field */ \
|
||||
0: .asciz name; /* null-terminated string, any length: name */\
|
||||
1: .align ALIGNARG(2); /* Name data padded to 4-byte alignment. */ \
|
||||
2: /* Here follows the "note descriptor" data, whose format \
|
||||
is not specified by ELF. The vendor name and type field \
|
||||
indicate what sort of data is found here. */
|
||||
|
||||
#define ELF_NOTE_END \
|
||||
3: .align ALIGNARG(2) /* Pad to 4-byte align the next note. */
|
||||
|
||||
|
||||
/* The linker (GNU ld 2.8 and later) recognize an allocated section whose
|
||||
name begins with `.note' and creates a PT_NOTE program header entry
|
||||
pointing at it.
|
||||
|
||||
Such a program header is the canonical way (at least in the free OS
|
||||
community) to identify the OS environment ABI that the executable was
|
||||
created for. The ELF note information identifies a particular OS or
|
||||
coordinated development effort within which the ELF header's e_machine
|
||||
value plus (for dynamically linked programs) the PT_INTERP dynamic
|
||||
linker name and DT_NEEDED shared library names fully identify the
|
||||
runtime environment required by an executable.
|
||||
|
||||
The GNU project and cooperating development efforts (including the Linux
|
||||
community) use a vendor name string of "GNU", and a note type field with
|
||||
value 1 for a note descriptor that indicates ABI requirements. */
|
||||
|
||||
#include <abi-tag.h> /* OS-specific ABI tag value */
|
||||
|
||||
ELF_NOTE_BEGIN(".note.ABI-tag", "a", 1, "GNU")
|
||||
.long ABI_TAG
|
||||
ELF_NOTE_END
|
@ -307,13 +307,14 @@ extern int obstack_exit_failure;
|
||||
|
||||
#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
|
||||
_obstack_begin_1 ((h), (size), (alignment), \
|
||||
(void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun), (arg))
|
||||
(void *(*) (void *, long)) (chunkfun), \
|
||||
(void (*) (void *, void *)) (freefun), (arg))
|
||||
|
||||
#define obstack_chunkfun(h, newchunkfun) \
|
||||
((h) -> chunkfun = (struct _obstack_chunk *(*)(long)) (newchunkfun))
|
||||
((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
|
||||
|
||||
#define obstack_freefun(h, newfreefun) \
|
||||
((h) -> freefun = (void (*)(void *)) (newfreefun))
|
||||
((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
|
||||
|
||||
#else
|
||||
|
||||
|
@ -149,10 +149,8 @@ functions, and thus are available if you define @code{_BSD_SOURCE} or
|
||||
@comment math.h
|
||||
@comment BSD
|
||||
@deftypefun int isinf (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun int isinff (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun int isinfl (long double @var{x})
|
||||
@deftypefunx int isinff (float @var{x})
|
||||
@deftypefunx int isinfl (long double @var{x})
|
||||
This function returns @code{-1} if @var{x} represents negative infinity,
|
||||
@code{1} if @var{x} represents positive infinity, and @code{0} otherwise.
|
||||
@end deftypefun
|
||||
@ -160,10 +158,8 @@ This function returns @code{-1} if @var{x} represents negative infinity,
|
||||
@comment math.h
|
||||
@comment BSD
|
||||
@deftypefun int isnan (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun int isnanf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun int isnanl (long double @var{x})
|
||||
@deftypefunx int isnanf (float @var{x})
|
||||
@deftypefunx int isnanl (long double @var{x})
|
||||
This function returns a nonzero value if @var{x} is a ``not a number''
|
||||
value, and zero otherwise. (You can just as well use @code{@var{x} !=
|
||||
@var{x}} to get the same result).
|
||||
@ -172,10 +168,8 @@ value, and zero otherwise. (You can just as well use @code{@var{x} !=
|
||||
@comment math.h
|
||||
@comment BSD
|
||||
@deftypefun int finite (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun int finitef (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun int finitel (long double @var{x})
|
||||
@deftypefunx int finitef (float @var{x})
|
||||
@deftypefunx int finitel (long double @var{x})
|
||||
This function returns a nonzero value if @var{x} is finite or a ``not a
|
||||
number'' value, and zero otherwise.
|
||||
@end deftypefun
|
||||
@ -213,21 +207,21 @@ which returns a value of type @code{int}. The possible values are:
|
||||
|
||||
@vtable @code
|
||||
@item FP_NAN
|
||||
The floating-point number @var{x} is ``Not a Number'' (@pxref{Not a Number})
|
||||
The floating-point number @var{x} is ``Not a Number'' (@pxref{Not a Number})
|
||||
@item FP_INFINITE
|
||||
The value of @var{x} is either plus or minus infinity (@pxref{Infinity})
|
||||
The value of @var{x} is either plus or minus infinity (@pxref{Infinity})
|
||||
@item FP_ZERO
|
||||
The value of @var{x} is zero. In floating-point formats like @w{IEEE
|
||||
754} where the zero value can be signed this value is also returned if
|
||||
@var{x} is minus zero.
|
||||
The value of @var{x} is zero. In floating-point formats like @w{IEEE
|
||||
754} where the zero value can be signed this value is also returned if
|
||||
@var{x} is minus zero.
|
||||
@item FP_SUBNORMAL
|
||||
Some floating-point formats (such as @w{IEEE 754}) allow floating-point
|
||||
numbers to be represented in a denormalized format. This happens if the
|
||||
absolute value of the number is too small to be represented in the
|
||||
normal format. @code{FP_SUBNORMAL} is returned for such values of @var{x}.
|
||||
Some floating-point formats (such as @w{IEEE 754}) allow floating-point
|
||||
numbers to be represented in a denormalized format. This happens if the
|
||||
absolute value of the number is too small to be represented in the
|
||||
normal format. @code{FP_SUBNORMAL} is returned for such values of @var{x}.
|
||||
@item FP_NORMAL
|
||||
This value is returned for all other cases which means the number is a
|
||||
plain floating-point number without special meaning.
|
||||
This value is returned for all other cases which means the number is a
|
||||
plain floating-point number without special meaning.
|
||||
@end vtable
|
||||
|
||||
This macro is useful if more than property of a number must be
|
||||
@ -319,20 +313,16 @@ functions.
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun double creal (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun float crealf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} creall (complex long double @var{z})
|
||||
@deftypefunx float crealf (complex float @var{z})
|
||||
@deftypefunx {long double} creall (complex long double @var{z})
|
||||
These functions return the real part of the complex number @var{z}.
|
||||
@end deftypefun
|
||||
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun double cimag (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun float cimagf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} cimagl (complex long double @var{z})
|
||||
@deftypefunx float cimagf (complex float @var{z})
|
||||
@deftypefunx {long double} cimagl (complex long double @var{z})
|
||||
These functions return the imaginary part of the complex number @var{z}.
|
||||
@end deftypefun
|
||||
|
||||
@ -343,10 +333,8 @@ for the real part but the complex part is negated.
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} conj (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} conjf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} conjl (complex long double @var{z})
|
||||
@deftypefunx {complex float} conjf (complex float @var{z})
|
||||
@deftypefunx {complex long double} conjl (complex long double @var{z})
|
||||
These functions return the conjugate complex value of the complex number
|
||||
@var{z}.
|
||||
@end deftypefun
|
||||
@ -354,10 +342,8 @@ These functions return the conjugate complex value of the complex number
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun double carg (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun float cargf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} cargl (complex long double @var{z})
|
||||
@deftypefunx float cargf (complex float @var{z})
|
||||
@deftypefunx {long double} cargl (complex long double @var{z})
|
||||
These functions return argument of the complex number @var{z}.
|
||||
|
||||
Mathematically, the argument is the phase angle of @var{z} with a branch
|
||||
@ -367,10 +353,8 @@ cut along the negative real axis.
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} cproj (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} cprojf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} cprojl (complex long double @var{z})
|
||||
@deftypefunx {complex float} cprojf (complex float @var{z})
|
||||
@deftypefunx {complex long double} cprojl (complex long double @var{z})
|
||||
Return the projection of the complex value @var{z} on the Riemann
|
||||
sphere. Values with a infinite complex part (even if the real part
|
||||
is NaN) are projected to positive infinte on the real axis. If the real part is infinite, the result is equivalent to
|
||||
@ -418,10 +402,8 @@ are of type @code{long int} rather than @code{int}.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double fabs (double @var{number})
|
||||
@end deftypefun
|
||||
@deftypefun float fabsf (float @var{number})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} fabsl (long double @var{number})
|
||||
@deftypefunx float fabsf (float @var{number})
|
||||
@deftypefunx {long double} fabsl (long double @var{number})
|
||||
This function returns the absolute value of the floating-point number
|
||||
@var{number}.
|
||||
@end deftypefun
|
||||
@ -429,10 +411,8 @@ This function returns the absolute value of the floating-point number
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun double cabs (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun float cabsf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} cabsl (complex long double @var{z})
|
||||
@deftypefunx float cabsf (complex float @var{z})
|
||||
@deftypefunx {long double} cabsl (complex long double @var{z})
|
||||
These functions return the absolute value of the complex number @var{z}.
|
||||
The compiler must support complex numbers to use these functions. (See
|
||||
also the function @code{hypot} in @ref{Exponents and Logarithms}.) The
|
||||
@ -461,10 +441,8 @@ All these functions are declared in @file{math.h}.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double frexp (double @var{value}, int *@var{exponent})
|
||||
@end deftypefun
|
||||
@deftypefun float frexpf (float @var{value}, int *@var{exponent})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} frexpl (long double @var{value}, int *@var{exponent})
|
||||
@deftypefunx float frexpf (float @var{value}, int *@var{exponent})
|
||||
@deftypefunx {long double} frexpl (long double @var{value}, int *@var{exponent})
|
||||
These functions are used to split the number @var{value}
|
||||
into a normalized fraction and an exponent.
|
||||
|
||||
@ -484,10 +462,8 @@ zero is stored in @code{*@var{exponent}}.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double ldexp (double @var{value}, int @var{exponent})
|
||||
@end deftypefun
|
||||
@deftypefun float ldexpf (float @var{value}, int @var{exponent})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} ldexpl (long double @var{value}, int @var{exponent})
|
||||
@deftypefunx float ldexpf (float @var{value}, int @var{exponent})
|
||||
@deftypefunx {long double} ldexpl (long double @var{value}, int @var{exponent})
|
||||
These functions return the result of multiplying the floating-point
|
||||
number @var{value} by 2 raised to the power @var{exponent}. (It can
|
||||
be used to reassemble floating-point numbers that were taken apart
|
||||
@ -502,20 +478,16 @@ equivalent to those of @code{ldexp} and @code{frexp}:
|
||||
@comment math.h
|
||||
@comment BSD
|
||||
@deftypefun double scalb (double @var{value}, int @var{exponent})
|
||||
@end deftypefun
|
||||
@deftypefun float scalbf (float @var{value}, int @var{exponent})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} scalbl (long double @var{value}, int @var{exponent})
|
||||
@deftypefunx float scalbf (float @var{value}, int @var{exponent})
|
||||
@deftypefunx {long double} scalbl (long double @var{value}, int @var{exponent})
|
||||
The @code{scalb} function is the BSD name for @code{ldexp}.
|
||||
@end deftypefun
|
||||
|
||||
@comment math.h
|
||||
@comment BSD
|
||||
@deftypefun double logb (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float logbf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} logbl (long double @var{x})
|
||||
@deftypefunx float logbf (float @var{x})
|
||||
@deftypefunx {long double} logbl (long double @var{x})
|
||||
These BSD functions return the integer part of the base-2 logarithm of
|
||||
@var{x}, an integer value represented in type @code{double}. This is
|
||||
the highest integer power of @code{2} contained in @var{x}. The sign of
|
||||
@ -536,10 +508,8 @@ The value returned by @code{logb} is one less than the value that
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double copysign (double @var{value}, double @var{sign})
|
||||
@end deftypefun
|
||||
@deftypefun float copysignf (float @var{value}, float @var{sign})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} copysignl (long double @var{value}, long double @var{sign})
|
||||
@deftypefunx float copysignf (float @var{value}, float @var{sign})
|
||||
@deftypefunx {long double} copysignl (long double @var{value}, long double @var{sign})
|
||||
These functions return a value whose absolute value is the
|
||||
same as that of @var{value}, and whose sign matches that of @var{sign}.
|
||||
This function appears in BSD and was standardized in @w{ISO C 9X}.
|
||||
@ -580,10 +550,8 @@ result as a @code{double} instead to get around this problem.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double ceil (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float ceilf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} ceill (long double @var{x})
|
||||
@deftypefunx float ceilf (float @var{x})
|
||||
@deftypefunx {long double} ceill (long double @var{x})
|
||||
These functions round @var{x} upwards to the nearest integer,
|
||||
returning that value as a @code{double}. Thus, @code{ceil (1.5)}
|
||||
is @code{2.0}.
|
||||
@ -592,10 +560,8 @@ is @code{2.0}.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double floor (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float floorf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} floorl (long double @var{x})
|
||||
@deftypefunx float floorf (float @var{x})
|
||||
@deftypefunx {long double} floorl (long double @var{x})
|
||||
These functions round @var{x} downwards to the nearest
|
||||
integer, returning that value as a @code{double}. Thus, @code{floor
|
||||
(1.5)} is @code{1.0} and @code{floor (-1.5)} is @code{-2.0}.
|
||||
@ -604,10 +570,8 @@ integer, returning that value as a @code{double}. Thus, @code{floor
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double rint (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float rintf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} rintl (long double @var{x})
|
||||
@deftypefunx float rintf (float @var{x})
|
||||
@deftypefunx {long double} rintl (long double @var{x})
|
||||
These functions round @var{x} to an integer value according to the
|
||||
current rounding mode. @xref{Floating Point Parameters}, for
|
||||
information about the various rounding modes. The default
|
||||
@ -619,10 +583,8 @@ you explicit select another.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double nearbyint (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float nearbyintf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} nearbyintl (long double @var{x})
|
||||
@deftypefunx float nearbyintf (float @var{x})
|
||||
@deftypefunx {long double} nearbyintl (long double @var{x})
|
||||
These functions return the same value as the @code{rint} functions but
|
||||
even some rounding actually takes place @code{nearbyint} does @emph{not}
|
||||
raise the inexact exception.
|
||||
@ -631,10 +593,8 @@ raise the inexact exception.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double modf (double @var{value}, double *@var{integer-part})
|
||||
@end deftypefun
|
||||
@deftypefun float modff (flaot @var{value}, float *@var{integer-part})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} modfl (long double @var{value}, long double *@var{integer-part})
|
||||
@deftypefunx float modff (flaot @var{value}, float *@var{integer-part})
|
||||
@deftypefunx {long double} modfl (long double @var{value}, long double *@var{integer-part})
|
||||
These functions break the argument @var{value} into an integer part and a
|
||||
fractional part (between @code{-1} and @code{1}, exclusive). Their sum
|
||||
equals @var{value}. Each of the parts has the same sign as @var{value},
|
||||
@ -648,10 +608,8 @@ returns @code{0.5} and stores @code{2.0} into @code{intpart}.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double fmod (double @var{numerator}, double @var{denominator})
|
||||
@end deftypefun
|
||||
@deftypefun float fmodf (float @var{numerator}, float @var{denominator})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} fmodl (long double @var{numerator}, long double @var{denominator})
|
||||
@deftypefunx float fmodf (float @var{numerator}, float @var{denominator})
|
||||
@deftypefunx {long double} fmodl (long double @var{numerator}, long double @var{denominator})
|
||||
These functions compute the remainder from the division of
|
||||
@var{numerator} by @var{denominator}. Specifically, the return value is
|
||||
@code{@var{numerator} - @w{@var{n} * @var{denominator}}}, where @var{n}
|
||||
@ -669,10 +627,8 @@ If @var{denominator} is zero, @code{fmod} fails and sets @code{errno} to
|
||||
@comment math.h
|
||||
@comment BSD
|
||||
@deftypefun double drem (double @var{numerator}, double @var{denominator})
|
||||
@end deftypefun
|
||||
@deftypefun float dremf (float @var{numerator}, float @var{denominator})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} dreml (long double @var{numerator}, long double @var{denominator})
|
||||
@deftypefunx float dremf (float @var{numerator}, float @var{denominator})
|
||||
@deftypefunx {long double} dreml (long double @var{numerator}, long double @var{denominator})
|
||||
These functions are like @code{fmod} etc except that it rounds the
|
||||
internal quotient @var{n} to the nearest integer instead of towards zero
|
||||
to an integer. For example, @code{drem (6.5, 2.3)} returns @code{-0.4},
|
||||
|
@ -3,12 +3,15 @@
|
||||
@setfilename libc.info
|
||||
@settitle The GNU C Library
|
||||
@setchapternewpage odd
|
||||
@comment %**end of header (This is for running Texinfo on a region.)
|
||||
|
||||
@c This tells texinfo.tex to use the real section titles in xrefs in
|
||||
@c place of the node name, when no section title is explicitly given.
|
||||
@set xref-automatic-section-title
|
||||
@smallbook
|
||||
@c @smallbook
|
||||
@iftex
|
||||
@afourpaper
|
||||
@end iftex
|
||||
@comment %**end of header (This is for running Texinfo on a region.)
|
||||
|
||||
@c sold 0.06/1.09, print run out 21may96
|
||||
@set EDITION 0.07 DRAFT
|
||||
|
328
manual/math.texi
328
manual/math.texi
@ -146,10 +146,8 @@ You can also compute the value of pi with the expression @code{acos
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double sin (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float sinf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} sinl (long double @var{x})
|
||||
@deftypefunx float sinf (float @var{x})
|
||||
@deftypefunx {long double} sinl (long double @var{x})
|
||||
These functions return the sine of @var{x}, where @var{x} is given in
|
||||
radians. The return value is in the range @code{-1} to @code{1}.
|
||||
@end deftypefun
|
||||
@ -157,10 +155,8 @@ radians. The return value is in the range @code{-1} to @code{1}.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double cos (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float cosf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} cosl (long double @var{x})
|
||||
@deftypefunx float cosf (float @var{x})
|
||||
@deftypefunx {long double} cosl (long double @var{x})
|
||||
These functions return the cosine of @var{x}, where @var{x} is given in
|
||||
radians. The return value is in the range @code{-1} to @code{1}.
|
||||
@end deftypefun
|
||||
@ -168,10 +164,8 @@ radians. The return value is in the range @code{-1} to @code{1}.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double tan (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float tanf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} tanl (long double @var{x})
|
||||
@deftypefunx float tanf (float @var{x})
|
||||
@deftypefunx {long double} tanl (long double @var{x})
|
||||
These functions return the tangent of @var{x}, where @var{x} is given in
|
||||
radians.
|
||||
|
||||
@ -189,16 +183,14 @@ either positive or negative @code{HUGE_VAL}.
|
||||
In many applications where @code{sin} and @code{cos} are used, the value
|
||||
for the same argument of both of these functions is used at the same
|
||||
time. Since the algorithm to compute these values is very similar for
|
||||
both functions there is an additional function with computes both values
|
||||
both functions there is an additional function which computes both values
|
||||
at the same time.
|
||||
|
||||
@comment math.h
|
||||
@comment GNU
|
||||
@deftypefun void sincos (double @var{x}, double *@var{sinx}, double *@var{cosx})
|
||||
@end deftypefun
|
||||
@deftypefun void sincosf (float @var{x}, float *@var{sinx}, float *@var{cosx})
|
||||
@end deftypefun
|
||||
@deftypefun void sincosl (long double @var{x}, long double *@var{sinx}, long double *@var{cosx})
|
||||
@deftypefunx void sincosf (float @var{x}, float *@var{sinx}, float *@var{cosx})
|
||||
@deftypefunx void sincosl (long double @var{x}, long double *@var{sinx}, long double *@var{cosx})
|
||||
These functions return the sine of @var{x} in @code{*@var{sinx}} and the
|
||||
cosine of @var{x} in @code{*@var{cos}}, where @var{x} is given in
|
||||
radians. Both values, @code{*@var{sinx}} and @code{*@var{cosx}}, are in
|
||||
@ -207,53 +199,62 @@ the range of @code{-1} to @code{1}.
|
||||
|
||||
@cindex complex trigonometric functions
|
||||
|
||||
The trigonometric functions are in mathematics not only on real numbers.
|
||||
They can be extended to complex numbers and the @w{ISO C 9X} standard
|
||||
introduces these variants in the standard math library.
|
||||
The trigonometric functions are in mathematics not only defined on real
|
||||
numbers. They can be extended to complex numbers and the @w{ISO C 9X}
|
||||
standard introduces these variants in the standard math library.
|
||||
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} csin (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} csinf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} csinl (complex long double @var{z})
|
||||
@deftypefunx {complex float} csinf (complex float @var{z})
|
||||
@deftypefunx {complex long double} csinl (complex long double @var{z})
|
||||
These functions return the complex sine of the complex value in @var{z}.
|
||||
The mathematical definition of the complex sine is
|
||||
|
||||
@smallexample
|
||||
sin (z) = 1/(2*i) * (exp (z*i) - exp (-z*i))
|
||||
@end smallexample
|
||||
@ifinfo
|
||||
@math{sin (z) = 1/(2*i) * (exp (z*i) - exp (-z*i))}.
|
||||
@end ifinfo
|
||||
@iftex
|
||||
@tex
|
||||
$$\sin(z) = {1\over 2i} (e^{zi} - e^{-zi})$$
|
||||
@end tex
|
||||
@end iftex
|
||||
@end deftypefun
|
||||
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} ccos (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} ccosf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} ccosl (complex long double @var{z})
|
||||
@deftypefunx {complex float} ccosf (complex float @var{z})
|
||||
@deftypefunx {complex long double} ccosl (complex long double @var{z})
|
||||
These functions return the complex cosine of the complex value in @var{z}.
|
||||
The mathematical definition of the complex cosine is
|
||||
|
||||
@smallexample
|
||||
cos (z) = 1/2 * (exp (z*i) + exp (-z*i))
|
||||
@end smallexample
|
||||
@ifinfo
|
||||
@math{cos (z) = 1/2 * (exp (z*i) + exp (-z*i))}
|
||||
@end ifinfo
|
||||
@iftex
|
||||
@tex
|
||||
$$\cos(z) = {1\over 2} (e^{zi} + e^{-zi})$$
|
||||
@end tex
|
||||
@end iftex
|
||||
@end deftypefun
|
||||
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} ctan (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} ctanf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} ctanl (complex long double @var{z})
|
||||
@deftypefunx {complex float} ctanf (complex float @var{z})
|
||||
@deftypefunx {complex long double} ctanl (complex long double @var{z})
|
||||
These functions return the complex tangent of the complex value in @var{z}.
|
||||
The mathematical definition of the complex tangent is
|
||||
|
||||
@smallexample
|
||||
tan (z) = 1/i * (exp (z*i) - exp (-z*i)) / (exp (z*i) + exp (-z*i))
|
||||
@end smallexample
|
||||
@ifinfo
|
||||
@math{tan (z) = 1/i * (exp (z*i) - exp (-z*i)) / (exp (z*i) + exp (-z*i))}
|
||||
@end ifinfo
|
||||
@iftex
|
||||
@tex
|
||||
$$\tan(z) = {1\over i} {e^{zi} - e^{-zi}\over e^{zi} + e^{-zi}}$$
|
||||
@end tex
|
||||
@end iftex
|
||||
@end deftypefun
|
||||
|
||||
|
||||
@ -268,10 +269,8 @@ respectively.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double asin (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float asinf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} asinl (long double @var{x})
|
||||
@deftypefunx float asinf (float @var{x})
|
||||
@deftypefunx {long double} asinl (long double @var{x})
|
||||
These functions compute the arc sine of @var{x}---that is, the value whose
|
||||
sine is @var{x}. The value is in units of radians. Mathematically,
|
||||
there are infinitely many such values; the one actually returned is the
|
||||
@ -285,10 +284,8 @@ over the domain @code{-1} to @code{1}.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double acos (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float acosf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} acosl (long double @var{x})
|
||||
@deftypefunx float acosf (float @var{x})
|
||||
@deftypefunx {long double} acosl (long double @var{x})
|
||||
These functions compute the arc cosine of @var{x}---that is, the value
|
||||
whose cosine is @var{x}. The value is in units of radians.
|
||||
Mathematically, there are infinitely many such values; the one actually
|
||||
@ -303,10 +300,8 @@ over the domain @code{-1} to @code{1}.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double atan (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float atanf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} atanl (long double @var{x})
|
||||
@deftypefunx float atanf (float @var{x})
|
||||
@deftypefunx {long double} atanl (long double @var{x})
|
||||
These functions compute the arc tangent of @var{x}---that is, the value
|
||||
whose tangent is @var{x}. The value is in units of radians.
|
||||
Mathematically, there are infinitely many such values; the one actually
|
||||
@ -317,10 +312,8 @@ returned is the one between @code{-pi/2} and @code{pi/2}
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double atan2 (double @var{y}, double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float atan2f (float @var{y}, float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} atan2l (long double @var{y}, long double @var{x})
|
||||
@deftypefunx float atan2f (float @var{y}, float @var{x})
|
||||
@deftypefunx {long double} atan2l (long double @var{y}, long double @var{x})
|
||||
This is the two argument arc tangent function. It is similar to computing
|
||||
the arc tangent of @var{y}/@var{x}, except that the signs of both arguments
|
||||
are used to determine the quadrant of the result, and @var{x} is
|
||||
@ -347,10 +340,8 @@ which are usable with complex numbers.
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} casin (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} casinf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} casinl (complex long double @var{z})
|
||||
@deftypefunx {complex float} casinf (complex float @var{z})
|
||||
@deftypefunx {complex long double} casinl (complex long double @var{z})
|
||||
These functions compute the complex arc sine of @var{z}---that is, the
|
||||
value whose sine is @var{z}. The value is in units of radians.
|
||||
|
||||
@ -361,10 +352,8 @@ limitation on the argument @var{z}.
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} cacos (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} cacosf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} cacosl (complex long double @var{z})
|
||||
@deftypefunx {complex float} cacosf (complex float @var{z})
|
||||
@deftypefunx {complex long double} cacosl (complex long double @var{z})
|
||||
These functions compute the complex arc cosine of @var{z}---that is, the
|
||||
value whose cosine is @var{z}. The value is in units of radians.
|
||||
|
||||
@ -376,10 +365,8 @@ limitation on the argument @var{z}.
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} catan (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} catanf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} catanl (complex long double @var{z})
|
||||
@deftypefunx {complex float} catanf (complex float @var{z})
|
||||
@deftypefunx {complex long double} catanl (complex long double @var{z})
|
||||
These functions compute the complex arc tangent of @var{z}---that is,
|
||||
the value whose tangent is @var{z}. The value is in units of radians.
|
||||
@end deftypefun
|
||||
@ -394,10 +381,8 @@ the value whose tangent is @var{z}. The value is in units of radians.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double exp (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float expf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} expl (long double @var{x})
|
||||
@deftypefunx float expf (float @var{x})
|
||||
@deftypefunx {long double} expl (long double @var{x})
|
||||
These functions return the value of @code{e} (the base of natural
|
||||
logarithms) raised to power @var{x}.
|
||||
|
||||
@ -408,10 +393,8 @@ magnitude of the result is too large to be representable.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double exp10 (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float exp10f (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} exp10l (long double @var{x})
|
||||
@deftypefunx float exp10f (float @var{x})
|
||||
@deftypefunx {long double} exp10l (long double @var{x})
|
||||
These functions return the value of @code{10} raised to the power @var{x}.
|
||||
Mathematically, @code{exp10 (x)} is the same as @code{exp (x * log (10))}.
|
||||
|
||||
@ -422,10 +405,8 @@ magnitude of the result is too large to be representable.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double exp2 (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float exp2f (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} exp2l (long double @var{x})
|
||||
@deftypefunx float exp2f (float @var{x})
|
||||
@deftypefunx {long double} exp2l (long double @var{x})
|
||||
These functions return the value of @code{2} raised to the power @var{x}.
|
||||
Mathematically, @code{exp2 (x)} is the same as @code{exp (x * log (2))}.
|
||||
|
||||
@ -437,10 +418,8 @@ magnitude of the result is too large to be representable.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double log (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float logf (floatdouble @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} logl (long double @var{x})
|
||||
@deftypefunx float logf (floatdouble @var{x})
|
||||
@deftypefunx {long double} logl (long double @var{x})
|
||||
These functions return the natural logarithm of @var{x}. @code{exp (log
|
||||
(@var{x}))} equals @var{x}, exactly in mathematics and approximately in
|
||||
C.
|
||||
@ -460,10 +439,8 @@ The argument is zero. The log of zero is not defined.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double log10 (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float log10f (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} log10l (long double @var{x})
|
||||
@deftypefunx float log10f (float @var{x})
|
||||
@deftypefunx {long double} log10l (long double @var{x})
|
||||
These functions return the base-10 logarithm of @var{x}. Except for the
|
||||
different base, it is similar to the @code{log} function. In fact,
|
||||
@code{log10 (@var{x})} equals @code{log (@var{x}) / log (10)}.
|
||||
@ -472,10 +449,8 @@ different base, it is similar to the @code{log} function. In fact,
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double log2 (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float log2f (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} log2l (long double @var{x})
|
||||
@deftypefunx float log2f (float @var{x})
|
||||
@deftypefunx {long double} log2l (long double @var{x})
|
||||
These functions return the base-2 logarithm of @var{x}. Except for the
|
||||
different base, it is similar to the @code{log} function. In fact,
|
||||
@code{log2 (@var{x})} equals @code{log (@var{x}) / log (2)}.
|
||||
@ -484,10 +459,8 @@ different base, it is similar to the @code{log} function. In fact,
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double pow (double @var{base}, double @var{power})
|
||||
@end deftypefun
|
||||
@deftypefun float powf (float @var{base}, float @var{power})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} powl (long double @var{base}, long double @var{power})
|
||||
@deftypefunx float powf (float @var{base}, float @var{power})
|
||||
@deftypefunx {long double} powl (long double @var{base}, long double @var{power})
|
||||
These are general exponentiation functions, returning @var{base} raised
|
||||
to @var{power}.
|
||||
|
||||
@ -508,10 +481,8 @@ An underflow or overflow condition was detected in the result.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double sqrt (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float sqrtf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} sqrtl (long double @var{x})
|
||||
@deftypefunx float sqrtf (float @var{x})
|
||||
@deftypefunx {long double} sqrtl (long double @var{x})
|
||||
These functions return the nonnegative square root of @var{x}.
|
||||
|
||||
The @code{sqrt} function fails, and sets @code{errno} to @code{EDOM}, if
|
||||
@ -524,10 +495,8 @@ number.
|
||||
@comment math.h
|
||||
@comment BSD
|
||||
@deftypefun double cbrt (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float cbrtf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} cbrtl (long double @var{x})
|
||||
@deftypefunx float cbrtf (float @var{x})
|
||||
@deftypefunx {long double} cbrtl (long double @var{x})
|
||||
These functions return the cube root of @var{x}. They cannot
|
||||
fail; every representable real value has a representable real cube root.
|
||||
@end deftypefun
|
||||
@ -535,10 +504,8 @@ fail; every representable real value has a representable real cube root.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double hypot (double @var{x}, double @var{y})
|
||||
@end deftypefun
|
||||
@deftypefun float hypotf (float @var{x}, float @var{y})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} hypotl (long double @var{x}, long double @var{y})
|
||||
@deftypefunx float hypotf (float @var{x}, float @var{y})
|
||||
@deftypefunx {long double} hypotl (long double @var{x}, long double @var{y})
|
||||
These functions return @code{sqrt (@var{x}*@var{x} +
|
||||
@var{y}*@var{y})}. (This is the length of the hypotenuse of a right
|
||||
triangle with sides of length @var{x} and @var{y}, or the distance
|
||||
@ -550,10 +517,8 @@ much smaller. See also the function @code{cabs} in @ref{Absolute Value}.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double expm1 (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float expm1f (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} expm1l (long double @var{x})
|
||||
@deftypefunx float expm1f (float @var{x})
|
||||
@deftypefunx {long double} expm1l (long double @var{x})
|
||||
These functions return a value equivalent to @code{exp (@var{x}) - 1}.
|
||||
It is computed in a way that is accurate even if the value of @var{x} is
|
||||
near zero---a case where @code{exp (@var{x}) - 1} would be inaccurate due
|
||||
@ -563,10 +528,8 @@ to subtraction of two numbers that are nearly equal.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double log1p (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float log1pf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} log1pl (long double @var{x})
|
||||
@deftypefunx float log1pf (float @var{x})
|
||||
@deftypefunx {long double} log1pl (long double @var{x})
|
||||
This function returns a value equivalent to @w{@code{log (1 + @var{x})}}.
|
||||
It is computed in a way that is accurate even if the value of @var{x} is
|
||||
near zero.
|
||||
@ -584,45 +547,51 @@ definition.
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} cexp (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} cexpf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} cexpl (complex long double @var{z})
|
||||
@deftypefunx {complex float} cexpf (complex float @var{z})
|
||||
@deftypefunx {complex long double} cexpl (complex long double @var{z})
|
||||
These functions return the value of @code{e} (the base of natural
|
||||
logarithms) raised to power of the complex value @var{z}.
|
||||
|
||||
@noindent
|
||||
Mathematically this corresponds to the value
|
||||
|
||||
@smallexample
|
||||
exp (z) = exp (creal (z)) * (cos (cimag (z)) + I * sin (cimag (z)))
|
||||
@end smallexample
|
||||
@ifinfo
|
||||
@math{exp (z) = exp (creal (z)) * (cos (cimag (z)) + I * sin (cimag (z)))}
|
||||
@end ifinfo
|
||||
@iftex
|
||||
@tex
|
||||
$$\exp(z) = e^z = e^{{\rm Re} z} (\cos ({\rm Im} z) + i \sin ({\rm Im} z))$$
|
||||
@end tex
|
||||
@end iftex
|
||||
@end deftypefun
|
||||
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} clog (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} clogf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} clogl (complex long double @var{z})
|
||||
@deftypefunx {complex float} clogf (complex float @var{z})
|
||||
@deftypefunx {complex long double} clogl (complex long double @var{z})
|
||||
These functions return the natural logarithm of the complex value
|
||||
@var{z}. Unlike the real value version @code{log} and its variants,
|
||||
@code{clog} has no limit for the range of its argument @var{z}.
|
||||
|
||||
@noindent
|
||||
Mathematically this corresponds to the value
|
||||
|
||||
@smallexample
|
||||
log (z) = log (cabs (z)) + I * carg (z)
|
||||
@end smallexample
|
||||
@ifinfo
|
||||
@math{log (z) = log (cabs (z)) + I * carg (z)}
|
||||
@end ifinfo
|
||||
@iftex
|
||||
@tex
|
||||
$$\log(z) = \log(|z|) + i \arg(z)$$
|
||||
@end tex
|
||||
@end iftex
|
||||
@end deftypefun
|
||||
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} csqrt (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} csqrtf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} csqrtl (complex long double @var{z})
|
||||
@deftypefunx {complex float} csqrtf (complex float @var{z})
|
||||
@deftypefunx {complex long double} csqrtl (complex long double @var{z})
|
||||
These functions return the complex root of the argument @var{z}. Unlike
|
||||
the @code{sqrt} function these functions do not have any restriction on
|
||||
the value of the argument.
|
||||
@ -631,16 +600,19 @@ the value of the argument.
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} cpow (complex double @var{base}, complex double @var{power})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} cpowf (complex float @var{base}, complex float @var{power})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} cpowl (complex long double @var{base}, complex long double @var{power})
|
||||
@deftypefunx {complex float} cpowf (complex float @var{base}, complex float @var{power})
|
||||
@deftypefunx {complex long double} cpowl (complex long double @var{base}, complex long double @var{power})
|
||||
These functions return the complex value @var{BASE} raised to the power of
|
||||
@var{power}. This is computed as
|
||||
|
||||
@smallexample
|
||||
cpow (x, y) = cexp (y * clog (x))
|
||||
@end smallexample
|
||||
@ifinfo
|
||||
@math{cpow (x, y) = cexp (y * clog (x))}
|
||||
@end ifinfo
|
||||
@iftex
|
||||
@tex
|
||||
$${\rm cpow}(x, y) = e^{y \log(x)}$$
|
||||
@end tex
|
||||
@end iftex
|
||||
@end deftypefun
|
||||
|
||||
|
||||
@ -654,10 +626,8 @@ see @ref{Exponents and Logarithms}.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double sinh (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float sinhf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} sinhl (long double @var{x})
|
||||
@deftypefunx float sinhf (float @var{x})
|
||||
@deftypefunx {long double} sinhl (long double @var{x})
|
||||
These functions return the hyperbolic sine of @var{x}, defined
|
||||
mathematically as @w{@code{(exp (@var{x}) - exp (-@var{x})) / 2}}. The
|
||||
function fails, and sets @code{errno} to @code{ERANGE}, if the value of
|
||||
@ -667,10 +637,8 @@ function fails, and sets @code{errno} to @code{ERANGE}, if the value of
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double cosh (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float coshf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} coshl (long double @var{x})
|
||||
@deftypefunx float coshf (float @var{x})
|
||||
@deftypefunx {long double} coshl (long double @var{x})
|
||||
These function return the hyperbolic cosine of @var{x},
|
||||
defined mathematically as @w{@code{(exp (@var{x}) + exp (-@var{x})) / 2}}.
|
||||
The function fails, and sets @code{errno} to @code{ERANGE}, if the value
|
||||
@ -680,10 +648,8 @@ of @var{x} is too large; that is, if overflow occurs.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double tanh (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float tanhf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} tanhl (long double @var{x})
|
||||
@deftypefunx float tanhf (float @var{x})
|
||||
@deftypefunx {long double} tanhl (long double @var{x})
|
||||
These functions return the hyperbolic tangent of @var{x}, whose
|
||||
mathematical definition is @w{@code{sinh (@var{x}) / cosh (@var{x})}}.
|
||||
@end deftypefun
|
||||
@ -698,10 +664,8 @@ library are optimized for accuracy and speed.
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} csinh (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} csinhf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} csinhl (complex long double @var{z})
|
||||
@deftypefunx {complex float} csinhf (complex float @var{z})
|
||||
@deftypefunx {complex long double} csinhl (complex long double @var{z})
|
||||
These functions return the complex hyperbolic sine of @var{z}, defined
|
||||
mathematically as @w{@code{(exp (@var{z}) - exp (-@var{z})) / 2}}. The
|
||||
function fails, and sets @code{errno} to @code{ERANGE}, if the value of
|
||||
@ -711,10 +675,8 @@ result is too large.
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} ccosh (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} ccoshf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} ccoshl (complex long double @var{z})
|
||||
@deftypefunx {complex float} ccoshf (complex float @var{z})
|
||||
@deftypefunx {complex long double} ccoshl (complex long double @var{z})
|
||||
These functions return the complex hyperbolic cosine of @var{z}, defined
|
||||
mathematically as @w{@code{(exp (@var{z}) + exp (-@var{z})) / 2}}. The
|
||||
function fails, and sets @code{errno} to @code{ERANGE}, if the value of
|
||||
@ -724,10 +686,8 @@ result is too large.
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} ctanh (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} ctanhf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} ctanhl (complex long double @var{z})
|
||||
@deftypefunx {complex float} ctanhf (complex float @var{z})
|
||||
@deftypefunx {complex long double} ctanhl (complex long double @var{z})
|
||||
These functions return the complex hyperbolic tangent of @var{z}, whose
|
||||
mathematical definition is @w{@code{csinh (@var{z}) / ccosh (@var{z})}}.
|
||||
@end deftypefun
|
||||
@ -738,10 +698,8 @@ mathematical definition is @w{@code{csinh (@var{z}) / ccosh (@var{z})}}.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double asinh (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float asinhf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} asinhl (long double @var{x})
|
||||
@deftypefunx float asinhf (float @var{x})
|
||||
@deftypefunx {long double} asinhl (long double @var{x})
|
||||
These functions return the inverse hyperbolic sine of @var{x}---the
|
||||
value whose hyperbolic sine is @var{x}.
|
||||
@end deftypefun
|
||||
@ -749,10 +707,8 @@ value whose hyperbolic sine is @var{x}.
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double acosh (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float acoshf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} acoshl (long double @var{x})
|
||||
@deftypefunx float acoshf (float @var{x})
|
||||
@deftypefunx {long double} acoshl (long double @var{x})
|
||||
These functions return the inverse hyperbolic cosine of @var{x}---the
|
||||
value whose hyperbolic cosine is @var{x}. If @var{x} is less than
|
||||
@code{1}, @code{acosh} returns @code{HUGE_VAL}.
|
||||
@ -761,10 +717,8 @@ value whose hyperbolic cosine is @var{x}. If @var{x} is less than
|
||||
@comment math.h
|
||||
@comment ISO
|
||||
@deftypefun double atanh (double @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun float atanhf (float @var{x})
|
||||
@end deftypefun
|
||||
@deftypefun {long double} atanhl (long double @var{x})
|
||||
@deftypefunx float atanhf (float @var{x})
|
||||
@deftypefunx {long double} atanhl (long double @var{x})
|
||||
These functions return the inverse hyperbolic tangent of @var{x}---the
|
||||
value whose hyperbolic tangent is @var{x}. If the absolute value of
|
||||
@var{x} is greater than or equal to @code{1}, @code{atanh} returns
|
||||
@ -776,10 +730,8 @@ value whose hyperbolic tangent is @var{x}. If the absolute value of
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} casinh (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} casinhf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} casinhl (complex long double @var{z})
|
||||
@deftypefunx {complex float} casinhf (complex float @var{z})
|
||||
@deftypefunx {complex long double} casinhl (complex long double @var{z})
|
||||
These functions return the inverse complex hyperbolic sine of
|
||||
@var{z}---the value whose complex hyperbolic sine is @var{z}.
|
||||
@end deftypefun
|
||||
@ -787,10 +739,8 @@ These functions return the inverse complex hyperbolic sine of
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} cacosh (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} cacoshf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} cacoshl (complex long double @var{z})
|
||||
@deftypefunx {complex float} cacoshf (complex float @var{z})
|
||||
@deftypefunx {complex long double} cacoshl (complex long double @var{z})
|
||||
These functions return the inverse complex hyperbolic cosine of
|
||||
@var{z}---the value whose complex hyperbolic cosine is @var{z}. Unlike
|
||||
the real valued function @code{acosh} there is not limit for the range
|
||||
@ -800,10 +750,8 @@ of the argument.
|
||||
@comment complex.h
|
||||
@comment ISO
|
||||
@deftypefun {complex double} catanh (complex double @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex float} catanhf (complex float @var{z})
|
||||
@end deftypefun
|
||||
@deftypefun {complex long double} catanhl (complex long double @var{z})
|
||||
@deftypefunx {complex float} catanhf (complex float @var{z})
|
||||
@deftypefunx {complex long double} catanhl (complex long double @var{z})
|
||||
These functions return the inverse complex hyperbolic tangent of
|
||||
@var{z}---the value whose complex hyperbolic tangent is @var{z}. Unlike
|
||||
the real valued function @code{atanh} there is not limit for the range
|
||||
|
@ -833,10 +833,9 @@ will not affect your program unless it explicitly uses them for something.
|
||||
@comment signal.h
|
||||
@comment POSIX.1
|
||||
@deftypevr Macro int SIGUSR1
|
||||
@end deftypevr
|
||||
@comment signal.h
|
||||
@comment POSIX.1
|
||||
@deftypevr Macro int SIGUSR2
|
||||
@deftypevrx Macro int SIGUSR2
|
||||
@cindex user signals
|
||||
The @code{SIGUSR1} and @code{SIGUSR2} signals are set aside for you to
|
||||
use any way you want. They're useful for simple interprocess
|
||||
|
@ -1765,47 +1765,40 @@ extract just the basic type code.
|
||||
Here are symbolic constants that represent the basic types; they stand
|
||||
for integer values.
|
||||
|
||||
@table @code
|
||||
@vtable @code
|
||||
@comment printf.h
|
||||
@comment GNU
|
||||
@item PA_INT
|
||||
@vindex PA_INT
|
||||
This specifies that the base type is @code{int}.
|
||||
|
||||
@comment printf.h
|
||||
@comment GNU
|
||||
@item PA_CHAR
|
||||
@vindex PA_CHAR
|
||||
This specifies that the base type is @code{int}, cast to @code{char}.
|
||||
|
||||
@comment printf.h
|
||||
@comment GNU
|
||||
@item PA_STRING
|
||||
@vindex PA_STRING
|
||||
This specifies that the base type is @code{char *}, a null-terminated string.
|
||||
|
||||
@comment printf.h
|
||||
@comment GNU
|
||||
@item PA_POINTER
|
||||
@vindex PA_POINTER
|
||||
This specifies that the base type is @code{void *}, an arbitrary pointer.
|
||||
|
||||
@comment printf.h
|
||||
@comment GNU
|
||||
@item PA_FLOAT
|
||||
@vindex PA_FLOAT
|
||||
This specifies that the base type is @code{float}.
|
||||
|
||||
@comment printf.h
|
||||
@comment GNU
|
||||
@item PA_DOUBLE
|
||||
@vindex PA_DOUBLE
|
||||
This specifies that the base type is @code{double}.
|
||||
|
||||
@comment printf.h
|
||||
@comment GNU
|
||||
@item PA_LAST
|
||||
@vindex PA_LAST
|
||||
You can define additional base types for your own programs as offsets
|
||||
from @code{PA_LAST}. For example, if you have data types @samp{foo}
|
||||
and @samp{bar} with their own specialized @code{printf} conversions,
|
||||
@ -1815,16 +1808,15 @@ you could define encodings for these types as:
|
||||
#define PA_FOO PA_LAST
|
||||
#define PA_BAR (PA_LAST + 1)
|
||||
@end smallexample
|
||||
@end table
|
||||
@end vtable
|
||||
|
||||
Here are the flag bits that modify a basic type. They are combined with
|
||||
the code for the basic type using inclusive-or.
|
||||
|
||||
@table @code
|
||||
@vtable @code
|
||||
@comment printf.h
|
||||
@comment GNU
|
||||
@item PA_FLAG_PTR
|
||||
@vindex PA_FLAG_PTR
|
||||
If this bit is set, it indicates that the encoded type is a pointer to
|
||||
the base type, rather than an immediate value.
|
||||
For example, @samp{PA_INT|PA_FLAG_PTR} represents the type @samp{int *}.
|
||||
@ -1832,31 +1824,27 @@ For example, @samp{PA_INT|PA_FLAG_PTR} represents the type @samp{int *}.
|
||||
@comment printf.h
|
||||
@comment GNU
|
||||
@item PA_FLAG_SHORT
|
||||
@vindex PA_FLAG_SHORT
|
||||
If this bit is set, it indicates that the base type is modified with
|
||||
@code{short}. (This corresponds to the @samp{h} type modifier.)
|
||||
|
||||
@comment printf.h
|
||||
@comment GNU
|
||||
@item PA_FLAG_LONG
|
||||
@vindex PA_FLAG_LONG
|
||||
If this bit is set, it indicates that the base type is modified with
|
||||
@code{long}. (This corresponds to the @samp{l} type modifier.)
|
||||
|
||||
@comment printf.h
|
||||
@comment GNU
|
||||
@item PA_FLAG_LONG_LONG
|
||||
@vindex PA_FLAG_LONG_LONG
|
||||
If this bit is set, it indicates that the base type is modified with
|
||||
@code{long long}. (This corresponds to the @samp{L} type modifier.)
|
||||
|
||||
@comment printf.h
|
||||
@comment GNU
|
||||
@item PA_FLAG_LONG_DOUBLE
|
||||
@vindex PA_FLAG_LONG_DOUBLE
|
||||
This is a synonym for @code{PA_FLAG_LONG_LONG}, used by convention with
|
||||
a base type of @code{PA_DOUBLE} to indicate a type of @code{long double}.
|
||||
@end table
|
||||
@end vtable
|
||||
|
||||
@ifinfo
|
||||
For an example of using these facilities, see @ref{Example of Parsing}.
|
||||
@ -2234,7 +2222,8 @@ character is of lower case, 1024 is used. For upper case characters,
|
||||
The postfix tag corresponds to bytes, kilobytes, megabytes, gigabytes,
|
||||
etc. The full table is:
|
||||
|
||||
@multitable {' '} {2^10 (1024)} {zetta} {Upper} {10^24 (1000)}
|
||||
@ifinfo
|
||||
@multitable @hsep @vsep {' '} {2^10 (1024)} {zetta} {Upper} {10^24 (1000)}
|
||||
@item low @tab Multiplier @tab From @tab Upper @tab Multiplier
|
||||
@item ' ' @tab 1 @tab @tab ' ' @tab 1
|
||||
@item k @tab 2^10 (1024) @tab kilo @tab K @tab 10^3 (1000)
|
||||
@ -2246,6 +2235,29 @@ etc. The full table is:
|
||||
@item z @tab 2^70 @tab zetta @tab Z @tab 10^21
|
||||
@item y @tab 2^80 @tab yotta @tab Y @tab 10^24
|
||||
@end multitable
|
||||
@end ifinfo
|
||||
@iftex
|
||||
@tex
|
||||
\hbox to\hsize{\hfil\vbox{\offinterlineskip
|
||||
\hrule
|
||||
\halign{\strut#& \vrule#\tabskip=1em plus2em& {\tt#}\hfil& \vrule#& #\hfil& \vrule#& #\hfil& \vrule#& {\tt#}\hfil& \vrule#& #\hfil& \vrule#\tabskip=0pt\cr
|
||||
\noalign{\hrule}
|
||||
\omit&height2pt&\omit&&\omit&&\omit&&\omit&&\omit&\cr
|
||||
&& \omit low && Multiplier && From && \omit Upper && Multiplier &\cr
|
||||
\omit&height2pt&\omit&&\omit&&\omit&&\omit&&\omit&\cr
|
||||
\noalign{\hrule}
|
||||
&& {\tt\char32} && 1 && && {\tt\char32} && 1 &\cr
|
||||
&& k && $2^{10} = 1024$ && kilo && K && $10^3 = 1000$ &\cr
|
||||
&& m && $2^{20}$ && mega && M && $10^6$ &\cr
|
||||
&& g && $2^{30}$ && giga && G && $10^9$ &\cr
|
||||
&& t && $2^{40}$ && tera && T && $10^{12}$ &\cr
|
||||
&& p && $2^{50}$ && peta && P && $10^{15}$ &\cr
|
||||
&& e && $2^{60}$ && exa && E && $10^{18}$ &\cr
|
||||
&& z && $2^{70}$ && zetta && Z && $10^{21}$ &\cr
|
||||
&& y && $2^{80}$ && yotta && Y && $10^{24}$ &\cr
|
||||
\noalign{\hrule}}}\hfil}
|
||||
@end tex
|
||||
@end iftex
|
||||
|
||||
The default precision is 3, i.e., 1024 is printed with a lower-case
|
||||
format character as if it were @code{%.3fk} and will yield @code{1.000k}.
|
||||
|
@ -25,29 +25,53 @@
|
||||
|
||||
BEGIN { header = 0;
|
||||
nameword["@defun"]=1
|
||||
nameword["@defunx"]=1
|
||||
nameword["@defmac"]=1
|
||||
nameword["@defmacx"]=1
|
||||
nameword["@defspec"]=1
|
||||
nameword["@defspecx"]=1
|
||||
nameword["@defvar"]=1
|
||||
nameword["@defvarx"]=1
|
||||
nameword["@defopt"]=1
|
||||
nameword["@defoptx"]=1
|
||||
nameword["@deffn"]=2
|
||||
nameword["@deffnx"]=2
|
||||
nameword["@defvr"]=2
|
||||
nameword["@defvrx"]=2
|
||||
nameword["@deftp"]=2
|
||||
nameword["@deftpx"]=2
|
||||
nameword["@deftypefun"]=2
|
||||
nameword["@deftypefunx"]=2
|
||||
nameword["@deftypevar"]=2
|
||||
nameword["@deftypevarx"]=2
|
||||
nameword["@deftypefn"]=3
|
||||
nameword["@deftypefnx"]=3
|
||||
nameword["@deftypevr"]=3
|
||||
nameword["@deftypevrx"]=3
|
||||
firstword["@defun"]=1
|
||||
firstword["@defunx"]=1
|
||||
firstword["@defmac"]=1
|
||||
firstword["@defmacx"]=1
|
||||
firstword["@defspec"]=1
|
||||
firstword["@defspecx"]=1
|
||||
firstword["@defvar"]=1
|
||||
firstword["@defvarx"]=1
|
||||
firstword["@defopt"]=1
|
||||
firstword["@defoptx"]=1
|
||||
firstword["@deffn"]=2
|
||||
firstword["@deffnx"]=2
|
||||
firstword["@defvr"]=2
|
||||
firstword["@defvrx"]=2
|
||||
firstword["@deftp"]=2
|
||||
firstword["@deftpx"]=2
|
||||
firstword["@deftypefun"]=1
|
||||
firstword["@deftypefunx"]=1
|
||||
firstword["@deftypevar"]=1
|
||||
firstword["@deftypevarx"]=1
|
||||
firstword["@deftypefn"]=2
|
||||
firstword["@deftypefnx"]=2
|
||||
firstword["@deftypevr"]=2
|
||||
firstword["@deftypevrx"]=2
|
||||
nameword["@item"]=1
|
||||
firstword["@item"]=1
|
||||
nameword["@itemx"]=1
|
||||
|
@ -1,5 +1,5 @@
|
||||
%% TeX macros to handle Texinfo files.
|
||||
%% $Id: texinfo.tex,v 2.196 1997/01/04 19:24:13 karl Exp $
|
||||
%% $Id: texinfo.tex,v 2.197 1997/04/30 15:34:30 drepper Exp $
|
||||
|
||||
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93,
|
||||
% 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
% This automatically updates the version number based on RCS.
|
||||
\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
|
||||
\deftexinfoversion$Revision: 2.196 $
|
||||
\deftexinfoversion$Revision: 2.197 $
|
||||
\message{Loading texinfo package [Version \texinfoversion]:}
|
||||
|
||||
% If in a .fmt file, print the version number
|
||||
@ -118,33 +118,41 @@
|
||||
\showboxbreadth\maxdimen\showboxdepth\maxdimen
|
||||
}%
|
||||
|
||||
%---------------------Begin change-----------------------
|
||||
% For @cropmarks command.
|
||||
% Do @cropmarks to get crop marks.
|
||||
%
|
||||
\newif\ifcropmarks
|
||||
\let\cropmarks = \cropmarkstrue
|
||||
%
|
||||
%%%% For @cropmarks command.
|
||||
% Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986
|
||||
% Dimensions to add cropmarks at corners.
|
||||
% Added by P. A. MacKay, 12 Nov. 1986
|
||||
%
|
||||
\newdimen\cornerlong \newdimen\cornerthick
|
||||
\newdimen \topandbottommargin
|
||||
\newdimen \outerhsize \newdimen \outervsize
|
||||
\newdimen\topandbottommargin
|
||||
\newdimen\outerhsize \newdimen\outervsize
|
||||
\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
|
||||
\outerhsize=7in
|
||||
%\outervsize=9.5in
|
||||
% Alternative @smallbook page size is 9.25in
|
||||
\outervsize=9.25in
|
||||
\topandbottommargin=.75in
|
||||
%
|
||||
%---------------------End change-----------------------
|
||||
|
||||
% Main output routine.
|
||||
\chardef\PAGE = 255
|
||||
\output = {\onepageout{\pagecontents\PAGE}}
|
||||
|
||||
\newbox\headlinebox \newbox\footlinebox
|
||||
\newbox\headlinebox
|
||||
\newbox\footlinebox
|
||||
|
||||
% \onepageout takes a vbox as an argument. Note that \pagecontents
|
||||
% does insertions, but you have to call it yourself.
|
||||
\def\onepageout#1{%
|
||||
\hoffset=\normaloffset
|
||||
\ifcropmarks
|
||||
\hoffset = 0pt
|
||||
\else
|
||||
\hoffset = \normaloffset
|
||||
\fi
|
||||
%
|
||||
\ifodd\pageno \advance\hoffset by \bindingoffset
|
||||
\else \advance\hoffset by -\bindingoffset\fi
|
||||
%
|
||||
@ -163,53 +171,41 @@
|
||||
\normalturnoffactive % \ in index entries must not stay \, e.g., if
|
||||
% the page break happens to be in the middle of an example.
|
||||
\shipout\vbox{%
|
||||
\ifcropmarks
|
||||
\vbox to \outervsize\bgroup
|
||||
\hsize = \outerhsize
|
||||
\vbox{\line{\ewtop\hfill\ewtop}}%
|
||||
\nointerlineskip
|
||||
\line{%
|
||||
\vbox{\moveleft\cornerthick\nstop}%
|
||||
\hfill
|
||||
\vbox{\moveright\cornerthick\nstop}%
|
||||
}%
|
||||
\vskip\topandbottommargin
|
||||
\fi
|
||||
%
|
||||
\unvbox\headlinebox
|
||||
\pagebody{#1}%
|
||||
\unvbox\footlinebox
|
||||
%
|
||||
\ifcropmarks
|
||||
\vskip\topandbottommargin plus1fill minus1fill
|
||||
\boxmaxdepth = \cornerthick
|
||||
\line{%
|
||||
\vbox{\moveleft\cornerthick\nsbot}%
|
||||
\hfill
|
||||
\vbox{\moveright\cornerthick\nsbot}%
|
||||
}%
|
||||
\nointerlineskip
|
||||
\vbox{\line{\ewbot\hfill\ewbot}}%
|
||||
\egroup % \vbox from first cropmarks clause
|
||||
\fi
|
||||
}%
|
||||
}%
|
||||
\advancepageno
|
||||
\ifnum\outputpenalty>-20000 \else\dosupereject\fi
|
||||
}
|
||||
|
||||
%%%% For @cropmarks command %%%%
|
||||
|
||||
% Here is a modification of the main output routine for Near East Publications
|
||||
% This provides right-angle cropmarks at all four corners.
|
||||
% The contents of the page are centerlined into the cropmarks,
|
||||
% and any desired binding offset is added as an \hskip on either
|
||||
% site of the centerlined box. (P. A. MacKay, 12 November, 1986)
|
||||
%
|
||||
\def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up
|
||||
{\escapechar=`\\\relax % makes sure backslash is used in output files.
|
||||
\shipout
|
||||
\vbox to \outervsize{\hsize=\outerhsize
|
||||
\vbox{\line{\ewtop\hfill\ewtop}}
|
||||
\nointerlineskip
|
||||
\line{\vbox{\moveleft\cornerthick\nstop}
|
||||
\hfill
|
||||
\vbox{\moveright\cornerthick\nstop}}
|
||||
\vskip \topandbottommargin
|
||||
\centerline{\ifodd\pageno\hskip\bindingoffset\fi
|
||||
\vbox{
|
||||
{\let\hsize=\pagewidth \makeheadline}
|
||||
\pagebody{#1}
|
||||
{\let\hsize=\pagewidth \makefootline}}
|
||||
\ifodd\pageno\else\hskip\bindingoffset\fi}
|
||||
\vskip \topandbottommargin plus1fill minus1fill
|
||||
\boxmaxdepth\cornerthick
|
||||
\line{\vbox{\moveleft\cornerthick\nsbot}
|
||||
\hfill
|
||||
\vbox{\moveright\cornerthick\nsbot}}
|
||||
\nointerlineskip
|
||||
\vbox{\line{\ewbot\hfill\ewbot}}
|
||||
}}
|
||||
\advancepageno
|
||||
\ifnum\outputpenalty>-20000 \else\dosupereject\fi}
|
||||
%
|
||||
% Do @cropmarks to get crop marks
|
||||
\def\cropmarks{\let\onepageout=\croppageout }
|
||||
|
||||
\newinsert\margin \dimen\margin=\maxdimen
|
||||
|
||||
\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
|
||||
@ -2240,6 +2236,7 @@ width0pt\relax} \fi
|
||||
\def\r##1{\realbackslash r {##1}}%
|
||||
\def\i##1{\realbackslash i {##1}}%
|
||||
\def\b##1{\realbackslash b {##1}}%
|
||||
\def\sc##1{\realbackslash sc {##1}}%
|
||||
\def\cite##1{\realbackslash cite {##1}}%
|
||||
\def\key##1{\realbackslash key {##1}}%
|
||||
\def\file##1{\realbackslash file {##1}}%
|
||||
@ -2774,7 +2771,8 @@ width0pt\relax} \fi
|
||||
% because we don't want its macros evaluated now.
|
||||
\xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%
|
||||
{\chapternofonts%
|
||||
\edef\temp{{\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}%
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{{\realbackslash chapentry{\the\toks0}{\the\chapno}{\noexpand\folio}}}%
|
||||
\escapechar=`\\%
|
||||
\write \contentsfile \temp %
|
||||
\donoderef %
|
||||
@ -2793,8 +2791,9 @@ width0pt\relax} \fi
|
||||
\gdef\thischaptername{#1}%
|
||||
\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
|
||||
{\chapternofonts%
|
||||
\edef\temp{{\realbackslash chapentry
|
||||
{#1}{\putwordAppendix{} \appendixletter}{\noexpand\folio}}}%
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{{\realbackslash chapentry{\the\toks0}%
|
||||
{\putwordAppendix{} \appendixletter}{\noexpand\folio}}}%
|
||||
\escapechar=`\\%
|
||||
\write \contentsfile \temp %
|
||||
\appendixnoderef %
|
||||
@ -2828,7 +2827,8 @@ width0pt\relax} \fi
|
||||
\unnumbchapmacro {#1}%
|
||||
\gdef\thischapter{#1}\gdef\thissection{#1}%
|
||||
{\chapternofonts%
|
||||
\edef\temp{{\realbackslash unnumbchapentry {#1}{\noexpand\folio}}}%
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{{\realbackslash unnumbchapentry{\the\toks0}{\noexpand\folio}}}%
|
||||
\escapechar=`\\%
|
||||
\write \contentsfile \temp %
|
||||
\unnumbnoderef %
|
||||
@ -2843,8 +2843,9 @@ width0pt\relax} \fi
|
||||
\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
|
||||
\gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
|
||||
{\chapternofonts%
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{{\realbackslash secentry %
|
||||
{#1}{\the\chapno}{\the\secno}{\noexpand\folio}}}%
|
||||
{\the\toks0}{\the\chapno}{\the\secno}{\noexpand\folio}}}%
|
||||
\escapechar=`\\%
|
||||
\write \contentsfile \temp %
|
||||
\donoderef %
|
||||
@ -2858,8 +2859,9 @@ width0pt\relax} \fi
|
||||
\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
|
||||
\gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
|
||||
{\chapternofonts%
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{{\realbackslash secentry %
|
||||
{#1}{\appendixletter}{\the\secno}{\noexpand\folio}}}%
|
||||
{\the\toks0}{\appendixletter}{\the\secno}{\noexpand\folio}}}%
|
||||
\escapechar=`\\%
|
||||
\write \contentsfile \temp %
|
||||
\appendixnoderef %
|
||||
@ -2871,7 +2873,8 @@ width0pt\relax} \fi
|
||||
\def\unnumberedseczzz #1{\seccheck{unnumberedsec}%
|
||||
\plainsecheading {#1}\gdef\thissection{#1}%
|
||||
{\chapternofonts%
|
||||
\edef\temp{{\realbackslash unnumbsecentry{#1}{\noexpand\folio}}}%
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{{\realbackslash unnumbsecentry{\the\toks0}{\noexpand\folio}}}%
|
||||
\escapechar=`\\%
|
||||
\write \contentsfile \temp %
|
||||
\unnumbnoderef %
|
||||
@ -2884,8 +2887,9 @@ width0pt\relax} \fi
|
||||
\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
|
||||
\subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
|
||||
{\chapternofonts%
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{{\realbackslash subsecentry %
|
||||
{#1}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
|
||||
{\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
|
||||
\escapechar=`\\%
|
||||
\write \contentsfile \temp %
|
||||
\donoderef %
|
||||
@ -2898,8 +2902,9 @@ width0pt\relax} \fi
|
||||
\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
|
||||
\subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
|
||||
{\chapternofonts%
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{{\realbackslash subsecentry %
|
||||
{#1}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
|
||||
{\the\toks0}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
|
||||
\escapechar=`\\%
|
||||
\write \contentsfile \temp %
|
||||
\appendixnoderef %
|
||||
@ -2911,7 +2916,8 @@ width0pt\relax} \fi
|
||||
\def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%
|
||||
\plainsubsecheading {#1}\gdef\thissection{#1}%
|
||||
{\chapternofonts%
|
||||
\edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}%
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{{\realbackslash unnumbsubsecentry{\the\toks0}{\noexpand\folio}}}%
|
||||
\escapechar=`\\%
|
||||
\write \contentsfile \temp %
|
||||
\unnumbnoderef %
|
||||
@ -2925,8 +2931,8 @@ width0pt\relax} \fi
|
||||
\subsubsecheading {#1}
|
||||
{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
|
||||
{\chapternofonts%
|
||||
\edef\temp{{\realbackslash subsubsecentry %
|
||||
{#1}
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{{\realbackslash subsubsecentry{\the\toks0}
|
||||
{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}
|
||||
{\noexpand\folio}}}%
|
||||
\escapechar=`\\%
|
||||
@ -2942,7 +2948,8 @@ width0pt\relax} \fi
|
||||
\subsubsecheading {#1}
|
||||
{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
|
||||
{\chapternofonts%
|
||||
\edef\temp{{\realbackslash subsubsecentry{#1}%
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{{\realbackslash subsubsecentry{\the\toks0}%
|
||||
{\appendixletter}
|
||||
{\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%
|
||||
\escapechar=`\\%
|
||||
@ -2956,7 +2963,8 @@ width0pt\relax} \fi
|
||||
\def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%
|
||||
\plainsubsubsecheading {#1}\gdef\thissection{#1}%
|
||||
{\chapternofonts%
|
||||
\edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}%
|
||||
\toks0 = {#1}%
|
||||
\edef\temp{{\realbackslash unnumbsubsubsecentry{\the\toks0}{\noexpand\folio}}}%
|
||||
\escapechar=`\\%
|
||||
\write \contentsfile \temp %
|
||||
\unnumbnoderef %
|
||||
|
@ -9,18 +9,18 @@ BEGIN {
|
||||
|
||||
/^@deftypefun/ {
|
||||
printf ("* %s: (libc)%s.\n",
|
||||
gensub (/@deftypefun +([^{ ]+|\{[^}]+\}) +([[:alpha:]_][[:alnum:]_]+).*/, "\\2", 1),
|
||||
gensub (/@deftypefunx? +([^{ ]+|\{[^}]+\}) +([[:alpha:]_][[:alnum:]_]*).*/, "\\2", 1),
|
||||
last_node);
|
||||
}
|
||||
|
||||
/^@deftypevr/ {
|
||||
printf ("* %s: (libc)%s.\n",
|
||||
gensub (/@deftypevr +([^{ ]+|\{[^}]+\}) +([^{ ]+|\{[^}]+\}) +([[:alpha:]_][[:alnum:]_]+).*/, "\\3", 1),
|
||||
gensub (/@deftypevrx? +([^{ ]+|\{[^}]+\}) +([^{ ]+|\{[^}]+\}) +([[:alpha:]_][[:alnum:]_]*).*/, "\\3", 1),
|
||||
last_node);
|
||||
}
|
||||
|
||||
/^@deftypefn/ {
|
||||
printf ("* %s: (libc)%s.\n",
|
||||
gensub (/@deftypefn +([^{ ]+|\{[^}]+\}) +[^{ ]*(\{[^}]+\})? +([[:alpha:]_][[:alnum:]_]+).*/, "\\3", 1),
|
||||
gensub (/@deftypefnx? +([^{ ]+|\{[^}]+\}) +[^{ ]*(\{[^}]+\})? +([[:alpha:]_][[:alnum:]_]*).*/, "\\3", 1),
|
||||
last_node);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#ifndef _FENV_H
|
||||
|
||||
#define __FENV_H 1
|
||||
#define _FENV_H 1
|
||||
#include <features.h>
|
||||
|
||||
/* Get the architecture dependend definitions. The following definitions
|
||||
@ -40,7 +40,7 @@
|
||||
|
||||
The following macros are defined iff the implementation supports this
|
||||
kind of exception.
|
||||
FE_INEXACT inxeact result
|
||||
FE_INEXACT inexact result
|
||||
FE_DIVBYZERO devision by zero
|
||||
FE_UNDERFLOW result not representable due to underflow
|
||||
FE_OVERFLOW result not representable due to overflow
|
||||
@ -86,7 +86,7 @@ extern int fetestexcept __P ((int __excepts));
|
||||
extern int fegetround __P ((void));
|
||||
|
||||
/* Establish the rounding direction represented by ROUND. */
|
||||
extern int fesetround __P ((int __round));
|
||||
extern int fesetround __P ((int __rounding_direction));
|
||||
|
||||
|
||||
/* Floating-point environment. */
|
||||
|
1161
math/libm-test.c
1161
math/libm-test.c
File diff suppressed because it is too large
Load Diff
@ -233,8 +233,8 @@ extern int sigwait __P ((__const sigset_t *__set, int *__sig));
|
||||
|
||||
/* Names of the signals. This variable exists only for compatibility.
|
||||
Use `strsignal' instead (see <string.h>). */
|
||||
extern __const char *__const _sys_siglist[NSIG];
|
||||
extern __const char *__const sys_siglist[NSIG];
|
||||
extern __const char *__const _sys_siglist[_NSIG];
|
||||
extern __const char *__const sys_siglist[_NSIG];
|
||||
|
||||
/* Structure passed to `sigvec'. */
|
||||
struct sigvec
|
||||
|
@ -94,10 +94,12 @@ int
|
||||
printf_size (FILE *fp, const struct printf_info *info, const void *const *args)
|
||||
{
|
||||
/* Units for the both formats. */
|
||||
static const char units[2][8] =
|
||||
#define BINARY_UNITS " kmgtpezy"
|
||||
#define DECIMAL_UNITS " KMGTPEZY"
|
||||
static const char units[2][sizeof (BINARY_UNITS)] =
|
||||
{
|
||||
" kmgtpezy", /* For binary format. */
|
||||
" KMGTPEZY" /* For decimal format. */
|
||||
BINARY_UNITS, /* For binary format. */
|
||||
DECIMAL_UNITS /* For decimal format. */
|
||||
};
|
||||
const char *tag = units[isupper (info->spec) != 0];
|
||||
int divisor = isupper (info->spec) ? 1000 : 1024;
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
int
|
||||
__lcong48_r (param, buffer)
|
||||
|
@ -127,7 +127,8 @@ __srandom_r (x, buf)
|
||||
if (buf == NULL || buf->rand_type < TYPE_0 || buf->rand_type > TYPE_4)
|
||||
return -1;
|
||||
|
||||
buf->state[0] = x;
|
||||
/* We must make sure the seed is not 0. Take arbitrarily 1 in this case. */
|
||||
buf->state[0] = x ? x : 1;
|
||||
if (buf->rand_type != TYPE_0)
|
||||
{
|
||||
long int i;
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
int
|
||||
__seed48_r (seed16v, buffer)
|
||||
|
@ -51,9 +51,9 @@ typedef unsigned long int __sigset_t;
|
||||
#ifdef _GNU_SOURCE
|
||||
# define __sigisemptyset(set) (*(set) == (__sigset_t) 0)
|
||||
# define __sigandset(dest, left, right) \
|
||||
((*(set) = (*(left) & *(right))), 0)
|
||||
((*(dest) = (*(left) & *(right))), 0)
|
||||
# define __sigorset(dest, left, right) \
|
||||
((*(set) = (*(left) | *(right))), 0)
|
||||
((*(dest) = (*(left) | *(right))), 0)
|
||||
#endif
|
||||
|
||||
/* These functions needn't check for a bogus signal number -- error
|
||||
|
@ -55,14 +55,14 @@ static inline Elf32_Addr __attribute__ ((unused))
|
||||
elf_machine_load_address (void)
|
||||
{
|
||||
Elf32_Addr addr;
|
||||
asm (" call here\n"
|
||||
"here: popl %0\n"
|
||||
" subl $here, %0"
|
||||
asm (" call .Lhere\n"
|
||||
".Lhere: popl %0\n"
|
||||
" subl $.Lhere, %0"
|
||||
: "=r" (addr));
|
||||
return addr;
|
||||
}
|
||||
/* The `subl' insn above will contain an R_386_32 relocation entry
|
||||
intended to insert the run-time address of the label `here'.
|
||||
intended to insert the run-time address of the label `.Lhere'.
|
||||
This will be the first relocation in the text of the dynamic linker;
|
||||
we skip it to avoid trying to modify read-only text in this early stage. */
|
||||
#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \
|
||||
|
@ -48,9 +48,6 @@ one: .double 1.0
|
||||
ASM_TYPE_DIRECTIVE(limit,@object)
|
||||
limit: .double 0.29
|
||||
ASM_SIZE_DIRECTIVE(limit)
|
||||
ASM_TYPE_DIRECTIVE(nan,@object)
|
||||
nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
|
||||
ASM_SIZE_DIRECTIVE(nan)
|
||||
|
||||
#ifdef PIC
|
||||
#define MO(op) op##@GOTOFF(%ecx)
|
||||
@ -191,8 +188,8 @@ ENTRY(__ieee754_pow)
|
||||
ret
|
||||
|
||||
.align ALIGNARG(4)
|
||||
14: fldl MO(nan)
|
||||
faddl MO(zero) // raise invalid exception
|
||||
14: fldl MO(infinity)
|
||||
fmull MO(zero) // raise invalid exception
|
||||
ret
|
||||
|
||||
.align ALIGNARG(4)
|
||||
|
@ -48,9 +48,6 @@ one: .double 1.0
|
||||
ASM_TYPE_DIRECTIVE(limit,@object)
|
||||
limit: .double 0.29
|
||||
ASM_SIZE_DIRECTIVE(limit)
|
||||
ASM_TYPE_DIRECTIVE(nan,@object)
|
||||
nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
|
||||
ASM_SIZE_DIRECTIVE(nan)
|
||||
|
||||
#ifdef PIC
|
||||
#define MO(op) op##@GOTOFF(%ecx)
|
||||
@ -187,8 +184,8 @@ ENTRY(__ieee754_powf)
|
||||
ret
|
||||
|
||||
.align ALIGNARG(4)
|
||||
14: fldl MO(nan)
|
||||
faddl MO(zero) // raise invalid exception
|
||||
14: fldl MO(infinity)
|
||||
fmull MO(zero) // raise invalid exception
|
||||
ret
|
||||
|
||||
.align ALIGNARG(4)
|
||||
|
@ -48,9 +48,6 @@ one: .double 1.0
|
||||
ASM_TYPE_DIRECTIVE(limit,@object)
|
||||
limit: .double 0.29
|
||||
ASM_SIZE_DIRECTIVE(limit)
|
||||
ASM_TYPE_DIRECTIVE(nan,@object)
|
||||
nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
|
||||
ASM_SIZE_DIRECTIVE(nan)
|
||||
|
||||
#ifdef PIC
|
||||
#define MO(op) op##@GOTOFF(%ecx)
|
||||
@ -191,8 +188,8 @@ ENTRY(__ieee754_powl)
|
||||
ret
|
||||
|
||||
.align ALIGNARG(4)
|
||||
14: fldl MO(nan)
|
||||
faddl MO(zero) // raise invalid exception
|
||||
14: fldl MO(infinity)
|
||||
fmull MO(zero) // raise invalid exception
|
||||
ret
|
||||
|
||||
.align ALIGNARG(4)
|
||||
|
@ -31,7 +31,8 @@ huge_nan_null_null:
|
||||
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
|
||||
.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
|
||||
.double 0.0
|
||||
.double 0.0
|
||||
zero: .double 0.0
|
||||
infinity:
|
||||
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
|
||||
.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
|
||||
.double 0.0
|
||||
@ -90,7 +91,7 @@ ENTRY(__cexp)
|
||||
Check your FPU manual for more information. */
|
||||
andb $0x01, %ah
|
||||
cmpb $0x01, %ah
|
||||
je 2f
|
||||
je 20f
|
||||
|
||||
/* We have finite numbers in the real and imaginary part. Do
|
||||
the real work now. */
|
||||
@ -139,9 +140,8 @@ ENTRY(__cexp)
|
||||
1: fxam /* y : x */
|
||||
fnstsw
|
||||
movb %ah, %dl
|
||||
andb $0x01, %ah /* See above why 0x01 is usable here. */
|
||||
cmpb $0x01, %ah
|
||||
je 3f
|
||||
testb $0x01, %ah /* See above why 0x01 is usable here. */
|
||||
jne 3f
|
||||
|
||||
|
||||
/* The real part is +-Inf and the imaginary part is finite. */
|
||||
@ -220,7 +220,14 @@ ENTRY(__cexp)
|
||||
.align ALIGNARG(4)
|
||||
3: fstp %st(0)
|
||||
fstp %st(0) /* <empty> */
|
||||
movl %edx, %eax
|
||||
andb $0x45, %ah
|
||||
andb $0x47, %dh
|
||||
xorb %dh, %ah
|
||||
jnz 30f
|
||||
fldl MO(infinity) /* Raise invalid exception. */
|
||||
fmull MO(zero)
|
||||
fstp %st(0)
|
||||
30: movl %edx, %eax
|
||||
shrl $5, %edx
|
||||
shll $4, %eax
|
||||
andl $16, %edx
|
||||
@ -236,6 +243,9 @@ ENTRY(__cexp)
|
||||
|
||||
/* The real part is NaN. */
|
||||
.align ALIGNARG(4)
|
||||
20: fldl MO(infinity) /* Raise invalid exception. */
|
||||
fmull MO(zero)
|
||||
fstp %st(0)
|
||||
2: fstp %st(0)
|
||||
fstp %st(0)
|
||||
movl 4(%esp), %eax /* Pointer to memory for result. */
|
||||
|
@ -31,7 +31,8 @@ huge_nan_null_null:
|
||||
.byte 0, 0, 0x80, 0x7f
|
||||
.byte 0, 0, 0xc0, 0x7f
|
||||
.float 0.0
|
||||
.float 0.0
|
||||
zero: .float 0.0
|
||||
infinity:
|
||||
.byte 0, 0, 0x80, 0x7f
|
||||
.byte 0, 0, 0xc0, 0x7f
|
||||
.float 0.0
|
||||
@ -90,7 +91,7 @@ ENTRY(__cexpf)
|
||||
Check your FPU manual for more information. */
|
||||
andb $0x01, %ah
|
||||
cmpb $0x01, %ah
|
||||
je 2f
|
||||
je 20f
|
||||
|
||||
/* We have finite numbers in the real and imaginary part. Do
|
||||
the real work now. */
|
||||
@ -143,9 +144,8 @@ ENTRY(__cexpf)
|
||||
1: fxam /* y : x */
|
||||
fnstsw
|
||||
movb %ah, %dl
|
||||
andb $0x01, %ah /* See above why 0x01 is usable here. */
|
||||
cmpb $0x01, %ah
|
||||
je 3f
|
||||
testb $0x01, %ah /* See above why 0x01 is usable here. */
|
||||
jne 3f
|
||||
|
||||
|
||||
/* The real part is +-Inf and the imaginary part is finite. */
|
||||
@ -222,7 +222,14 @@ ENTRY(__cexpf)
|
||||
.align ALIGNARG(4)
|
||||
3: fstp %st(0)
|
||||
fstp %st(0) /* <empty> */
|
||||
movl %edx, %eax
|
||||
andb $0x45, %ah
|
||||
andb $0x47, %dh
|
||||
xorb %dh, %ah
|
||||
jnz 30f
|
||||
flds MO(infinity) /* Raise invalid exception. */
|
||||
fmuls MO(zero)
|
||||
fstp %st(0)
|
||||
30: movl %edx, %eax
|
||||
shrl $6, %edx
|
||||
shll $3, %eax
|
||||
andl $8, %edx
|
||||
@ -235,6 +242,9 @@ ENTRY(__cexpf)
|
||||
|
||||
/* The real part is NaN. */
|
||||
.align ALIGNARG(4)
|
||||
20: flds MO(infinity) /* Raise invalid exception. */
|
||||
fmuls MO(zero)
|
||||
fstp %st(0)
|
||||
2: fstp %st(0)
|
||||
fstp %st(0)
|
||||
movl MO(huge_nan_null_null+4), %eax
|
||||
|
@ -31,7 +31,8 @@ huge_nan_null_null:
|
||||
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
|
||||
.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
|
||||
.double 0.0
|
||||
.double 0.0
|
||||
zero: .double 0.0
|
||||
infinity:
|
||||
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
|
||||
.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
|
||||
.double 0.0
|
||||
@ -90,7 +91,7 @@ ENTRY(__cexpl)
|
||||
Check your FPU manual for more information. */
|
||||
andb $0x01, %ah
|
||||
cmpb $0x01, %ah
|
||||
je 2f
|
||||
je 20f
|
||||
|
||||
/* We have finite numbers in the real and imaginary part. Do
|
||||
the real work now. */
|
||||
@ -139,9 +140,8 @@ ENTRY(__cexpl)
|
||||
1: fxam /* y : x */
|
||||
fnstsw
|
||||
movb %ah, %dl
|
||||
andb $0x01, %ah /* See above why 0x01 is usable here. */
|
||||
cmpb $0x01, %ah
|
||||
je 3f
|
||||
testb $0x01, %ah /* See above why 0x01 is usable here. */
|
||||
jne 3f
|
||||
|
||||
|
||||
/* The real part is +-Inf and the imaginary part is finite. */
|
||||
@ -220,7 +220,14 @@ ENTRY(__cexpl)
|
||||
.align ALIGNARG(4)
|
||||
3: fstp %st(0)
|
||||
fstp %st(0) /* <empty> */
|
||||
movl %edx, %eax
|
||||
andb $0x45, %ah
|
||||
andb $0x47, %dh
|
||||
xorb %dh, %ah
|
||||
jnz 30f
|
||||
fldl MO(infinity) /* Raise invalid exception. */
|
||||
fmull MO(zero)
|
||||
fstp %st(0)
|
||||
30: movl %edx, %eax
|
||||
shrl $5, %edx
|
||||
shll $4, %eax
|
||||
andl $16, %edx
|
||||
@ -236,6 +243,9 @@ ENTRY(__cexpl)
|
||||
|
||||
/* The real part is NaN. */
|
||||
.align ALIGNARG(4)
|
||||
20: fldl MO(infinity) /* Raise invalid exception. */
|
||||
fmull MO(zero)
|
||||
fstp %st(0)
|
||||
2: fstp %st(0)
|
||||
fstp %st(0)
|
||||
movl 4(%esp), %eax /* Pointer to memory for result. */
|
||||
|
@ -19,6 +19,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
@ -33,16 +34,31 @@ __ccos (__complex__ double x)
|
||||
{
|
||||
__real__ res = __nan ("");
|
||||
__imag__ res = 0.0;
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (__isinf (__real__ x))
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
else if (__isinf (__imag__ x))
|
||||
{
|
||||
__real__ res = HUGE_VAL;
|
||||
__imag__ res = __nan ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (__isinf (__real__ x))
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ res = __nan ("");
|
||||
__imag__ res = __nan ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (isfinite (__imag__ x))
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -19,6 +19,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
@ -33,16 +34,31 @@ __ccosf (__complex__ float x)
|
||||
{
|
||||
__real__ res = __nanf ("");
|
||||
__imag__ res = 0.0;
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (__isinff (__real__ x))
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
else if (__isinff (__imag__ x))
|
||||
{
|
||||
__real__ res = HUGE_VALF;
|
||||
__imag__ res = __nanf ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (__isinff (__real__ x))
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ res = __nanf ("");
|
||||
__imag__ res = __nanf ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (isfinite (__imag__ x))
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -19,6 +19,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "math_private.h"
|
||||
@ -39,18 +40,24 @@ __ccosh (__complex__ double x)
|
||||
if (icls >= FP_ZERO)
|
||||
{
|
||||
/* Imaginary part is finite. */
|
||||
double sinh_val = __ieee754_sinh (__real__ x);
|
||||
double cosh_val = __ieee754_cosh (__real__ x);
|
||||
double sinix, cosix;
|
||||
|
||||
__sincos (__imag__ x, &sinix, &cosix);
|
||||
|
||||
__real__ retval = cosh_val * cosix;
|
||||
__imag__ retval = cosh_val * sinix;
|
||||
__imag__ retval = sinh_val * sinix;
|
||||
}
|
||||
else
|
||||
{
|
||||
__imag__ retval = __real__ x == 0.0 ? 0.0 : __nan ("");
|
||||
__real__ retval = __nan ("") + __nan ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (icls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (rcls == FP_INFINITE)
|
||||
@ -77,6 +84,11 @@ __ccosh (__complex__ double x)
|
||||
/* The addition raises the invalid exception. */
|
||||
__real__ retval = HUGE_VAL;
|
||||
__imag__ retval = __nan ("") + __nan ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (icls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -19,6 +19,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "math_private.h"
|
||||
@ -39,18 +40,24 @@ __ccoshf (__complex__ float x)
|
||||
if (icls >= FP_ZERO)
|
||||
{
|
||||
/* Imaginary part is finite. */
|
||||
float sinh_val = __ieee754_sinhf (__real__ x);
|
||||
float cosh_val = __ieee754_coshf (__real__ x);
|
||||
float sinix, cosix;
|
||||
|
||||
__sincosf (__imag__ x, &sinix, &cosix);
|
||||
|
||||
__real__ retval = cosh_val * cosix;
|
||||
__imag__ retval = cosh_val * sinix;
|
||||
__imag__ retval = sinh_val * sinix;
|
||||
}
|
||||
else
|
||||
{
|
||||
__imag__ retval = __real__ x == 0.0 ? 0.0 : __nanf ("");
|
||||
__real__ retval = __nanf ("") + __nanf ("");
|
||||
__real__ retval = __nanf ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (icls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (rcls == FP_INFINITE)
|
||||
@ -77,6 +84,11 @@ __ccoshf (__complex__ float x)
|
||||
/* The addition raises the invalid exception. */
|
||||
__real__ retval = HUGE_VALF;
|
||||
__imag__ retval = __nanf ("") + __nanf ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (icls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -19,6 +19,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "math_private.h"
|
||||
@ -39,18 +40,24 @@ __ccoshl (__complex__ long double x)
|
||||
if (icls >= FP_ZERO)
|
||||
{
|
||||
/* Imaginary part is finite. */
|
||||
long double sinh_val = __ieee754_sinhl (__real__ x);
|
||||
long double cosh_val = __ieee754_coshl (__real__ x);
|
||||
long double sinix, cosix;
|
||||
|
||||
__sincosl (__imag__ x, &sinix, &cosix);
|
||||
|
||||
__real__ retval = cosh_val * cosix;
|
||||
__imag__ retval = cosh_val * sinix;
|
||||
__imag__ retval = sinh_val * sinix;
|
||||
}
|
||||
else
|
||||
{
|
||||
__imag__ retval = __real__ x == 0.0 ? 0.0 : __nanl ("");
|
||||
__real__ retval = __nanl ("") + __nanl ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (icls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (rcls == FP_INFINITE)
|
||||
@ -77,6 +84,11 @@ __ccoshl (__complex__ long double x)
|
||||
/* The addition raises the invalid exception. */
|
||||
__real__ retval = HUGE_VALL;
|
||||
__imag__ retval = __nanl ("") + __nanl ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (icls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -19,6 +19,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
@ -33,16 +34,31 @@ __ccosl (__complex__ long double x)
|
||||
{
|
||||
__real__ res = __nanl ("");
|
||||
__imag__ res = 0.0;
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (__isinfl (__real__ x))
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
else if (__isinfl (__imag__ x))
|
||||
{
|
||||
__real__ res = HUGE_VALL;
|
||||
__imag__ res = __nanl ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (__isinfl (__real__ x))
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ res = __nanl ("");
|
||||
__imag__ res = __nanl ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (isfinite (__imag__ x))
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -19,6 +19,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "math_private.h"
|
||||
@ -59,6 +60,10 @@ __cexpf (__complex__ float x)
|
||||
is not +-inf the result is NaN + iNaN. */
|
||||
__real__ retval = __nanf ("");
|
||||
__imag__ retval = __nanf ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (rcls == FP_INFINITE)
|
||||
@ -89,6 +94,11 @@ __cexpf (__complex__ float x)
|
||||
{
|
||||
__real__ retval = HUGE_VALF;
|
||||
__imag__ retval = __nanf ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (icls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -101,6 +111,11 @@ __cexpf (__complex__ float x)
|
||||
/* If the real part is NaN the result is NaN + iNaN. */
|
||||
__real__ retval = __nanf ("");
|
||||
__imag__ retval = __nanf ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (rcls != FP_NAN || icls != FP_NAN)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
@ -19,6 +19,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "math_private.h"
|
||||
@ -59,6 +60,10 @@ __cexpl (__complex__ long double x)
|
||||
is not +-inf the result is NaN + iNaN. */
|
||||
__real__ retval = __nanl ("");
|
||||
__imag__ retval = __nanl ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (rcls == FP_INFINITE)
|
||||
@ -89,6 +94,11 @@ __cexpl (__complex__ long double x)
|
||||
{
|
||||
__real__ retval = HUGE_VALL;
|
||||
__imag__ retval = __nanl ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (icls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -101,6 +111,11 @@ __cexpl (__complex__ long double x)
|
||||
/* If the real part is NaN the result is NaN + iNaN. */
|
||||
__real__ retval = __nanl ("");
|
||||
__imag__ retval = __nanl ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (rcls != FP_NAN || icls != FP_NAN)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
@ -27,7 +27,7 @@ __cproj (__complex__ double x)
|
||||
{
|
||||
__complex__ double res;
|
||||
|
||||
if (!finite (__real__ x) || !finite (__imag__ x))
|
||||
if (!isfinite (__real__ x) || !isfinite (__imag__ x))
|
||||
{
|
||||
__real__ res = INFINITY;
|
||||
__imag__ res = __copysign (0.0, __imag__ x);
|
||||
|
@ -27,7 +27,7 @@ __cprojf (__complex__ float x)
|
||||
{
|
||||
__complex__ float res;
|
||||
|
||||
if (!finite (__real__ x) || !finite (__imag__ x))
|
||||
if (!isfinite (__real__ x) || !isfinite (__imag__ x))
|
||||
{
|
||||
__real__ res = INFINITY;
|
||||
__imag__ res = __copysignf (0.0, __imag__ x);
|
||||
|
@ -27,7 +27,7 @@ __cprojl (__complex__ long double x)
|
||||
{
|
||||
__complex__ long double res;
|
||||
|
||||
if (!finite (__real__ x) || !finite (__imag__ x))
|
||||
if (!isfinite (__real__ x) || !isfinite (__imag__ x))
|
||||
{
|
||||
__real__ res = INFINITY;
|
||||
__imag__ res = __copysignl (0.0, __imag__ x);
|
||||
|
@ -19,46 +19,110 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "math_private.h"
|
||||
|
||||
|
||||
__complex__ double
|
||||
__csin (__complex__ double x)
|
||||
{
|
||||
__complex__ double res;
|
||||
__complex__ double retval;
|
||||
int negate = signbit (__real__ x);
|
||||
int rcls = fpclassify (__real__ x);
|
||||
int icls = fpclassify (__imag__ x);
|
||||
|
||||
if (!isfinite (__real__ x) || isnan (__imag__ x))
|
||||
__real__ x = fabs (__real__ x);
|
||||
|
||||
if (icls >= FP_ZERO)
|
||||
{
|
||||
if (__real__ x == 0.0 || __imag__ x == 0.0)
|
||||
/* Imaginary part is finite. */
|
||||
if (rcls >= FP_ZERO)
|
||||
{
|
||||
__real__ res = __nan ("");
|
||||
__imag__ res = 0.0;
|
||||
}
|
||||
else if (__isinf (__imag__ x))
|
||||
{
|
||||
__real__ res = __nan ("");
|
||||
__imag__ res = __imag__ x;
|
||||
/* Real part is finite. */
|
||||
double sinh_val = __ieee754_sinh (__imag__ x);
|
||||
double cosh_val = __ieee754_cosh (__imag__ x);
|
||||
double sinix, cosix;
|
||||
|
||||
__sincos (__real__ x, &sinix, &cosix);
|
||||
|
||||
__real__ retval = cosh_val * sinix;
|
||||
__imag__ retval = sinh_val * cosix;
|
||||
|
||||
if (negate)
|
||||
__real__ retval = -__real__ retval;
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ res = __nan ("");
|
||||
__imag__ res = __nan ("");
|
||||
if (icls == FP_ZERO)
|
||||
{
|
||||
/* Imaginary part is 0.0. */
|
||||
__real__ retval = __nan ("");
|
||||
__imag__ retval = __imag__ x;
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (rcls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ retval = __nan ("");
|
||||
__imag__ retval = __nan ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (icls == FP_INFINITE)
|
||||
{
|
||||
/* Imaginary part is infinite. */
|
||||
if (rcls == FP_ZERO)
|
||||
{
|
||||
/* Real part is 0.0. */
|
||||
__real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
|
||||
__imag__ retval = __imag__ x;
|
||||
}
|
||||
else if (rcls > FP_ZERO)
|
||||
{
|
||||
/* Real part is finite. */
|
||||
double sinix, cosix;
|
||||
|
||||
__sincos (__real__ x, &sinix, &cosix);
|
||||
|
||||
__real__ retval = __copysign (HUGE_VAL, sinix);
|
||||
__imag__ retval = __copysign (HUGE_VAL, cosix);
|
||||
|
||||
if (negate)
|
||||
__real__ retval = -__real__ retval;
|
||||
if (signbit (__imag__ x))
|
||||
__imag__ retval = -__imag__ retval;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The addition raises the invalid exception. */
|
||||
__real__ retval = __nan ("");
|
||||
__imag__ retval = HUGE_VAL;
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (rcls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__complex__ double y;
|
||||
|
||||
__real__ y = -__imag__ x;
|
||||
__imag__ y = __real__ x;
|
||||
|
||||
y = __csinh (y);
|
||||
|
||||
__real__ res = __imag__ y;
|
||||
__imag__ res = -__real__ y;
|
||||
if (rcls == FP_ZERO)
|
||||
__real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
|
||||
else
|
||||
__real__ retval = __nan ("");
|
||||
__imag__ retval = __nan ("");
|
||||
}
|
||||
|
||||
return res;
|
||||
return retval;
|
||||
}
|
||||
weak_alias (__csin, csin)
|
||||
#ifdef NO_LONG_DOUBLE
|
||||
|
@ -19,45 +19,109 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "math_private.h"
|
||||
|
||||
|
||||
__complex__ float
|
||||
__csinf (__complex__ float x)
|
||||
{
|
||||
__complex__ float res;
|
||||
__complex__ float retval;
|
||||
int negate = signbit (__real__ x);
|
||||
int rcls = fpclassify (__real__ x);
|
||||
int icls = fpclassify (__imag__ x);
|
||||
|
||||
if (!isfinite (__real__ x) || isnan (__imag__ x))
|
||||
__real__ x = fabsf (__real__ x);
|
||||
|
||||
if (icls >= FP_ZERO)
|
||||
{
|
||||
if (__real__ x == 0.0 || __imag__ x == 0.0)
|
||||
/* Imaginary part is finite. */
|
||||
if (rcls >= FP_ZERO)
|
||||
{
|
||||
__real__ res = __nanf ("");
|
||||
__imag__ res = 0.0;
|
||||
}
|
||||
else if (__isinff (__imag__ x))
|
||||
{
|
||||
__real__ res = __nanf ("");
|
||||
__imag__ res = __imag__ x;
|
||||
/* Real part is finite. */
|
||||
float sinh_val = __ieee754_sinhf (__imag__ x);
|
||||
float cosh_val = __ieee754_coshf (__imag__ x);
|
||||
float sinix, cosix;
|
||||
|
||||
__sincosf (__real__ x, &sinix, &cosix);
|
||||
|
||||
__real__ retval = cosh_val * sinix;
|
||||
__imag__ retval = sinh_val * cosix;
|
||||
|
||||
if (negate)
|
||||
__real__ retval = -__real__ retval;
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ res = __nanf ("");
|
||||
__imag__ res = __nanf ("");
|
||||
if (icls == FP_ZERO)
|
||||
{
|
||||
/* Imaginary part is 0.0. */
|
||||
__real__ retval = __nanf ("");
|
||||
__imag__ retval = __imag__ x;
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (rcls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ retval = __nanf ("");
|
||||
__imag__ retval = __nanf ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (icls == FP_INFINITE)
|
||||
{
|
||||
/* Imaginary part is infinite. */
|
||||
if (rcls == FP_ZERO)
|
||||
{
|
||||
/* Real part is 0.0. */
|
||||
__real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
|
||||
__imag__ retval = __imag__ x;
|
||||
}
|
||||
else if (rcls > FP_ZERO)
|
||||
{
|
||||
/* Real part is finite. */
|
||||
float sinix, cosix;
|
||||
|
||||
__sincosf (__real__ x, &sinix, &cosix);
|
||||
|
||||
__real__ retval = __copysignf (HUGE_VALF, sinix);
|
||||
__imag__ retval = __copysignf (HUGE_VALF, cosix);
|
||||
|
||||
if (negate)
|
||||
__real__ retval = -__real__ retval;
|
||||
if (signbit (__imag__ x))
|
||||
__imag__ retval = -__imag__ retval;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The addition raises the invalid exception. */
|
||||
__real__ retval = __nanf ("");
|
||||
__imag__ retval = HUGE_VALF;
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (rcls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__complex__ float y;
|
||||
|
||||
__real__ y = -__imag__ x;
|
||||
__imag__ y = __real__ x;
|
||||
|
||||
y = __csinhf (y);
|
||||
|
||||
__real__ res = __imag__ y;
|
||||
__imag__ res = -__real__ y;
|
||||
if (rcls == FP_ZERO)
|
||||
__real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
|
||||
else
|
||||
__real__ retval = __nanf ("");
|
||||
__imag__ retval = __nanf ("");
|
||||
}
|
||||
|
||||
return res;
|
||||
return retval;
|
||||
}
|
||||
weak_alias (__csinf, csinf)
|
||||
|
@ -19,6 +19,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "math_private.h"
|
||||
@ -41,12 +42,13 @@ __csinh (__complex__ double x)
|
||||
{
|
||||
/* Imaginary part is finite. */
|
||||
double sinh_val = __ieee754_sinh (__real__ x);
|
||||
double cosh_val = __ieee754_cosh (__real__ x);
|
||||
double sinix, cosix;
|
||||
|
||||
__sincos (__imag__ x, &sinix, &cosix);
|
||||
|
||||
__real__ retval = sinh_val * cosix;
|
||||
__imag__ retval = sinh_val * sinix;
|
||||
__imag__ retval = cosh_val * sinix;
|
||||
|
||||
if (negate)
|
||||
__real__ retval = -__real__ retval;
|
||||
@ -58,11 +60,20 @@ __csinh (__complex__ double x)
|
||||
/* Real part is 0.0. */
|
||||
__real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
|
||||
__imag__ retval = __nan ("") + __nan ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (icls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ retval = __nan ("");
|
||||
__imag__ retval = __nan ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -93,6 +104,11 @@ __csinh (__complex__ double x)
|
||||
/* The addition raises the invalid exception. */
|
||||
__real__ retval = HUGE_VAL;
|
||||
__imag__ retval = __nan ("") + __nan ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (icls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -19,6 +19,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "math_private.h"
|
||||
@ -41,12 +42,13 @@ __csinhf (__complex__ float x)
|
||||
{
|
||||
/* Imaginary part is finite. */
|
||||
float sinh_val = __ieee754_sinhf (__real__ x);
|
||||
float cosh_val = __ieee754_coshf (__real__ x);
|
||||
float sinix, cosix;
|
||||
|
||||
__sincosf (__imag__ x, &sinix, &cosix);
|
||||
|
||||
__real__ retval = sinh_val * cosix;
|
||||
__imag__ retval = sinh_val * sinix;
|
||||
__imag__ retval = cosh_val * sinix;
|
||||
|
||||
if (negate)
|
||||
__real__ retval = -__real__ retval;
|
||||
@ -58,11 +60,20 @@ __csinhf (__complex__ float x)
|
||||
/* Real part is 0.0. */
|
||||
__real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
|
||||
__imag__ retval = __nanf ("") + __nanf ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (icls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ retval = __nanf ("");
|
||||
__imag__ retval = __nanf ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -93,6 +104,11 @@ __csinhf (__complex__ float x)
|
||||
/* The addition raises the invalid exception. */
|
||||
__real__ retval = HUGE_VALF;
|
||||
__imag__ retval = __nanf ("") + __nanf ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (icls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -41,12 +41,13 @@ __csinhl (__complex__ long double x)
|
||||
{
|
||||
/* Imaginary part is finite. */
|
||||
long double sinh_val = __ieee754_sinhl (__real__ x);
|
||||
long double cosh_val = __ieee754_coshl (__real__ x);
|
||||
long double sinix, cosix;
|
||||
|
||||
__sincosl (__imag__ x, &sinix, &cosix);
|
||||
|
||||
__real__ retval = sinh_val * cosix;
|
||||
__imag__ retval = sinh_val * sinix;
|
||||
__imag__ retval = cosh_val * sinix;
|
||||
|
||||
if (negate)
|
||||
__real__ retval = -__real__ retval;
|
||||
@ -58,11 +59,20 @@ __csinhl (__complex__ long double x)
|
||||
/* Real part is 0.0. */
|
||||
__real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
|
||||
__imag__ retval = __nanl ("") + __nanl ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (icls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ retval = __nanl ("");
|
||||
__imag__ retval = __nanl ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -93,6 +103,11 @@ __csinhl (__complex__ long double x)
|
||||
/* The addition raises the invalid exception. */
|
||||
__real__ retval = HUGE_VALL;
|
||||
__imag__ retval = __nanl ("") + __nanl ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (icls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -19,45 +19,109 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "math_private.h"
|
||||
|
||||
|
||||
__complex__ long double
|
||||
__csinl (__complex__ long double x)
|
||||
{
|
||||
__complex__ long double res;
|
||||
__complex__ long double retval;
|
||||
int negate = signbit (__real__ x);
|
||||
int rcls = fpclassify (__real__ x);
|
||||
int icls = fpclassify (__imag__ x);
|
||||
|
||||
if (!isfinite (__real__ x) || isnan (__imag__ x))
|
||||
__real__ x = fabsl (__real__ x);
|
||||
|
||||
if (icls >= FP_ZERO)
|
||||
{
|
||||
if (__real__ x == 0.0 || __imag__ x == 0.0)
|
||||
/* Imaginary part is finite. */
|
||||
if (rcls >= FP_ZERO)
|
||||
{
|
||||
__real__ res = __nanl ("");
|
||||
__imag__ res = 0.0;
|
||||
}
|
||||
else if (__isinfl (__imag__ x))
|
||||
{
|
||||
__real__ res = __nanl ("");
|
||||
__imag__ res = __imag__ x;
|
||||
/* Real part is finite. */
|
||||
long double sinh_val = __ieee754_sinhl (__imag__ x);
|
||||
long double cosh_val = __ieee754_coshl (__imag__ x);
|
||||
long double sinix, cosix;
|
||||
|
||||
__sincosl (__real__ x, &sinix, &cosix);
|
||||
|
||||
__real__ retval = cosh_val * sinix;
|
||||
__imag__ retval = sinh_val * cosix;
|
||||
|
||||
if (negate)
|
||||
__real__ retval = -__real__ retval;
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ res = __nanl ("");
|
||||
__imag__ res = __nanl ("");
|
||||
if (icls == FP_ZERO)
|
||||
{
|
||||
/* Imaginary part is 0.0. */
|
||||
__real__ retval = __nanl ("");
|
||||
__imag__ retval = __imag__ x;
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (rcls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ retval = __nanl ("");
|
||||
__imag__ retval = __nanl ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (icls == FP_INFINITE)
|
||||
{
|
||||
/* Imaginary part is infinite. */
|
||||
if (rcls == FP_ZERO)
|
||||
{
|
||||
/* Real part is 0.0. */
|
||||
__real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
|
||||
__imag__ retval = __imag__ x;
|
||||
}
|
||||
else if (rcls > FP_ZERO)
|
||||
{
|
||||
/* Real part is finite. */
|
||||
long double sinix, cosix;
|
||||
|
||||
__sincosl (__real__ x, &sinix, &cosix);
|
||||
|
||||
__real__ retval = __copysignl (HUGE_VALL, sinix);
|
||||
__imag__ retval = __copysignl (HUGE_VALL, cosix);
|
||||
|
||||
if (negate)
|
||||
__real__ retval = -__real__ retval;
|
||||
if (signbit (__imag__ x))
|
||||
__imag__ retval = -__imag__ retval;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The addition raises the invalid exception. */
|
||||
__real__ retval = __nanl ("");
|
||||
__imag__ retval = HUGE_VALL;
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (rcls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__complex__ long double y;
|
||||
|
||||
__real__ y = -__imag__ x;
|
||||
__imag__ y = __real__ x;
|
||||
|
||||
y = __csinhl (y);
|
||||
|
||||
__real__ res = __imag__ y;
|
||||
__imag__ res = -__real__ y;
|
||||
if (rcls == FP_ZERO)
|
||||
__real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
|
||||
else
|
||||
__real__ retval = __nanl ("");
|
||||
__imag__ retval = __nanl ("");
|
||||
}
|
||||
|
||||
return res;
|
||||
return retval;
|
||||
}
|
||||
weak_alias (__csinl, csinl)
|
||||
|
@ -19,6 +19,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "math_private.h"
|
||||
@ -44,6 +45,11 @@ __ctanh (__complex__ double x)
|
||||
{
|
||||
__real__ res = __nan ("");
|
||||
__imag__ res = __nan ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (__isinf (__imag__ x))
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -19,6 +19,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "math_private.h"
|
||||
@ -44,6 +45,11 @@ __ctanhf (__complex__ float x)
|
||||
{
|
||||
__real__ res = __nanf ("");
|
||||
__imag__ res = __nanf ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (__isinff (__imag__ x))
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -19,6 +19,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <complex.h>
|
||||
#include <fenv.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "math_private.h"
|
||||
@ -44,6 +45,11 @@ __ctanhl (__complex__ long double x)
|
||||
{
|
||||
__real__ res = __nanl ("");
|
||||
__imag__ res = __nanl ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (__isinfl (__imag__ x))
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
3
sysdeps/stub/abi-tag.h
Normal file
3
sysdeps/stub/abi-tag.h
Normal file
@ -0,0 +1,3 @@
|
||||
#error must define an ABI tag for this port
|
||||
|
||||
#define ABI_TAG 0xff123abc
|
16
sysdeps/unix/sysv/linux/abi-tag.h
Normal file
16
sysdeps/unix/sysv/linux/abi-tag.h
Normal file
@ -0,0 +1,16 @@
|
||||
/* Define the GNU ABI tag for the Linux kernel we need.
|
||||
The is a 4-byte quantity in native byte order:
|
||||
the high byte is 0 to indicate Linux;
|
||||
the low three bytes are the LINUX_VERSION_CODE for the earliest
|
||||
compatible Linux kernel. */
|
||||
|
||||
#define ABI_LINUX_TAG 0
|
||||
|
||||
#define ABI_LINUX_MAJOR 2
|
||||
#define ABI_LINUX_MINOR 0
|
||||
#define ABI_LINUX_PATCH 0
|
||||
|
||||
#define ABI_TAG ((ABI_LINUX_TAG << 24) | \
|
||||
(ABI_LINUX_MAJOR << 16) | \
|
||||
(ABI_LINUX_MINOR << 8) | \
|
||||
(ABI_LINUX_PATCH << 0))
|
@ -44,7 +44,7 @@ ENTRY(__clone)
|
||||
|
||||
/* Do the system call */
|
||||
mov a0,pv /* get fn ptr out of the way */
|
||||
mov a3,a4 /* get fn arg out of the way */
|
||||
mov a3,t0 /* get fn arg out of the way */
|
||||
mov a2,a0
|
||||
ldiq v0,__NR_clone
|
||||
call_pal PAL_callsys
|
||||
@ -74,7 +74,7 @@ thread_start:
|
||||
.prologue 0
|
||||
|
||||
/* Call the user's function */
|
||||
mov a4,a0
|
||||
mov t0,a0
|
||||
jsr ra,(pv)
|
||||
ldgp gp,0(ra)
|
||||
|
||||
|
@ -56,12 +56,12 @@ struct in6_rtmsg
|
||||
struct in6_addr rtmsg_dst;
|
||||
struct in6_addr rtmsg_src;
|
||||
struct in6_addr rtmsg_gateway;
|
||||
unsigned long int rtmsg_type;
|
||||
unsigned short int rtmsg_dst_len;
|
||||
unsigned short int rtmsg_src_len;
|
||||
unsigned long int rtmsg_metric;
|
||||
u_int32_t rtmsg_type;
|
||||
u_int16_t rtmsg_dst_len;
|
||||
u_int16_t rtmsg_src_len;
|
||||
u_int32_t rtmsg_metric;
|
||||
unsigned long int rtmsg_info;
|
||||
unsigned long int rtmsg_flags;
|
||||
u_int32_t rtmsg_flags;
|
||||
int rtmsg_ifindex;
|
||||
};
|
||||
|
||||
|
@ -41,14 +41,14 @@
|
||||
* flags and num_*_ports are stored in host byte order (of course).
|
||||
* Port numbers are stored in HOST byte order.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _NETINET_FW_H
|
||||
#define _NETINET_FW_H
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <netinet/icmp.h>
|
||||
#include <netinet/ip_icmp.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <netinet/tcp.h>
|
||||
@ -107,11 +107,11 @@ struct ip_fw {
|
||||
|
||||
#define IP_FW_F_MASK 0x3FFF /* All possible flag bits mask */
|
||||
|
||||
/*
|
||||
/*
|
||||
* New IP firewall options for [gs]etsockopt at the RAW IP level.
|
||||
* Unlike BSD Linux inherits IP options so you don't have to use
|
||||
* a raw socket for this. Instead we check rights in the calls.
|
||||
*/
|
||||
*/
|
||||
|
||||
#define IP_FW_BASE_CTL 64 /* base for firewall socket options */
|
||||
|
||||
@ -181,7 +181,7 @@ struct ip_fwpkt
|
||||
*/
|
||||
|
||||
struct ip_fw_masq;
|
||||
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _NETINET_IP_FW_H */
|
||||
|
@ -175,6 +175,7 @@ localtime_r (t, tp)
|
||||
/* Some systems lack the `memset' function and we don't want to
|
||||
introduce additional dependencies. */
|
||||
static const char spaces[16] = " ";
|
||||
static const char zeroes[16] = "0000000000000000";
|
||||
|
||||
# define memset_space(P, Len) \
|
||||
do { \
|
||||
@ -189,11 +190,26 @@ static const char spaces[16] = " ";
|
||||
} \
|
||||
while (_len > 0); \
|
||||
} while (0)
|
||||
|
||||
# define memset_zero(P, Len) \
|
||||
do { \
|
||||
int _len = (Len); \
|
||||
\
|
||||
do \
|
||||
{ \
|
||||
int _this = _len > 16 ? 16 : _len; \
|
||||
memcpy ((P), zeroes, _this); \
|
||||
(P) += _this; \
|
||||
_len -= _this; \
|
||||
} \
|
||||
while (_len > 0); \
|
||||
} while (0)
|
||||
#else
|
||||
# define memset_space(P, Len) (memset ((P), ' ', (Len)), (P) += (Len))
|
||||
# define memset_zero(P, Len) (memset ((P), '0', (Len)), (P) += (Len))
|
||||
#endif
|
||||
|
||||
#define add(n, f) \
|
||||
#define add(n, f) \
|
||||
do \
|
||||
{ \
|
||||
int _n = (n); \
|
||||
@ -204,7 +220,12 @@ static const char spaces[16] = " ";
|
||||
if (p) \
|
||||
{ \
|
||||
if (_delta > 0) \
|
||||
memset_space (p, _delta); \
|
||||
{ \
|
||||
if (pad == '0') \
|
||||
memset_zero (p, _delta); \
|
||||
else \
|
||||
memset_space (p, _delta); \
|
||||
} \
|
||||
f; \
|
||||
p += _n; \
|
||||
} \
|
||||
|
@ -377,7 +377,7 @@ strptime_internal (buf, format, tm, decided)
|
||||
case 'I':
|
||||
/* Match hour in 12-hour clock. */
|
||||
get_number (1, 12);
|
||||
tm->tm_hour = val - 1;
|
||||
tm->tm_hour = val % 12;
|
||||
have_I = 1;
|
||||
break;
|
||||
case 'j':
|
||||
|
Loading…
Reference in New Issue
Block a user