Yeah, you're missing the floating point bug. Your code works for trivial cases, but if you're using it on a number that *might* have been from a math operation, or from a number that was cast from a string, then the floating point bug might cause that to return the wrong value.
5
1
24





