Hacker Newsnew | comments | show | ask | jobs | submit login

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 | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: