diff options
author | Jakob Kaivo <jkk@ung.org> | 2019-02-08 18:42:39 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2019-02-08 18:42:39 -0500 |
commit | 7ef8a7379f7f7d09e71ccae2a0b688c3cd80423f (patch) | |
tree | 092ab0aed1769117fd7b28b8592f6f96b0e0d5af /src/complex | |
parent | 6acf19370e8adff79cd83b257d3f04aeaf2a59dd (diff) |
merge sources into single tree
Diffstat (limited to 'src/complex')
-rw-r--r-- | src/complex/I.c | 13 | ||||
-rw-r--r-- | src/complex/_Complex_I.c | 7 | ||||
-rw-r--r-- | src/complex/_Imaginary_I.c | 10 | ||||
-rw-r--r-- | src/complex/cabs.c | 23 | ||||
-rw-r--r-- | src/complex/cacos.c | 25 | ||||
-rw-r--r-- | src/complex/cacosh.c | 26 | ||||
-rw-r--r-- | src/complex/carg.c | 23 | ||||
-rw-r--r-- | src/complex/casin.c | 25 | ||||
-rw-r--r-- | src/complex/casinh.c | 25 | ||||
-rw-r--r-- | src/complex/catan.c | 25 | ||||
-rw-r--r-- | src/complex/catanh.c | 26 | ||||
-rw-r--r-- | src/complex/ccos.c | 22 | ||||
-rw-r--r-- | src/complex/ccosh.c | 23 | ||||
-rw-r--r-- | src/complex/cexp.c | 23 | ||||
-rw-r--r-- | src/complex/cimag.c | 23 | ||||
-rw-r--r-- | src/complex/clog.c | 26 | ||||
-rw-r--r-- | src/complex/complex.c | 7 | ||||
-rw-r--r-- | src/complex/conj.c | 23 | ||||
-rw-r--r-- | src/complex/cpow.c | 23 | ||||
-rw-r--r-- | src/complex/cproj.c | 27 | ||||
-rw-r--r-- | src/complex/creal.c | 23 | ||||
-rw-r--r-- | src/complex/csin.c | 23 | ||||
-rw-r--r-- | src/complex/csinh.c | 23 | ||||
-rw-r--r-- | src/complex/csqrt.c | 25 | ||||
-rw-r--r-- | src/complex/ctan.c | 23 | ||||
-rw-r--r-- | src/complex/ctanh.c | 23 | ||||
-rw-r--r-- | src/complex/imaginary.c | 13 |
27 files changed, 578 insertions, 0 deletions
diff --git a/src/complex/I.c b/src/complex/I.c new file mode 100644 index 00000000..de7929a8 --- /dev/null +++ b/src/complex/I.c @@ -0,0 +1,13 @@ +#include <complex.h> + +#ifdef __STDC_IEC_559_COMPLEX__ +#define I _Imaginary_I +#else +#define I _Complex_I +#endif + +/* see appendix G for whether or not to set __STDC_IEC_559_COMPLEX__ == 1 */ + +/* +STDC(199901) +*/ diff --git a/src/complex/_Complex_I.c b/src/complex/_Complex_I.c new file mode 100644 index 00000000..0cb6aede --- /dev/null +++ b/src/complex/_Complex_I.c @@ -0,0 +1,7 @@ +#include <complex.h> + +#define _Complex_I (const float _Complex)1 /* TODO: imaginary unit */ + +/* +STDC(199901) +*/ diff --git a/src/complex/_Imaginary_I.c b/src/complex/_Imaginary_I.c new file mode 100644 index 00000000..9357dc4f --- /dev/null +++ b/src/complex/_Imaginary_I.c @@ -0,0 +1,10 @@ +#include <complex.h> + +#ifdef __STDC_IEC_559_COMPLEX__ +#define _Imaginary_I (const float _Imaginary)1 /* TODO: imaginary unit */ +#endif + +/* This should only be defined if imaginary types are supported. */ +/* +STDC(199901) +*/ diff --git a/src/complex/cabs.c b/src/complex/cabs.c new file mode 100644 index 00000000..a408518b --- /dev/null +++ b/src/complex/cabs.c @@ -0,0 +1,23 @@ +# define TGSOURCE "cabs.c" +#include "nontstd/tgmath.h" + +#include <complex.h> + +TYPE TGFN(cabs)(TYPE complex z) +{ + return 0.0; +} + +/*d +The cabs functions compute the complex absolute value (also called norm, modulus, or +magnitude) of z. +d*/ + +/*r +The cabs functions return the complex absolute value. +r*/ + +/* +STDC(199901) +LINK(m) +*/ diff --git a/src/complex/cacos.c b/src/complex/cacos.c new file mode 100644 index 00000000..0eb88f4c --- /dev/null +++ b/src/complex/cacos.c @@ -0,0 +1,25 @@ +# define TGSOURCE "cacos.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(cacos)(TYPE complex z) +{ + return I; +} + +/*d +The cacos functions compute the complex arc cosine of z, with branch cuts outside the +interval [−1, +1] along the real axis. +d*/ + +/*r +The cacos functions return the complex arc cosine value, in the range of a strip +mathematically unbounded along the imaginary axis and in the interval [0, π ] along the +real axis +r*/ + +/* +STDC(199901) +LINK(m) +*/ diff --git a/src/complex/cacosh.c b/src/complex/cacosh.c new file mode 100644 index 00000000..8589b691 --- /dev/null +++ b/src/complex/cacosh.c @@ -0,0 +1,26 @@ +# define TGSOURCE "cacosh.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(cacosh)(TYPE complex z) +{ + return 0.0; +} + + +/*d +The cacosh functions compute the complex arc hyperbolic cosine of z, with a branch +cut at values less than 1 along the real axis. +d*/ + +/*r +The cacosh 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 π , +i π ] along +the imaginary axis. +r*/ + +/* +STDC(199901) +LINK(m) +*/ diff --git a/src/complex/carg.c b/src/complex/carg.c new file mode 100644 index 00000000..15772f8a --- /dev/null +++ b/src/complex/carg.c @@ -0,0 +1,23 @@ +# define TGSOURCE "carg.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE TGFN(carg)(TYPE complex z) +{ + return 0.0; +} + +/*d +The carg functions compute the argument (also called phase angle) of z, with a branch +cut along the negative real axis. +d*/ + +/*r +The carg functions return the value of the argument in the interval [− π , + π ]. +r*/ + +/* +STDC(199901) +LINK(m) +*/ diff --git a/src/complex/casin.c b/src/complex/casin.c new file mode 100644 index 00000000..e96fee43 --- /dev/null +++ b/src/complex/casin.c @@ -0,0 +1,25 @@ +# define TGSOURCE "casin.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(casin)(TYPE complex z) +{ + return 0; +} + +/*d +The casin functions compute the complex arc sine of z, with branch cuts outside the +interval [−1, +1] along the real axis. +d*/ + +/*r +The casin functions return the complex arc sine value, in the range of a strip +mathematically unbounded along the imaginary axis and in the interval [− π /2, + π /2] +along the real axis. +r*/ + +/* +STDC(199901) +LINK(m) +*/ diff --git a/src/complex/casinh.c b/src/complex/casinh.c new file mode 100644 index 00000000..fe1b20fb --- /dev/null +++ b/src/complex/casinh.c @@ -0,0 +1,25 @@ +# define TGSOURCE "casinh.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(casinh)(TYPE complex z) +{ + return 0.0; +} + +/*d +The casinh functions compute the complex arc hyperbolic sine of z, with branch cuts +outside the interval [−i, +i] along the imaginary axis. +d*/ + +/*r +The casinh 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 π /2, +i π /2] +along the imaginary axis. +r*/ + +/* +STDC(199901) +LINK(m) +*/ diff --git a/src/complex/catan.c b/src/complex/catan.c new file mode 100644 index 00000000..6c162c3f --- /dev/null +++ b/src/complex/catan.c @@ -0,0 +1,25 @@ +# define TGSOURCE "catan.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(catan)(TYPE complex z) +{ + return 0.0; +} + +/*d +The catan functions compute the complex arc tangent of z, with branch cuts outside the +interval [−i, +i] along the imaginary axis. +d*/ + +/*r +The catan functions return the complex arc tangent value, in the range of a strip +mathematically unbounded along the imaginary axis and in the interval [− π /2, + π /2] +along the real axis. +r*/ + +/* +STDC(199901) +LINK(m) +*/ diff --git a/src/complex/catanh.c b/src/complex/catanh.c new file mode 100644 index 00000000..e8eff5cd --- /dev/null +++ b/src/complex/catanh.c @@ -0,0 +1,26 @@ +# define TGSOURCE "catanh.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(catanh)(TYPE complex z) +{ + return 0.0; +} + +/*d +The catanh functions compute the complex arc hyperbolic tangent of z, with branch +cuts outside the interval [−1, +1] along the real axis. +d*/ + +/*r +The catanh 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 π /2, +i π /2] +along the imaginary axis. +r*/ + +/* +STDC(199901) +LINK(m) +*/ + diff --git a/src/complex/ccos.c b/src/complex/ccos.c new file mode 100644 index 00000000..4fffc92f --- /dev/null +++ b/src/complex/ccos.c @@ -0,0 +1,22 @@ +# define TGSOURCE "ccos.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(ccos)(TYPE complex z) +{ + return 0.0; +} + +/*d +The ccos functions compute the complex cosine of z. +d*/ + +/*r +The ccos functions return the complex cosine value. +r*/ + +/* +STDC(199901) +LINK(m) +*/ diff --git a/src/complex/ccosh.c b/src/complex/ccosh.c new file mode 100644 index 00000000..87ad53d6 --- /dev/null +++ b/src/complex/ccosh.c @@ -0,0 +1,23 @@ +# define TGSOURCE "ccosh.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(ccosh)(TYPE complex z) +{ + return 0.0; +} + +/*d +The ccosh functions compute the complex hyperbolic cosine of z. +d*/ + +/*r +The ccosh functions return the complex hyperbolic cosine value. +r*/ + +/* +STDC(199901) +LINK(m) +*/ + diff --git a/src/complex/cexp.c b/src/complex/cexp.c new file mode 100644 index 00000000..d20eb6a6 --- /dev/null +++ b/src/complex/cexp.c @@ -0,0 +1,23 @@ +# define TGSOURCE "cexp.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(cexp)(TYPE complex z) +{ + return 0.0; +} + +/*d +The cexp functions compute the complex base-e exponential of z. +d*/ + +/*r +The cexp functions compute the complex base-e exponential of z. +r*/ + +/* +STDC(199901) +LINK(m) +*/ + diff --git a/src/complex/cimag.c b/src/complex/cimag.c new file mode 100644 index 00000000..3284d4ca --- /dev/null +++ b/src/complex/cimag.c @@ -0,0 +1,23 @@ +# define TGSOURCE "cimag.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE TGFN(cimag)(TYPE complex z) +{ + return 0.0; +} + +/*d +The cimag functions compute the imaginary part of z. 164) +d*/ + +/*r +The cimag functions return the imaginary part value (as a real). +r*/ + +/* +STDC(199901) +LINK(m) +*/ + diff --git a/src/complex/clog.c b/src/complex/clog.c new file mode 100644 index 00000000..8b958fea --- /dev/null +++ b/src/complex/clog.c @@ -0,0 +1,26 @@ +# define TGSOURCE "clog.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(clog)(TYPE complex z) +{ + return 0.0; +} + +/*d +The clog functions compute the complex natural (base-e) logarithm of z, with a branch +cut along the negative real axis. +d*/ + +/*r +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 π , +i π ] along the +imaginary axis. +r*/ + +/* +STDC(199901) +LINK(m) +*/ + diff --git a/src/complex/complex.c b/src/complex/complex.c new file mode 100644 index 00000000..9649b03c --- /dev/null +++ b/src/complex/complex.c @@ -0,0 +1,7 @@ +#include <complex.h> +#define complex _Complex + +/* +STDC(199901) +LINK(m) +*/ diff --git a/src/complex/conj.c b/src/complex/conj.c new file mode 100644 index 00000000..18cadb9d --- /dev/null +++ b/src/complex/conj.c @@ -0,0 +1,23 @@ +# define TGSOURCE "conj.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(conj)(TYPE complex z) +{ + return 0.0; +} + +/*d +The conj functions compute the complex conjugate of z, by rev ersing the sign of its +imaginary part. +d*/ + +/*r +The conj functions return the complex conjugate value. +r*/ + +/* +STDC(199901) +LINK(m) +*/ diff --git a/src/complex/cpow.c b/src/complex/cpow.c new file mode 100644 index 00000000..5e778b1a --- /dev/null +++ b/src/complex/cpow.c @@ -0,0 +1,23 @@ +# define TGSOURCE "cpow.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(cpow)(TYPE complex x, TYPE complex y) +{ + return 0.0; +} + +/*d +The cpow functions compute the complex power function x y , with a branch cut for the +first parameter along the negative real axis. +d*/ + +/*r +The cpow functions return the complex power function value. +r*/ +/* +STDC(199901) +LINK(m) +*/ + diff --git a/src/complex/cproj.c b/src/complex/cproj.c new file mode 100644 index 00000000..406ff812 --- /dev/null +++ b/src/complex/cproj.c @@ -0,0 +1,27 @@ +# define TGSOURCE "cproj.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(cproj)(TYPE complex z) +{ + return 0.0; +} + +/*d +The cproj 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)) +d*/ + +/*r +The cproj functions return the value of the projection onto the Riemann sphere. +r*/ + +/* +STDC(199901) +LINK(m) +*/ + diff --git a/src/complex/creal.c b/src/complex/creal.c new file mode 100644 index 00000000..9888a274 --- /dev/null +++ b/src/complex/creal.c @@ -0,0 +1,23 @@ +# define TGSOURCE "creal.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE TGFN(creal)(TYPE complex z) +{ + return 0.0; +} + +/*d +The creal functions compute the real part of z. 165) +d*/ + +/*r +The creal functions return the real part value. +r*/ + +/* +STDC(199901) +LINK(m) +*/ + diff --git a/src/complex/csin.c b/src/complex/csin.c new file mode 100644 index 00000000..575c7eb9 --- /dev/null +++ b/src/complex/csin.c @@ -0,0 +1,23 @@ +# define TGSOURCE "csin.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(csin)(TYPE complex z) +{ + return 0.0; +} + +/*d +The csin functions compute the complex sine of z. +d*/ + +/*r +The csin functions return the complex sine value. +r*/ + +/* +STDC(199901) +LINK(m) +*/ + diff --git a/src/complex/csinh.c b/src/complex/csinh.c new file mode 100644 index 00000000..c4db9865 --- /dev/null +++ b/src/complex/csinh.c @@ -0,0 +1,23 @@ +# define TGSOURCE "csinh.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(csinh)(TYPE complex z) +{ + return 0.0; +} + +/*d +The csinh functions compute the complex hyperbolic sine of z. +d*/ + +/*r +The csinh functions return the complex hyperbolic sine value. +r*/ + +/* +STDC(199901) +LINK(m) +*/ + diff --git a/src/complex/csqrt.c b/src/complex/csqrt.c new file mode 100644 index 00000000..edbbd394 --- /dev/null +++ b/src/complex/csqrt.c @@ -0,0 +1,25 @@ +# define TGSOURCE "csqrt.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(csqrt)(TYPE complex z) +{ + return 0.0; +} + +/*d +The csqrt functions compute the complex square root of z, with a branch cut along the +negative real axis. +d*/ + +/*r +The csqrt functions return the complex square root value, in the range of the right half- +plane (including the imaginary axis). +r*/ + +/* +STDC(199901) +LINK(m) +*/ + diff --git a/src/complex/ctan.c b/src/complex/ctan.c new file mode 100644 index 00000000..34705e84 --- /dev/null +++ b/src/complex/ctan.c @@ -0,0 +1,23 @@ +# define TGSOURCE "ctan.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(ctan)(TYPE complex z) +{ + return 0.0; +} + +/*d +The ctan functions compute the complex tangent of z. +d*/ + +/*r +The ctan functions return the complex tangent value. +r*/ + +/* +STDC(199901) +LINK(m) +*/ + diff --git a/src/complex/ctanh.c b/src/complex/ctanh.c new file mode 100644 index 00000000..f4d5683c --- /dev/null +++ b/src/complex/ctanh.c @@ -0,0 +1,23 @@ +# define TGSOURCE "ctanh.c" +#include "nonstd/tgmath.h" + +#include <complex.h> + +TYPE complex TGFN(ctanh)(TYPE complex z) +{ + return 0.0; +} + +/*d +The ctanh functions compute the complex hyperbolic tangent of z. +d*/ + +/*r +The ctanh functions return the complex hyperbolic tangent value. +r*/ + +/* +STDC(199901) +LINK(m) +*/ + diff --git a/src/complex/imaginary.c b/src/complex/imaginary.c new file mode 100644 index 00000000..4b3da25d --- /dev/null +++ b/src/complex/imaginary.c @@ -0,0 +1,13 @@ +#include <complex.h> + +#ifdef __STDC_IEC_559_COMPLEX__ +#define imaginary _Imaginary +#endif + +/* This should only be defined if imaginary types are supported. */ + +/* +STDC(199901) +LINK(m) +*/ + |