Talk:Extensible prime generator: Difference between revisions
Content added Content deleted
(→Bug in Fortran code: new section) |
|||
Line 26: | Line 26: | ||
* You are right. If a magician pulls a rabbit out of a hat, then we know for sure that he putted it there before. The same is here. To pull prime numbers out of ''C'', we need to secretly put them before. The only difference is that a magician's hat usually has one false bottom, ''C'' has infinitely many false bottoms. [[User:Alexei Kopylov|Alexei Kopylov]] ([[User talk:Alexei Kopylov|talk]]) 04:33, 2 July 2022 (UTC) |
* You are right. If a magician pulls a rabbit out of a hat, then we know for sure that he putted it there before. The same is here. To pull prime numbers out of ''C'', we need to secretly put them before. The only difference is that a magician's hat usually has one false bottom, ''C'' has infinitely many false bottoms. [[User:Alexei Kopylov|Alexei Kopylov]] ([[User talk:Alexei Kopylov|talk]]) 04:33, 2 July 2022 (UTC) |
||
== Bug in Fortran code == |
|||
The Fortran code by Gordon Goodsman contains |
|||
CALL PSURGE(SCHAR) !During preparation of the first batch of bits. |
|||
This usage of PSURGE as a subroutine disagrees with the declaration of PSURGE as a function of type LOGICAL. One possible fix is to replace the call by |
|||
PSRG = PSURGE(SCHAR) |
|||
where PSRG is of type LOGICAL (a variable is set but never used afterwards). |
|||
Other than this, the code is a very good contribution. |