Function calc_quadrature
pub fn calc_quadrature(magnitude: f64, real: f64) -> f64Expand description
The quadrature leg √(m² − r²) of a magnitude m and its in phase
part r, formed as √((m − |r|)(m + |r|)), free of the cancellation of
m² − r² near |r| = m, and as m √((1 − q)(1 + q)) with
q = |r| / m where that product overflows: the reactance of a short
circuit test from its impedance and
resistance, the magnetizing current of a no load test from its exciting
current and loss, the reactive power of an apparent power and its active
part, and with m = 1 the sine of a power factor
(calc_power_factor_sine). Zero when both are zero; NaN when
|r| > m or either is NaN. The caller states what an excess means for
its quantity.