LADIV - LADIV - 5.3 English - 68552

AOCL API Guide (68552)

Document_ID
68552
Release_Date
2026-05-13
Version
5.3 English
template<typename T>
void ladiv(T *a, T *b, T *c, T *d, T *p, T *q)#

LADIV performs complex division in real arithmetic, avoiding unnecessary overflow.

Purpose:

 LADIV performs complex division in  real arithmetic

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

 The algorithm is due to Michael Baudin and Robert L. Smith
 and can be found in the paper
 "A Robust Complex Division in Scilab"
Parameters:
  • A – [in] A is REAL

  • B – [in] B is REAL

  • C – [in] C is REAL

  • D – [in]

    D is REAL

    The scalars a, b, c, and d in the above expression.

  • P – [out] P is REAL

  • Q – [out]

    Q is REAL

    The scalars p and q in the above expression.