Talk:Extensible prime generator: Difference between revisions

 
(One intermediate revision by one other user not shown)
Line 24:
 
That said... this *is* cute. But it also has a bit of a deus ex machina flavor. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 03:22, 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.
29

edits