3 ms·
how about some floating point sizes? then again, thinking about code with timestamps in float makes me scared
by ysofunny 3y ago
how about some floating point sizes?
then again, thinking about code with timestamps in float makes me scared
- bqmjjx0kac 3y agoI once wrote a fuzzer for some code that serialized and deserialized a particular data structure that included a timestamp -- the complexity cannot be overstated. Basically every possible edge case came up: floats can be infinity, negative infinity, negative zero, NaN, and even subnormal. The bulk of the problems occurred because we deserialized the float timestamp and proceeded to do unchecked math on it, then expected it to be a normal value.
- robotnikman 3y agoI seeing a screenshot in a programming subreddit showing a financial institution storing monetary data as floats, so I wouldn't be surprised.
- ReactiveJelly 3y agoI swear John Carmack said somewhere "Time should be a double that starts from 1 billion" or something, for games or VR or something. Of course when I search on DDG I only get "wow the fast inverse square root"
- mrmincent 3y agoThis one? https://twitter.com/ID_AA_Carmack/status/418158611664097280 https://twitter.com/ID_AA_Carmack/status/418158611664097280