logoalt Hacker News

kzrdudetoday at 2:31 PM1 replyview on HN

Simple rule to keep in mind that even math savvy people seem to forget about is that: sqrt(x²) = |x| with bars for absolute value.

For a programmer, it's clear that we have lost the sign information but not the magnitude.

Simple. Makes most sign and solution reasoning explicit instead of implicit when solving quadratics or otherwise working with square roots.


Replies

tzstoday at 3:50 PM

> Simple rule to keep in mind that even math savvy people seem to forget about is that: sqrt(x²) = |x| with bars for absolute value.

i would disagree with that (pun intended).