Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Isn't the square root of x squared just x?


Not for negative numbers. You could also just use the absolute value: http://www.wolframalpha.com/input/?i=x^2%2B(y-|x|)^2%3D1

EDIT: Woah. You got your answer at least.


Exactly. It all comes down to abs.


|x|


sqrt(-1^2) => 1


When you square root things they become + or -


Not if x is negative.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: