←back to thread

352 points ferriswil | 1 comments | | HN request time: 0.223s | source
Show context
remexre ◴[] No.41889747[source]
Isn't this just taking advantage of "log(x) + log(y) = log(xy)"? The IEEE754 floating-point representation stores floats as sign, mantissa, and exponent -- ignore the first two (you quantitized anyway, right?), and the exponent is just an integer storing log() of the float.
replies(2): >>41889800 #>>41890236 #
mota7 ◴[] No.41890236[source]
Not quite: It's taking advantage of (1+a)(1+b) = 1 + a + b + ab. And where a and b are both small-ish, ab is really small and can just be ignored.

So it turns the (1+a)(1+b) into 1+a+b. Which is definitely not the same! But it turns out, machine guessing apparently doesn't care much about the difference.

replies(3): >>41890382 #>>41890513 #>>41892121 #
1. dsv3099i ◴[] No.41892121[source]
This trick is used a ton when doing hand calculation in engineering as well. It can save a lot of work.

You're going to have tolerance on the result anyway, so what's a little more error. :)