A
Angus Hammond
Is there a way to get an accurate square root?
This means that a negative number should return the appropriate complex
number. I have been having some trouble with this in a program that
solves quadratic equations recently. Ideally but not necessarily it
should be able to get the square root of complex numbers as well.
NB Neither -2**0.5 or Math::sqrt(-2) return appropriate answers. (-2 and
an error respectively)
Thanks in advance.
This means that a negative number should return the appropriate complex
number. I have been having some trouble with this in a program that
solves quadratic equations recently. Ideally but not necessarily it
should be able to get the square root of complex numbers as well.
NB Neither -2**0.5 or Math::sqrt(-2) return appropriate answers. (-2 and
an error respectively)
Thanks in advance.