v04i110: An amazingly small C-program

Ralph Harnden ralph at rtech.rtech.com
Thu Oct 6 15:31:36 AEST 1988


In article <2456 at mhres.mh.nl> jv at mhres.mh.nl (Johan Vromans) writes:
>From article <7656 at boring.cwi.nl>, by tromp at cwi.nl.UUCP (John Tromp):
>> Posting-number: Volume 4, Issue 110
>> Submitted-by: "John Tromp" <tromp at cwi.nl.UUCP>
>> Archive-name: mazemaze
>...
>Compile and run on a System V.3 system (NatSem 32332 based):
>[lines truncated on behalf of mailers]:
>} ._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
>} | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
>} | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
>} | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
>} | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
>} |_._._._._._._._._._._._._._._._._._._._._._._._._._._._.
>...

Similar results on my 3B1.  Problem is rand(3C) returns int between -2**15+1
and 2**15-1, but the code expects int between 0 and 2**31-1.  Change rand()
to lrand48().  Or change "6<<27<rand()" to "6<<11<abs(rand())".  May work 4U.
-- 
"People will do anything for a potato"

{amdahl, mtxinu, ptsfa, sun}!rtech!gusano!ralph ralph at gusano@rtech.com



More information about the Comp.sources.bugs mailing list