Name

pfe-complex-ext ? Complex floating point

Synopsis

R2P1 ?=>? ();?
"EXTENSIONS";
?
T2P1 ?=>? ();?
"EXTENSIONS";
?
LAMBDA/EPSILON ?=>? ();?
"EXTENSIONS";
?
Z@ ( addr -- f: z ) ?=>? ();?
"EXTENSIONS";
?
Z! ( addr f: z -- ) ?=>? ();?
"EXTENSIONS";
?
X@ ( zaddr -- f: x ) ?=>? ();?
"EXTENSIONS";
?
X! ( zaddr f: x -- ) ?=>? ();?
"EXTENSIONS";
?
Y@ ( zaddr -- f: y ) ?=>? ();?
"EXTENSIONS";
?
Y! ( zaddr f: x -- ) ?=>? ();?
"EXTENSIONS";
?
Z. (f: z -- ) ?=>? ();?
"EXTENSIONS";
?
ZS. (f: z -- ) ?=>? ();?
"EXTENSIONS";
?
REAL (f: x y -- x ) ?=>? ();?
"EXTENSIONS";
?
IMAG (f: x y -- y ) ?=>? ();?
"EXTENSIONS";
?
CONJG (f: x y -- x -y ) ?=>? ();?
"EXTENSIONS";
?
ZDROP (f: z -- ) ?=>? ();?
"EXTENSIONS";
?
ZDUP (f: z -- z z ) ?=>? ();?
"EXTENSIONS";
?
ZSWAP (f: z1 z2 -- z2 z1 ) ?=>? ();?
"EXTENSIONS";
?
ZOVER (f: z1 z2 -- z1 z2 z1 ) ?=>? ();?
"EXTENSIONS";
?
ZNIP (f: z1 z2 -- z2 ) ?=>? ();?
"EXTENSIONS";
?
ZTUCK (f: z1 z2 -- z2 z1 z2 ) ?=>? ();?
"EXTENSIONS";
?
ZROT (f: z1 z2 z3 -- z2 z3 z1 ) ?=>? ();?
"EXTENSIONS";
?
-ZROT (f: z1 z2 z3 -- z3 z1 z2 ) ?=>? ();?
"EXTENSIONS";
?
Z+ (f: z1 z2 -- z1+z2 ) ?=>? ();?
"EXTENSIONS";
?
Z- (f: z1 z2 -- z1-z2 ) ?=>? ();?
"EXTENSIONS";
?
Z* (f: x y u v -- x*u-y*v x*v+y*u ) ?=>? ();?
"EXTENSIONS";
?
Z/ (f: u+iv z -- u/z+iv/z ) ?=>? ();?
"EXTENSIONS";
?
ZNEGATE (f: z -- -z ) ?=>? ();?
"EXTENSIONS";
?
Z2* (f: z -- z*2 ) ?=>? ();?
"EXTENSIONS";
?
Z2/ (f: z -- z/2 ) ?=>? ();?
"EXTENSIONS";
?
I* (f: x y -- -y x ) ?=>? ();?
"EXTENSIONS";
?
-I* (f: x y -- y -x ) ?=>? ();?
"EXTENSIONS";
?
1/Z (f: z -- 1/z ) ?=>? ();?
"EXTENSIONS";
?
Z^2 (f: z -- z^2 ) ?=>? ();?
"EXTENSIONS";
?
|Z|^2 (f: x y -- |z|^2 ) ?=>? ();?
"EXTENSIONS";
?
Z^N ( n f: z -- z^n ) ?=>? ();?
"EXTENSIONS";
?
X+ (f: z a -- x+a y ) ?=>? ();?
"EXTENSIONS";
?
X- (f: z a -- x-a y ) ?=>? ();?
"EXTENSIONS";
?
Y+ (f: z a -- x y+a ) ?=>? ();?
"EXTENSIONS";
?
Y- (f: z a -- x y-a ) ?=>? ();?
"EXTENSIONS";
?
Z*F (f: x y f -- x*f y*f ) ?=>? ();?
"EXTENSIONS";
?
Z/F (f: x y f -- x/f y/f ) ?=>? ();?
"EXTENSIONS";
?
F*Z (f: f x y -- f*x f*y ) ?=>? ();?
"EXTENSIONS";
?
F/Z (f: f z -- f/z ) ?=>? ();?
"EXTENSIONS";
?
Z*I*F (f: z f -- z*if ) ?=>? ();?
"EXTENSIONS";
?
-I*Z/F (f: z f -- z/[if] ) ?=>? ();?
"EXTENSIONS";
?
I*F*Z (f: f z -- if*z ) ?=>? ();?
"EXTENSIONS";
?
I*F/Z (f: f z -- [0+if]/z ) ?=>? ();?
"EXTENSIONS";
?
Z*>REAL (f: z1 z2 -- Re[z1*z2] ) ?=>? ();?
"EXTENSIONS";
?
Z*>IMAG (f: z1 z2 -- Im[z1*z2] ) ?=>? ();?
"EXTENSIONS";
?
|Z| (f: x y -- |z| ) ?=>? ();?
"EXTENSIONS";
?
ZBOX (f: z -- box[z] ) ?=>? ();?
"EXTENSIONS";
?
ARG (f: z -- principal.arg[z] ) ?=>? ();?
"EXTENSIONS";
?
>POLAR (f: x y -- r theta ) ?=>? ();?
"EXTENSIONS";
?
POLAR> (f: r theta -- x y ) ?=>? ();?
"EXTENSIONS";
?
ZSSQS (f: z -- rho s: k ) ?=>? ();?
"EXTENSIONS";
?
ZSQRT (f: z -- sqrt[z] ) ?=>? ();?
"EXTENSIONS";
?
ZLN (f: z -- ln|z|+i*theta ) ?=>? ();?
"EXTENSIONS";
?
ZEXP (f: z -- exp[z] ) ?=>? ();?
"EXTENSIONS";
?
Z^ (f: x y u v -- [x+iy]^[u+iv] ) ?=>? ();?
"EXTENSIONS";
?
ZCOSH (f: z -- cosh[z] ) ?=>? ();?
"EXTENSIONS";
?
ZSINH (f: z -- sinh[z] ) ?=>? ();?
"EXTENSIONS";
?
ZTANH (f: z -- tanh[z] ) ?=>? ();?
"EXTENSIONS";
?
ZCOTH (f: z -- 1/tanh[z] ) ?=>? ();?
"EXTENSIONS";
?
ZCOS (f: z -- cosh[i*z] ) ?=>? ();?
"EXTENSIONS";
?
ZSIN (f: z -- -i*sinh[i*z] ) ?=>? ();?
"EXTENSIONS";
?
ZTAN (f: z -- -i*tanh[i*z] ) ?=>? ();?
"EXTENSIONS";
?
ZCOT (f: z -- -i*coth[-i*z] ) ?=>? ();?
"EXTENSIONS";
?
ZACOS (f: z -- u+iv=acos[z] ) ?=>? ();?
"EXTENSIONS";
?
ZACOSH (f: z -- u+iv=acosh[z] ) ?=>? ();?
"EXTENSIONS";
?
ZASIN (f: z -- u+iv=asin[z] ) ?=>? ();?
"EXTENSIONS";
?
ZASINH (f: z -- -i*asin[i*z] ) ?=>? ();?
"EXTENSIONS";
?
ZATANH (f: z -- u+iv=atanh[z] ) ?=>? ();?
"EXTENSIONS";
?
ZATAN (f: z -- -i*atanh[i*z] ) ?=>? ();?
"EXTENSIONS";
?
ZLITERAL ?=>? ();?
"EXTENSIONS";
?

