This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
R: complex functions documentation
- From: Marco Atzeri <marco_atzeri at yahoo dot it>
- To: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Wed, 13 Oct 2010 07:47:00 +0100 (BST)
- Subject: R: complex functions documentation
--- Mar 12/10/10, Marco Atzeri ha scritto:
> >
> > pdf documentation build fines, but I just discovered
> that
> > info and html don't.
> >
> > targetdep.tex:220: `Complex' has no Up field (perhaps
> > incorrect sectioning?).
> >
> > Marco
> >
>
> additional path to solve the info build.
>
> Is it normal that libc.info and libm.info
> are built in the source tree instead of the build tree ?
>
> Marco
>
I forgot one tiny piece so please find here the
complete full patch, that replace the previous ones
Changelog:
* libm/Makefile.am: added complex functions documentation
* libm/libm.texinfo: ditto
* libm/complex/Makefile.am: Ditto
* libm/complex/complex.tex: Ditto
* libm/complex/(cabs.c, cacos.c, cacosh.c, carg.c,
casin.c, casinh.c, catan.c, catanh.c, ccos.c, ccosh.c,
cexp.c, cimag.c, clog.c, conj.c, cpow.c, cproj.c, creal.c,
csin.c, csinh.c, csqrt.c, ctan.c, ctanh.c): Ditto
* libm/Makefile.in: Regenerate
* libm/complex/Makefile.in: Ditto
Regards
Marco
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/Makefile.am src_new/newlib/libm/Makefile.am
--- src/newlib/libm/Makefile.am 2010-10-08 20:25:16.468750000 +0200
+++ src_new/newlib/libm/Makefile.am 2010-10-11 15:52:48.464140400 +0200
@@ -39,7 +39,7 @@
libm_TEXINFOS = targetdep.tex
-libm.dvi: targetdep.tex math/stmp-def
+libm.dvi: targetdep.tex math/stmp-def complex/stmp-def
stmp-targetdep: force
rm -f tmp.texi
@@ -56,6 +56,8 @@
math/stmp-def: stmp-targetdep ; @true
+complex/stmp-def: stmp-targetdep ; @true
+
.PHONY: force
force:
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/Makefile.am src_new/newlib/libm/complex/Makefile.am
--- src/newlib/libm/complex/Makefile.am 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/Makefile.am 2010-10-11 15:56:46.718714800 +0200
@@ -32,7 +32,12 @@
include $(srcdir)/../../Makefile.shared
-chobj =
+chobj = cabs.def cacos.def cacosh.def carg.def \
+ casin.def casinh.def catan.def catanh.def \
+ ccos.def ccosh.def cexp.def cimag.def clog.def \
+ conj.def cpow.def cproj.def creal.def \
+ csin.def csinh.def csqrt.def ctan.def ctanh.def
+
SUFFIXES = .def
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/cabs.c src_new/newlib/libm/complex/cabs.c
--- src/newlib/libm/complex/cabs.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/cabs.c 2010-10-12 15:12:14.513115600 +0200
@@ -8,6 +8,40 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<cabs>>, <<cabsf>>---complex absolute-value
+
+INDEX
+ cabs
+INDEX
+ cabsf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double cabs(double complex <[z]>);
+ float cabsf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute compute the complex absolute value
+ (also called norm, modulus, or magnitude) of <[z]>.
+
+ <<cabsf>> is identical to <<cabs>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ The cabs functions return the complex absolute value.
+
+PORTABILITY
+ <<cabs>> and <<cabsf>> are ISO C99
+
+QUICKREF
+ <<cabs>> and <<cabsf>> are ISO C99
+
+*/
+
+
#include <complex.h>
#include <math.h>
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/cacos.c src_new/newlib/libm/complex/cacos.c
--- src/newlib/libm/complex/cacos.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/cacos.c 2010-10-12 15:15:09.688353900 +0200
@@ -32,6 +32,48 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<cacos>>, <<cacosf>>---complex arc cosine
+
+INDEX
+ cacos
+INDEX
+ cacosf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex cacos(double complex <[z]>);
+ float complex cacosf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the complex arc cosine of <[z]>,
+ with branch cuts outside the interval [-1, +1] along the real axis.
+
+ <<cacosf>> is identical to <<cacos>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ @ifnottex
+ These functions return the complex arc cosine value, in the range
+ of a strip mathematically unbounded along the imaginary axis
+ and in the interval [0, pi] along the real axis.
+ @end ifnottex
+ @tex
+ These functions return the complex arc cosine value, in the range
+ of a strip mathematically unbounded along the imaginary axis
+ and in the interval [<<0>>, $\pi$] along the real axis.
+ @end tex
+
+PORTABILITY
+ <<cacos>> and <<cacosf>> are ISO C99
+
+QUICKREF
+ <<cacos>> and <<cacosf>> are ISO C99
+
+*/
+
#include <complex.h>
#include <math.h>
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/cacosh.c src_new/newlib/libm/complex/cacosh.c
--- src/newlib/libm/complex/cacosh.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/cacosh.c 2010-10-12 15:17:04.471807700 +0200
@@ -32,6 +32,51 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<cacosh>>, <<cacoshf>>---complex arc hyperbolic cosine
+
+INDEX
+ cacosh
+INDEX
+ cacoshf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex cacosh(double complex <[z]>);
+ float complex cacoshf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the complex arc hyperbolic cosine of <[z]>,
+ with a branch cut at values less than 1 along the real axis.
+
+ <<cacoshf>> is identical to <<cacosh>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ @ifnottex
+ These functions return the complex arc hyperbolic cosine value,
+ in the range of a half-strip of non-negative values along the
+ real axis and in the interval [-i * pi, +i * pi] along the
+ imaginary axis.
+ @end ifnottex
+ @tex
+ These functions return the complex arc hyperbolic cosine value,
+ in the range of a half-strip of non-negative values along the
+ real axis and in the interval [$-i\pi$, $+i\pi$] along the
+ imaginary axis.
+ @end tex
+
+PORTABILITY
+ <<cacosh>> and <<cacoshf>> are ISO C99
+
+QUICKREF
+ <<cacosh>> and <<cacoshf>> are ISO C99
+
+*/
+
+
#include <complex.h>
double complex
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/carg.c src_new/newlib/libm/complex/carg.c
--- src/newlib/libm/complex/carg.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/carg.c 2010-10-12 15:18:02.332293600 +0200
@@ -8,6 +8,46 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<carg>>, <<cargf>>---argument (phase angle)
+
+INDEX
+ carg
+INDEX
+ cargf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double carg(double complex <[z]>);
+ float cargf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the argument (also called phase angle)
+ of <[z]>, with a branch cut along the negative real axis.
+
+ <<cargf>> is identical to <<carg>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ @ifnottex
+ The carg functions return the value of the argument in the
+ interval [-pi, +pi]
+ @end ifnottex
+ @tex
+ The carg functions return the value of the argument in the
+ interval [$-\pi$, $+\pi$]
+ @end tex
+
+PORTABILITY
+ <<carg>> and <<cargf>> are ISO C99
+
+QUICKREF
+ <<carg>> and <<cargf>> are ISO C99
+
+*/
+
#include <complex.h>
#include <math.h>
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/casin.c src_new/newlib/libm/complex/casin.c
--- src/newlib/libm/complex/casin.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/casin.c 2010-10-12 15:19:04.380359900 +0200
@@ -32,6 +32,49 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<casin>>, <<casinf>>---complex arc sine
+
+INDEX
+ casin
+INDEX
+ casinf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex casin(double complex <[z]>);
+ float complex casinf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the complex arc sine of <[z]>,
+ with branch cuts outside the interval [-1, +1] along the real axis.
+
+ <<casinf>> is identical to <<casin>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ @ifnottex
+ These functions return the complex arc sine value, in the range
+ of a strip mathematically unbounded along the imaginary axis
+ and in the interval [-pi/2, +pi/2] along the real axis.
+ @end ifnottex
+ @tex
+ These functions return the complex arc sine value, in the range
+ of a strip mathematically unbounded along the imaginary axis
+ and in the interval [$-\pi/2$, $+\pi/2$] along the real axis.
+ @end tex
+
+PORTABILITY
+ <<casin>> and <<casinf>> are ISO C99
+
+QUICKREF
+ <<casin>> and <<casinf>> are ISO C99
+
+*/
+
+
#include <complex.h>
#include <math.h>
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/casinh.c src_new/newlib/libm/complex/casinh.c
--- src/newlib/libm/complex/casinh.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/casinh.c 2010-10-12 15:20:57.054398200 +0200
@@ -32,6 +32,59 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<casinh>>, <<casinhf>>---complex arc hyperbolic sine
+
+INDEX
+ casinh
+INDEX
+ casinhf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex casinh(double complex <[z]>);
+ float complex casinhf(float complex <[z]>);
+
+
+DESCRIPTION
+ @ifnottex
+ These functions compute the complex arc hyperbolic sine of <[z]>,
+ with branch cuts outside the interval [-i, +i] along the
+ imaginary axis.
+ @end ifnottex
+ @tex
+ These functions compute the complex arc hyperbolic sine of <[z]>,
+ with branch cuts outside the interval [$-i$, $+i$] along the
+ imaginary axis.
+ @end tex
+
+ <<casinhf>> is identical to <<casinh>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ @ifnottex
+ These functions return the complex arc hyperbolic sine value,
+ in the range of a strip mathematically unbounded along the
+ real axis and in the interval [-i*p/2, +i*p/2] along the
+ imaginary axis.
+ @end ifnottex
+ @tex
+ These functions return the complex arc hyperbolic sine value,
+ in the range of a strip mathematically unbounded along the
+ real axis and in the interval [$-i\pi/2$, $+i\pi/2$] along the
+ imaginary axis.
+ @end tex
+
+PORTABILITY
+ <<casinh>> and <<casinhf>> are ISO C99
+
+QUICKREF
+ <<casinh>> and <<casinhf>> are ISO C99
+
+*/
+
+
#include <complex.h>
double complex
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/catan.c src_new/newlib/libm/complex/catan.c
--- src/newlib/libm/complex/catan.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/catan.c 2010-10-12 15:22:26.102982900 +0200
@@ -32,6 +32,57 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<catan>>, <<catanf>>---complex arc tangent
+
+INDEX
+ catan
+INDEX
+ catanf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex catan(double complex <[z]>);
+ float complex catanf(float complex <[z]>);
+
+
+DESCRIPTION
+ @ifnottex
+ These functions compute the complex arc tangent of <[z]>,
+ with branch cuts outside the interval [-i, +i] along the
+ imaginary axis.
+ @end ifnottex
+ @tex
+ These functions compute the complex arc tangent of <[z]>,
+ with branch cuts outside the interval [$-i$, $+i$] along the
+ imaginary axis.
+ @end tex
+
+ <<catanf>> is identical to <<catan>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ @ifnottex
+ These functions return the complex arc tangent value, in the range
+ of a strip mathematically unbounded along the imaginary axis
+ and in the interval [-pi/2, +pi/2] along the real axis.
+ @end ifnottex
+ @tex
+ These functions return the complex arc tangent, in the range
+ of a strip mathematically unbounded along the imaginary axis
+ and in the interval [$-\pi/2$, $+\pi/2$] along the real axis.
+ @end tex
+
+PORTABILITY
+ <<catan>> and <<catanf>> are ISO C99
+
+QUICKREF
+ <<catan>> and <<catanf>> are ISO C99
+
+*/
+
+
#include <complex.h>
#include <math.h>
#include "cephes_subr.h"
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/catanh.c src_new/newlib/libm/complex/catanh.c
--- src/newlib/libm/complex/catanh.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/catanh.c 2010-10-12 15:23:12.088240800 +0200
@@ -32,6 +32,52 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<catanh>>, <<catanhf>>---complex arc hyperbolic tangent
+
+INDEX
+ catanh
+INDEX
+ catanhf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex catanh(double complex <[z]>);
+ float complex catanhf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the complex arc hyperbolic tan of <[z]>,
+ with branch cuts outside the interval [-1, +1] along the
+ real axis.
+
+ <<catanhf>> is identical to <<catanh>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ @ifnottex
+ These functions return the complex arc hyperbolic tangent value,
+ in the range of a strip mathematically unbounded along the
+ real axis and in the interval [-i*p/2, +i*p/2] along the
+ imaginary axis.
+ @end ifnottex
+ @tex
+ These functions return the complex arc hyperbolic tangent value,
+ in the range of a strip mathematically unbounded along the
+ real axis and in the interval [$-i\pi/2$, $+i\pi/2$] along the
+ imaginary axis.
+ @end tex
+
+PORTABILITY
+ <<catanh>> and <<catanhf>> are ISO C99
+
+QUICKREF
+ <<catanh>> and <<catanhf>> are ISO C99
+
+*/
+
+
#include <complex.h>
double complex
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/ccos.c src_new/newlib/libm/complex/ccos.c
--- src/newlib/libm/complex/ccos.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/ccos.c 2010-10-12 15:24:04.136115100 +0200
@@ -32,6 +32,39 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<ccos>>, <<ccosf>>---complex cosine
+
+INDEX
+ ccos
+INDEX
+ ccosf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex ccos(double complex <[z]>);
+ float complex ccosf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the complex cosine of <[z]>.
+
+ <<ccosf>> is identical to <<ccos>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ These functions return the complex cosine value.
+
+PORTABILITY
+ <<ccos>> and <<ccosf>> are ISO C99
+
+QUICKREF
+ <<ccos>> and <<ccosf>> are ISO C99
+
+*/
+
+
#include <complex.h>
#include <math.h>
#include "cephes_subr.h"
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/ccosh.c src_new/newlib/libm/complex/ccosh.c
--- src/newlib/libm/complex/ccosh.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/ccosh.c 2010-10-12 15:23:56.729722900 +0200
@@ -32,6 +32,39 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<ccosh>>, <<ccoshf>>---complex hyperbolic cosine
+
+INDEX
+ ccosh
+INDEX
+ ccoshf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex ccosh(double complex <[z]>);
+ float complex ccoshf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the complex hyperbolic cosine of <[z]>.
+
+ <<ccoshf>> is identical to <<ccosh>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ These functions return the complex hyperbolic cosine value.
+
+PORTABILITY
+ <<ccosh>> and <<ccoshf>> are ISO C99
+
+QUICKREF
+ <<ccosh>> and <<ccoshf>> are ISO C99
+
+*/
+
+
#include <complex.h>
#include <math.h>
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/cexp.c src_new/newlib/libm/complex/cexp.c
--- src/newlib/libm/complex/cexp.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/cexp.c 2010-10-12 15:26:36.514040700 +0200
@@ -32,6 +32,39 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<cexp>>, <<cexpf>>---complex base-e exponential
+
+INDEX
+ cexp
+INDEX
+ cexpf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex cexp(double complex <[z]>);
+ float complex cexpf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the complex base-<[e]> exponential of <[z]>.
+
+ <<cexpf>> is identical to <<cexp>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ The cexp functions return the complex base-<[e]> exponential value.
+
+PORTABILITY
+ <<cexp>> and <<cexpf>> are ISO C99
+
+QUICKREF
+ <<cexp>> and <<cexpf>> are ISO C99
+
+*/
+
+
#include <complex.h>
#include <math.h>
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/cimag.c src_new/newlib/libm/complex/cimag.c
--- src/newlib/libm/complex/cimag.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/cimag.c 2010-10-12 15:27:35.499548200 +0200
@@ -8,6 +8,39 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<cimag>>, <<cimagf>>---imaginary part
+
+INDEX
+ cimag
+INDEX
+ cimagf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double cimag(double complex <[z]>);
+ float cimagf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the imaginary part of <[z]>.
+
+ <<cimagf>> is identical to <<cimag>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ The cimag functions return the imaginary part value (as a real).
+
+PORTABILITY
+ <<cimag>> and <<cimagf>> are ISO C99
+
+QUICKREF
+ <<cimag>> and <<cimagf>> are ISO C99
+
+*/
+
+
#include <complex.h>
#include "../common/fdlibm.h"
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/clog.c src_new/newlib/libm/complex/clog.c
--- src/newlib/libm/complex/clog.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/clog.c 2010-10-12 15:29:16.313983800 +0200
@@ -32,6 +32,48 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<clog>>, <<clogf>>---complex base-e logarithm
+
+INDEX
+ clog
+INDEX
+ clogf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex clog(double complex <[z]>);
+ float complex clogf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the complex natural (base-<[e]>) logarithm
+ of <[z]>, with a branch cut along the negative real axis.
+
+ <<clogf>> is identical to <<clog>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ @ifnottex
+ The clog functions return the complex natural logarithm value, in
+ the range of a strip mathematically unbounded along the real axis
+ and in the interval [-i*pi , +i*pi] along the imaginary axis.
+ @end ifnottex
+ @tex
+ The clog functions return the complex natural logarithm value, in
+ the range of a strip mathematically unbounded along the real axis
+ and in the interval [$-i\pi$, $+i\pi$] along the imaginary axis.
+ @end tex
+
+PORTABILITY
+ <<clog>> and <<clogf>> are ISO C99
+
+QUICKREF
+ <<clog>> and <<clogf>> are ISO C99
+
+*/
+
#include <complex.h>
#include <math.h>
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/complex.tex src_new/newlib/libm/complex/complex.tex
--- src/newlib/libm/complex/complex.tex 2010-10-08 17:01:14.000000000 +0200
+++ src_new/newlib/libm/complex/complex.tex 2010-10-12 17:35:01.417002500 +0200
@@ -1 +1,55 @@
-@c empty stub
+@node Complex
+@chapter Mathematical Complex Functions (@file{complex.h})
+
+This chapter groups the complex mathematical functions. The
+corresponding definitions and declarations are in @file{complex.h}.
+Functions and documentations are taken from NetBSD.
+
+@menu
+* cabs:: Complex absolute value
+* cacos:: Complex arc cosine
+* cacosh:: Complex arc hyperbolic cosine
+* carg:: Argument (also called phase angle)
+* casin:: Complex arc sine
+* casinh:: Complex arc hyperbolic sine
+* catan:: Complex arc tangent
+* catanh:: Complex arc hyperbolic tangent
+* ccos:: Complex cosine
+* ccosh:: Complex hyperbolic cosine
+* cexp:: Complex exponent
+* cimag:: Imaginary part
+* clog:: Complex natural (base e) logarithm
+* conj:: Complex conjugate
+* cpow:: Complex power function
+* cproj:: Compute a projection on the Riemann sphere
+* creal:: Real part
+* csin:: Complex sine
+* csinh:: Complex hyperbolic sine
+* csqrt:: Complex square root
+* ctan:: Complex tangent
+* ctanh:: Complex hyperbolic tangent
+@end menu
+
+
+@page @include complex/cabs.def
+@page @include complex/cacos.def
+@page @include complex/cacosh.def
+@page @include complex/carg.def
+@page @include complex/casin.def
+@page @include complex/casinh.def
+@page @include complex/catan.def
+@page @include complex/catanh.def
+@page @include complex/ccos.def
+@page @include complex/ccosh.def
+@page @include complex/cexp.def
+@page @include complex/cimag.def
+@page @include complex/clog.def
+@page @include complex/conj.def
+@page @include complex/cpow.def
+@page @include complex/cproj.def
+@page @include complex/creal.def
+@page @include complex/csin.def
+@page @include complex/csinh.def
+@page @include complex/csqrt.def
+@page @include complex/ctan.def
+@page @include complex/ctanh.def
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/conj.c src_new/newlib/libm/complex/conj.c
--- src/newlib/libm/complex/conj.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/conj.c 2010-10-12 15:29:41.158210800 +0200
@@ -8,6 +8,39 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<conj>>, <<conjf>>---complex conjugate
+
+INDEX
+ conj
+INDEX
+ conjf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex conj(double complex <[z]>);
+ float complex conjf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the complex conjugate of <[z]>,
+ by reversing the sign of its imaginary part.
+
+ <<conjf>> is identical to <<conj>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ The conj functions return the complex conjugate value.
+
+PORTABILITY
+ <<conj>> and <<conjf>> are ISO C99
+
+QUICKREF
+ <<conj>> and <<conjf>> are ISO C99
+
+*/
+
#include <complex.h>
#include "../common/fdlibm.h"
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/cpow.c src_new/newlib/libm/complex/cpow.c
--- src/newlib/libm/complex/cpow.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/cpow.c 2010-10-12 15:53:04.339619200 +0200
@@ -32,6 +32,48 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<cpow>>, <<cpowf>>---complex power
+
+INDEX
+ cpow
+INDEX
+ cpowf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex cpow(double complex <[x]>, double complex <[y]>);
+ float complex cpowf(float complex <[x]>, float complex <[y]>);
+
+
+DESCRIPTION
+ @ifnottex
+ The cpow functions compute the complex power function x^y
+ power, with a branch cut for the first parameter along the
+ negative real axis.
+ @end ifnottex
+ @tex
+ The cpow functions compute the complex power function $x^y$
+ power, with a branch cut for the first parameter along the
+ negative real axis.
+ @end tex
+
+ <<cpowf>> is identical to <<cpow>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ The cpow functions return the complex power function value.
+
+PORTABILITY
+ <<cpow>> and <<cpowf>> are ISO C99
+
+QUICKREF
+ <<cpow>> and <<cpowf>> are ISO C99
+
+*/
+
+
#include <complex.h>
#include <math.h>
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/cproj.c src_new/newlib/libm/complex/cproj.c
--- src/newlib/libm/complex/cproj.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/cproj.c 2010-10-12 15:40:20.092353100 +0200
@@ -29,6 +29,45 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<cproj>>, <<cprojf>>--- Riemann sphere projection
+
+INDEX
+ cproj
+INDEX
+ cprojf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex cproj(double complex <[z]>);
+ float complex cprojf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute a projection of <[z]> onto the Riemann
+ sphere: <[z]> projects to <[z]> except that all complex infinities
+ (even those with one infinite part and one NaN part) project
+ to positive infinity on the real axis. If <[z]> has an infinite part,
+ then <<cproj>>(<[z]>) is equivalent to
+
+ INFINITY + I * copysign(0.0, cimag(z))
+
+ <<cprojf>> is identical to <<cproj>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ The cproj functions return the value of the projection onto
+ the Riemann sphere.
+
+PORTABILITY
+ <<cproj>> and <<cprojf>> are ISO C99
+
+QUICKREF
+ <<cproj>> and <<cprojf>> are ISO C99
+
+*/
+
#include <sys/cdefs.h>
/*__RCSID("$NetBSD: cproj.c,v 1.3 2010/09/20 17:51:38 christos Exp $"); */
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/creal.c src_new/newlib/libm/complex/creal.c
--- src/newlib/libm/complex/creal.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/creal.c 2010-10-12 15:40:44.311568100 +0200
@@ -8,6 +8,39 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<creal>>, <<crealf>>---real part
+
+INDEX
+ creal
+INDEX
+ crealf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double creal(double complex <[z]>);
+ float crealf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the real part of <[z]>.
+
+ <<crealf>> is identical to <<creal>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ The creal functions return the real part value.
+
+PORTABILITY
+ <<creal>> and <<crealf>> are ISO C99
+
+QUICKREF
+ <<creal>> and <<crealf>> are ISO C99
+
+*/
+
+
#include <complex.h>
#include "../common/fdlibm.h"
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/csin.c src_new/newlib/libm/complex/csin.c
--- src/newlib/libm/complex/csin.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/csin.c 2010-10-12 15:41:04.468205100 +0200
@@ -32,6 +32,39 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<csin>>, <<csinf>>---complex sine
+
+INDEX
+ csin
+INDEX
+ csinf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex csin(double complex <[z]>);
+ float complex csinf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the complex sine of <[z]>.
+
+ <<csinf>> is identical to <<csin>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ These functions return the complex sine value.
+
+PORTABILITY
+ <<csin>> and <<csinf>> are ISO C99
+
+QUICKREF
+ <<csin>> and <<csinf>> are ISO C99
+
+*/
+
+
#include <complex.h>
#include <math.h>
#include "cephes_subr.h"
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/csinh.c src_new/newlib/libm/complex/csinh.c
--- src/newlib/libm/complex/csinh.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/csinh.c 2010-10-12 15:41:24.531090300 +0200
@@ -32,6 +32,38 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<csinh>>, <<csinhf>>---complex hyperbolic sine
+
+INDEX
+ csinh
+INDEX
+ csinhf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex csinh(double complex <[z]>);
+ float complex csinhf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the complex hyperbolic sine of <[z]>.
+
+ <<ccoshf>> is identical to <<ccosh>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ These functions return the complex hyperbolic sine value.
+
+PORTABILITY
+ <<csinh>> and <<csinhf>> are ISO C99
+
+QUICKREF
+ <<csinh>> and <<csinhf>> are ISO C99
+
+*/
+
#include <complex.h>
#include <math.h>
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/csqrt.c src_new/newlib/libm/complex/csqrt.c
--- src/newlib/libm/complex/csqrt.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/csqrt.c 2010-10-12 15:43:00.970441900 +0200
@@ -32,6 +32,41 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<csqrt>>, <<csqrtf>>---complex square root
+
+INDEX
+ csqrt
+INDEX
+ csqrtf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex csqrt(double complex <[z]>);
+ float complex csqrtf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the complex square root of <[z]>, with
+ a branch cut along the negative real axis.
+
+ <<csqrtf>> is identical to <<csqrt>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ The csqrt functions return the complex square root value, in
+ the range of the right halfplane (including the imaginary axis).
+
+PORTABILITY
+ <<csqrt>> and <<csqrtf>> are ISO C99
+
+QUICKREF
+ <<csqrt>> and <<csqrtf>> are ISO C99
+
+*/
+
+
#include <complex.h>
#include <math.h>
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/ctan.c src_new/newlib/libm/complex/ctan.c
--- src/newlib/libm/complex/ctan.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/ctan.c 2010-10-12 15:43:24.970902700 +0200
@@ -32,6 +32,39 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<ctan>>, <<ctanf>>---complex tangent
+
+INDEX
+ ctan
+INDEX
+ ctanf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex ctan(double complex <[z]>);
+ float complex ctanf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the complex tangent of <[z]>.
+
+ <<ctanf>> is identical to <<ctan>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ These functions return the complex tangent value.
+
+PORTABILITY
+ <<ctan>> and <<ctanf>> are ISO C99
+
+QUICKREF
+ <<ctan>> and <<ctanf>> are ISO C99
+
+*/
+
+
#include <complex.h>
#include <math.h>
#include "cephes_subr.h"
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/complex/ctanh.c src_new/newlib/libm/complex/ctanh.c
--- src/newlib/libm/complex/ctanh.c 2010-10-08 12:35:14.000000000 +0200
+++ src_new/newlib/libm/complex/ctanh.c 2010-10-12 15:44:34.565988900 +0200
@@ -32,6 +32,39 @@
* Marco Atzeri <marco_atzeri@yahoo.it>
*/
+/*
+FUNCTION
+ <<ctanh>>, <<ctanf>>---complex hyperbolic tangent
+
+INDEX
+ ctanh
+INDEX
+ ctanhf
+
+ANSI_SYNOPSIS
+ #include <complex.h>
+ double complex ctanh(double complex <[z]>);
+ float complex ctanhf(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the complex hyperbolic tangent of <[z]>.
+
+ <<ctanhf>> is identical to <<ctanh>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ These functions return the complex hyperbolic tangent value.
+
+PORTABILITY
+ <<ctanh>> and <<ctanhf>> are ISO C99
+
+QUICKREF
+ <<ctanh>> and <<ctanhf>> are ISO C99
+
+*/
+
+
#include <complex.h>
#include <math.h>
diff -uNr -x Makefile.in -x '*~' -x '*.m4' -x autom4te.cache -x configure -x '*.info' -x CVS src/newlib/libm/libm.texinfo src_new/newlib/libm/libm.texinfo
--- src/newlib/libm/libm.texinfo 2009-12-17 21:41:42.000000000 +0100
+++ src_new/newlib/libm/libm.texinfo 2010-10-12 19:41:31.625000000 +0200
@@ -93,6 +93,7 @@
@menu
* Math:: The mathematical functions (`math.h').
+* Complex:: The mathematical complex functions (`complex.h').
* Reentrancy:: The functions in libm are not reentrant by default.
* Long Double Functions:: The long double function support of libm.
* Index::