-
Notifications
You must be signed in to change notification settings - Fork 29
Description
The following method always seems to return 0 + 0ɛ for positive duals.
angle{T<:Real}(z::DualNumbers.Dual{T})
angle{T<:Real}(z::Dual{T}) = z ≥ 0 ? zero(z) : one(z)*π
This is a lot different than the definition of argument that I'm familiar with. In the generalized complex numbers, parameterized by p and q:
z = x + iy (x, y ∈ R) where i^2 =iq + p (q, p ∈ R)
(so i, ɛ, λ, whatever we call the imaginary unit)
Ignoring q and setting it to zero, and setting p = 0 we get the Dual numbers, p = 1 gives Double numbers, and p = -1 giving the regular Complex numbers. There is a general definition for angle or argument, magnitude or norm, and a very weird concept of unit circle, that is only actually what you would call a circle for p = -1.
So the unit "circle" is everywhere ||z|| = 1, which for duals is just at 1 and -1.
So for duals the argument is y / x. I will link to a paper, and just paste an image of the relevant part here.
Here is a link to the paper this is from:
https://people.rit.edu/harkin/research/articles/generalized_complex_numbers.pdf
The paper also shows how to implement the sinp, cosp, and tanp trig functions for any value of p.