Description

R2P1 - no description, sorry

T2P1 - no description, sorry

LAMBDA/EPSILON - no description, sorry

Z@ ( addr -- f: z ) => "EXTENSIONS"

Z! ( addr f: z -- ) => "EXTENSIONS"

X@ ( zaddr -- f: x ) => "EXTENSIONS"

X! ( zaddr f: x -- ) => "EXTENSIONS"

Y@ ( zaddr -- f: y ) => "EXTENSIONS"

Y! ( zaddr f: x -- ) => "EXTENSIONS"

Z. (f: z -- ) => "EXTENSIONS"

Emit the complex number, including the sign of zero when signbit() is available.

ZS. (f: z -- ) => "EXTENSIONS"

Emit the complex number in scientific notation, including the sign of zero when signbit() is available.

REAL (f: x y -- x ) => "EXTENSIONS"

IMAG (f: x y -- y ) => "EXTENSIONS"

CONJG (f: x y -- x -y ) => "EXTENSIONS"

ZDROP (f: z -- ) => "EXTENSIONS"

ZDUP (f: z -- z z ) => "EXTENSIONS"

ZSWAP (f: z1 z2 -- z2 z1 ) => "EXTENSIONS"

ZOVER (f: z1 z2 -- z1 z2 z1 ) => "EXTENSIONS"

