Open fbruetting opened 7 years ago
As far as I understand Julia, complex numbers aren't separated in real and imaginary parts
That's incorrect (see the source code). However, Julia's complex numbers are typed as Complex{T<:Real}
and since unitful quantities don't subtype Real
they can't be used independently for the built-in variables.
Instead, we usually do SIQuantity{Complex{T}, ...}
, in which case we don't separate units over the real and imaginary parts.
Not sure if I understand your answer correct, but am I right, that at least a switch from W
to VA
is possible when complex numbers are used in conjunction with SIUnits?
• Would be great if complex power could be named by
VA
, while real power staysW
and imaginary power getsVar
. • As far as I understand Julia, complex numbers aren't separated in real and imaginary parts, but this would be really useful for e.g. axis labeling, if the real or imaginary part of a complex number is zero or the Type Real is used somehow. At leastW
should be substituted byVA
if SIUnits.jl is used in conjunction with Type Complex.Depends on: #54 / #76 / #104.