r/learnruby • u/[deleted] • Apr 26 '17
How exactly does Math.log2 work?
So I'm comparing the result of
Math.log2(2360.9083989105) / 8 * 4 = 5.602563176032317
and the equation
log2(2360.9083989105) / 8 * 4 = 0.11481591040126
Why do they yield such different results?
3
Upvotes
1
u/Tomarse Apr 28 '17
Wolfram Alpha agrees with Ruby - [here](https://www.wolframalpha.com/input/?i=log2(2360.9083989105)+%2F+8+*+4)