ZNIP (f: z1 z2 -- z2 ) => "EXTENSIONS"

ZTUCK (f: z1 z2 -- z2 z1 z2 ) => "EXTENSIONS"

ZROT (f: z1 z2 z3 -- z2 z3 z1 ) => "EXTENSIONS"

-ZROT (f: z1 z2 z3 -- z3 z1 z2 ) => "EXTENSIONS"

Z+ (f: z1 z2 -- z1+z2 ) => "EXTENSIONS"

Z- (f: z1 z2 -- z1-z2 ) => "EXTENSIONS"

Z* (f: x y u v -- x*u-y*v x*v+y*u ) => "EXTENSIONS"

Uses the algorithm followed by JVN: (x+iy)*(u+iv) = [(x+y)*u - y*(u+v)] + i[(x+y)*u + x*(v-u)] Requires 3 multiplications and 5 additions.

Z/ (f: u+iv z -- u/z+iv/z ) => "EXTENSIONS"

Kahan-like algorithm *without* due attention to spurious over/underflows and zeros and infinities.

ZNEGATE (f: z -- -z ) => "EXTENSIONS"

Z2* (f: z -- z*2 ) => "EXTENSIONS"

Z2/ (f: z -- z/2 ) => "EXTENSIONS"

I* (f: x y -- -y x ) => "EXTENSIONS"

-I* (f: x y -- y -x ) => "EXTENSIONS"

1/Z (f: z -- 1/z ) => "EXTENSIONS"

Kahan algorithm *without* due attention to spurious over/underflows and zeros and infinities.

Z^2 (f: z -- z^2 ) => "EXTENSIONS"

Kahan algorithm without removal of any spurious NaN created by overflow. It deliberately uses (x-y)(x+y) instead of x^2-y^2 for the real part.

|Z|^2 (f: x y -- |z|^2 ) => "EXTENSIONS"

Z^N ( n f: z -- z^n ) => "EXTENSIONS"

X+ (f: z a -- x+a y ) => "EXTENSIONS"

X- (f: z a -- x-a y ) => "EXTENSIONS"

Y+ (f: z a -- x y+a ) => "EXTENSIONS"

Y- (f: z a -- x y-a ) => "EXTENSIONS"

Z*F (f: x y f -- x*f y*f ) => "EXTENSIONS"

Z/F (f: x y f -- x/f y/f ) => "EXTENSIONS"

F*Z (f: f x y -- f*x f*y ) => "EXTENSIONS"

F/Z (f: f z -- f/z ) => "EXTENSIONS"

Kahan algorithm *without* due attention to spurious over/underflows and zeros and infinities.

Z*I*F (f: z f -- z*if ) => "EXTENSIONS"

-I*Z/F (f: z f -- z/[if] ) => "EXTENSIONS"

I*F*Z (f: f z -- if*z ) => "EXTENSIONS"

