Talk:Deal cards for FreeCell: Difference between revisions

From Rosetta Code
Content added Content deleted
m (→‎equation clarification: added a new talk section.)
(Under-tested cosmetic edits of 21:04, 15 May 2016 left formulae invisible)
Line 33: Line 33:
::* &nbsp; <big><math>state_{n + 1} \equiv [ 214013 \times state_n + 2531011 ] \pmod{2^{31}}</math></big>
::* &nbsp; <big><math>state_{n + 1} \equiv [ 214013 \times state_n + 2531011 ] \pmod{2^{31}}</math></big>
to indicate that the modulus is for the entire equation, not just the last term; &nbsp; even though by inspection, it becomes obvious what was meant. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:33, 11 June 2015 (UTC)
to indicate that the modulus is for the entire equation, not just the last term; &nbsp; even though by inspection, it becomes obvious what was meant. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:33, 11 June 2015 (UTC)


==Formulae hidden to most browsers by under-tested cosmetic edits at 21:04, 15 May 2016 ==

Under-tested cosmetic edits made to the task page at 21:04, 15 May 2016, including the injection of spaces around expressions in &lt;math&gt; tags, have left some or all of the task description formulae completely invisible to all browsers which display the graphic file version of formulae rather than processing the MathML (this is, in fact, the majority of browsers). The MediaWiki processor does not currently expect such spaces, and generates syntactically ill-formed HTML if they are introduced. Other aspects of these cosmetic edits may further compound the problem. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 18:59, 22 September 2016 (UTC)

Revision as of 19:00, 22 September 2016

task?

I see that although shuffle is not specified we have two implementations. But I have no way of knowing if they are correct implementations. Perhaps we should have an example? With this starting seed, we have this deck of cards? --Rdm 11:15, 19 September 2011 (UTC)

Example

I know this doesn't give the shuffle algorithm but ... it gives the result for seed=1 [1] and appears compatible with [2]

  1  2  3  4  5  6  7  8
 JD 2D 9H JC 5D 7H 7C 5H
 KD KC 9S 5S AD QC KH 3H
 2S KS 9D QD JS AS AH 3C
 4C 5C TS QH 4H AC 4D 7S
 3S TD 4S TH 8H 2C JH 7D
 6D 8S 8D QS 6C 3D 8C TC
 6S 9C 2H 6H

There is a reference to the shuffle algorithm here [3]

--Dgamey 14:26, 19 September 2011 (UTC)

32 bit Perl fix

The sample code for Perl works for perl 5.16 64 bit but not for perl 5.8 32 bit (e.g. game# 1070). This fix works for both.

#       return (($s = ($s * 214013 + 2531011) & 0x7fffffff) >> 16 );
        return (($s = ($s * 214013 + 2531011) % 2**31     ) >> 16 ); # fix for 32 bit perl

equation clarification

The equation:

  •  

should probably read

  •  

to indicate that the modulus is for the entire equation, not just the last term;   even though by inspection, it becomes obvious what was meant. -- Gerard Schildberger (talk) 23:33, 11 June 2015 (UTC)


Formulae hidden to most browsers by under-tested cosmetic edits at 21:04, 15 May 2016

Under-tested cosmetic edits made to the task page at 21:04, 15 May 2016, including the injection of spaces around expressions in <math> tags, have left some or all of the task description formulae completely invisible to all browsers which display the graphic file version of formulae rather than processing the MathML (this is, in fact, the majority of browsers). The MediaWiki processor does not currently expect such spaces, and generates syntactically ill-formed HTML if they are introduced. Other aspects of these cosmetic edits may further compound the problem. Hout (talk) 18:59, 22 September 2016 (UTC)