Here's a fairly extreme nerd snipe: what does this do and why? Apologies to those who just can't wrap their head around it. ((x + 0.24999994) + 0.25000006).floor()
Wow, that's interesting and mysterious. I would have thought that f64 has the same rounding behavior as f32, just more precision, but I guess not. Worth looking into more deeply. Also yay SMT.
-
-
This seems to work for double: ((x + 0.249999999999995) + 0.250000000000005).floor(). It's proved by CVC4.
-
Ahhhh right, sure. That's what I would expect. It's not the exact constants, it's their relationship with epsilon. Whew.
- 3 more replies
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.