Talk:24 game: Difference between revisions

Does the Perl code works?
(Does the Perl code works?)
Line 38:
: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)
 
== Does the Perl code works? ==
 
I have tryed to run the Perl code, and it seems that it doesn't recognise when the correct answer is given. --[[User:Blue Prawn|Blue Prawn]] 00:42, 26 January 2010 (UTC)