gjoisa Active Member Licensed User Longtime User Mar 9, 2014 #1 In my app I am trying to get the square root of a negative number which resuults value NaN . How to work out it ?
In my app I am trying to get the square root of a negative number which resuults value NaN . How to work out it ?
DonManfred Expert Licensed User Longtime User Mar 9, 2014 #2 Without seeing any code you are using it is hard to help Maybe it helps to use a positive calculation and then you multiply the result with -1 Upvote 0
Without seeing any code you are using it is hard to help Maybe it helps to use a positive calculation and then you multiply the result with -1
klaus Expert Licensed User Longtime User Mar 9, 2014 #3 You cannot get a square root of a negative number ! What you can do is Sqrt(Abs(x)). The sign of the square root is undefined. (+2) * (+2) = 4 and (-2) * (-2) = 4 !!! Upvote 0
You cannot get a square root of a negative number ! What you can do is Sqrt(Abs(x)). The sign of the square root is undefined. (+2) * (+2) = 4 and (-2) * (-2) = 4 !!!
Erel B4X founder Staff member Licensed User Longtime User Mar 9, 2014 #4 http://en.wikipedia.org/wiki/Complex_number Upvote 0