I*F/Z (f: f z -- [0+if]/z ) => "EXTENSIONS"

Kahan algorithm *without* due attention to spurious over/underflows and zeros and infinities.

Z*>REAL (f: z1 z2 -- Re[z1*z2] ) => "EXTENSIONS"

Compute the real part of the complex product without computing the imaginary part. Recommended by Kahan to avoid gratuitous overflow or underflow signals from the unnecessary part.

Z*>IMAG (f: z1 z2 -- Im[z1*z2] ) => "EXTENSIONS"

Compute the imaginary part of the complex product without computing the real part.

|Z| (f: x y -- |z| ) => "EXTENSIONS"

ZBOX (f: z -- box[z] ) => "EXTENSIONS"

Defined *only* for zero and infinite arguments. This difffers from Kahan's CBOX [p. 198] by conserving signs when only one of x or y is infinite, consistent with the other cases, and with its use in his ARG [p. 199].

ARG (f: z -- principal.arg[z] ) => "EXTENSIONS"

>POLAR (f: x y -- r theta ) => "EXTENSIONS"

Convert the complex number z to its polar representation, where theta is the principal argument.

POLAR> (f: r theta -- x y ) => "EXTENSIONS"

ZSSQS (f: z -- rho s: k ) => "EXTENSIONS"

Compute rho = |(x+iy)/2^k|^2, scaled to avoid overflow or underflow, and leave the scaling integer k. Kahan, p. 200.

ZSQRT (f: z -- sqrt[z] ) => "EXTENSIONS"

Compute the principal branch of the square root, with Re sqrt[z] >= 0. Kahan, p. 201.

ZLN (f: z -- ln|z|+i*theta ) => "EXTENSIONS"

Compute the principal branch of the complex natural logarithm. The angle theta is the principal argument. This code uses Kahan's algorithm for the scaled logarithm CLOGS(z,J) = ln(z*2^J), with J=0 and blind choices of the threshholds T0, T1, and T2. Namely, T0 = 1/sqrt(2), T1 = 5/4, and T2 = 3;

ZEXP (f: z -- exp[z] ) => "EXTENSIONS"

Z^ (f: x y u v -- [x+iy]^[u+iv] ) => "EXTENSIONS"

Compute in terms of the principal argument of x+iy.

ZCOSH (f: z -- cosh[z] ) => "EXTENSIONS"

ZSINH (f: z -- sinh[z] ) => "EXTENSIONS"

ZTANH (f: z -- tanh[z] ) => "EXTENSIONS"

Kahan, p. 204, including his divide by zero signal suppression for infinite values of tan(). To quote the very informative "=>'man math'" on our Darwin system about IEEE 754: "Divide-by-Zero is signaled only when a function takes exactly infinite values at finite operands."

ZCOTH (f: z -- 1/tanh[z] ) => "EXTENSIONS"

ZCOS (f: z -- cosh[i*z] ) => "EXTENSIONS"

ZSIN (f: z -- -i*sinh[i*z] ) => "EXTENSIONS"

ZTAN (f: z -- -i*tanh[i*z] ) => "EXTENSIONS"

ZCOT (f: z -- -i*coth[-i*z] ) => "EXTENSIONS"

ZACOS (f: z -- u+iv=acos[z] ) => "EXTENSIONS"

Kahan, p.202.

ZACOSH (f: z -- u+iv=acosh[z] ) => "EXTENSIONS"

Kahan, p.203.

ZASIN (f: z -- u+iv=asin[z] ) => "EXTENSIONS"

Kahan, p.203.

ZASINH (f: z -- -i*asin[i*z] ) => "EXTENSIONS"

Kahan, p. 203, couth.

ZATANH (f: z -- u+iv=atanh[z] ) => "EXTENSIONS"

Kahan, p. 203.

ZATAN (f: z -- -i*atanh[i*z] ) => "EXTENSIONS"

Kahan, p. 204, couth.

ZLITERAL - no description, sorry