Talk:24 game/Solve: Difference between revisions

(→‎Use 3 3 8 8 in example runs?: added some comments.)
 
(3 intermediate revisions by 2 users not shown)
Line 52:
I realise 6 + 6 + 6 + 6 is an alternative solution for this, but I'm curious nonetheless.
--[[User:Rjf89|Rjf89]] 00:28, 6 January 2011 (UTC)
 
: Sounds fine to me, although thats leads to the question: "Is there a set of digits where a leading minus is necessary"? I don't think it is necessary - but do think it is allowed. --[[User:Paddy3118|Paddy3118]] 06:04, 26 January 2011 (UTC)
 
:: This leads to another question: what operations may be considered part of an [http://www.webopedia.com/TERM/A/arithmetic_expression.html arithmetic expression]?
::: wp mentions ''"Addition, subtraction, multiplication, or division, and sometimes other operations"'' so there are probably variants that use a different mix of operators, but our game specifically mentions just those first four. --[[User:Paddy3118|Paddy3118]] 21:23, 27 January 2011 (UTC)
 
== Use 3 3 8 8 in example runs? ==
I have just updated the Python example to use precise rational arithmatic whenever a division is involved as the solution with the digits 3 3 8 and 8 of 8 / (3 - 8 / 3) does not evaluate to 24 when using floating point. You might have to switch too (although the task description does not mandate this)! --[[User:Paddy3118|Paddy3118]] 06:00, 26 January 2011 (UTC)
 
: I just noticed that my REXX program also suffered the same weakness.   I have corrected the comparison logic and added support to find solutions for such numbers   (that needed rational arithmetic or something similar).   I also agree that '''3388''' should be one of   ''those''   numbers to be tested for program validation.     -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 09:22, 1 January 2019 (UTC)