logoalt Hacker News

jmyeetyesterday at 2:21 PM3 repliesview on HN

If you can't recognize how much simpler the simplified version is, I'm not sure exactly what to tell you. But let's think about it in terms of assembly steps:

1. Multiply the input by itself

2. Add 1

3. Take the square root. There is often a fast square root function available.

The above is a fairly simply sequence of SIMD instructions. You can even do it without SIMD if you want.

Compare this to sinh being (e^x - e^-x) / 2 (you can reduce this to one exponentiation in terms of e^2x but I digress) and arccosh being ln(x + sqrt(s^2 - 1)) and you have an exponentiation, subtraction, division, logarithm, addition, square root and a subtraction. Computers generally implement e^2 and logarithm using numerical method approximations (eg of a Taylor's series expansion).


Replies

oh_my_goodnessyesterday at 5:08 PM

This is sometimes helpful. But more often it has very little overlap with what I need when I "simplify" some math.

"Simplify" is a very old term (>50y) in computer algebra. Its meaning has become kind of layered in that time.

noosphryesterday at 2:28 PM

If simplify means make it fast for a computer to run we might as well make division illegal.