New strong pseudo-carmody prime found!
- There is a serious side to this, skip to the end if you don't want the silly
91 is not the only carmody prime - I've found a new one!
Like 91 it's easy to see it's the difference of 2 squares (18^2-5^2), however,
it looks prime - not just to the (carmodian) eye, but also to a well known fast
prime generation library when compiled on a PowerPC architecture.
$ ./primes 1 300
>>>Yikes. And there are many more...
Is anyone using any of my sieves on PPC? If they are, then let me know, and
I'll diagnose whether this bug may be an issue for your application. As far as
I am aware, no-one with a PPC is using the code that has the bug. I've
reproduced the identical error on a Pegasos G4 linux gcc3.4.3 system and a G5
linux gcc4.0 system.
() ASCII ribbon campaign () Hopeless ribbon campaign
/\ against HTML mail /\ against gratuitous bloodshed
[stolen with permission from Daniel B. Cristofani]
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
- --- In email@example.com, Phil Carmody <thefatphil@...> wrote:
> prime generation library when compiled on a PowerPC architecture.The library in question was DJB's primegen, and the issue was that gcc
on the Power architecture seems to like having _unsigned_ chars by
default (unlike all other integer types, which, if not explicitly
marked 'unsigned' will be signed). This messes with a couple of the
tables of constants. The solution is either to force the compiler to
used signed chars by default, or to explicitly change the structures
such that the members are explicitly signed. Dan actually fixed this
within a day of me reporting the bug to him, but I forgot to report
back here. His webpage has been updated to document this gcc-gotcha.