With floats, there’s almost always *some* valid input that will make your algorithm behave badly, and you have to recover as best you can.
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Fixed point is pretty great. You don't get as much precision/dynamic range but the constant bin size makes it easy to reason about. I think floating point ends up being used by default a lot in domains where it doesn't add much.
-
Re float <=> double conversions, the thing to remember is that the data type width is generally treated as an assertion about the stored value's significant bits. Float -> double zeros the lower 32 bits, but the fact that only 32 bits are significant in the double is lost.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.