ladiv#

Functions

void sladiv(
    const f32  a,
    const f32  b,
    const f32  c,
    const f32  d,
          f32* p,
          f32* q
);
void sladiv(const f32 a, const f32 b, const f32 c, const f32 d, f32 *p, f32 *q)#

SLADIV performs complex division in real arithmetic.

           a + i*b
p + i*q = ---------
           c + i*d

Further Details:

The algorithm is due to Michael Baudin and Robert L. Smith and can be found in the paper “A Robust Complex Division in Scilab”. https://doi.org/10.48550/arXiv.1210.4539

Parameters

in
a

Single precision scalar. The scalar a in the above expression.

in
b

Single precision scalar. The scalar b in the above expression.

in
c

Single precision scalar. The scalar c in the above expression.

in
d

Single precision scalar. The scalar d in the above expression.

out
p

Receives the real part of the result.

out
q

Receives the imaginary part of the result.

Functions

void dladiv(
    const f64  a,
    const f64  b,
    const f64  c,
    const f64  d,
          f64* p,
          f64* q
);
void dladiv(const f64 a, const f64 b, const f64 c, const f64 d, f64 *p, f64 *q)#

DLADIV performs complex division in real arithmetic.

           a + i*b
p + i*q = ---------
           c + i*d

Further Details:

The algorithm is due to Michael Baudin and Robert L. Smith and can be found in the paper “A Robust Complex Division in Scilab”. https://doi.org/10.48550/arXiv.1210.4539

Parameters

in
a

Double precision scalar. The scalar a in the above expression.

in
b

Double precision scalar. The scalar b in the above expression.

in
c

Double precision scalar. The scalar c in the above expression.

in
d

Double precision scalar. The scalar d in the above expression.

out
p

Receives the real part of the result.

out
q

Receives the imaginary part of the result.

Functions

c64 cladiv(
    const c64 X,
    const c64 Y
);
c64 cladiv(const c64 X, const c64 Y)#

CLADIV := X / Y, where X and Y are complex.

The computation of X / Y will not overflow on an intermediary step unless the results overflows.

Parameters

in
X

Single complex scalar. The complex scalar X.

in
Y

Single complex scalar. The complex scalar Y.

Returns:

The complex quotient X / Y.

Functions

c128 zladiv(
    const c128 X,
    const c128 Y
);
c128 zladiv(const c128 X, const c128 Y)#

ZLADIV := X / Y, where X and Y are complex.

The computation of X / Y will not overflow on an intermediary step unless the results overflows.

Parameters

in
X

Double complex scalar. The complex scalar X.

in
Y

Double complex scalar. The complex scalar Y.

Returns:

The complex quotient X / Y.