Talk:24 game: Difference between revisions

→‎Floating point: We're in agreement
(→‎Floating point: We're in agreement)
Line 36:
 
:One potential problem with floating point, when you get to more than 4 digits, is that in some languages (not Python), division by 0.0 evaluates to infinity (which can be divided by again to get 0), instead of raising an error, so for example, this in Ruby: <code>3.0 * (8.0 + 4.0 / (2.0 / (5.0 - 5.0)))</code> results in 24.0, which you might not want to allow. But I agree that this is not an issue with only 4 digits. --[[User:Spoon!|Spoon!]] 14:16, 8 December 2009 (UTC)
:: Precisely. That's why it matters that it is a “24-game player”. A solution with computation using rationals would be interesting though. –[[User:Dkf|Donal Fellows]] 14:57, 8 December 2009 (UTC)
Anonymous user