## Some Gallot-inspired sillyness

Expand Messages
• Two rather silly things. Firstly, after pulling a completely random number out of the air rather than actually remembering the error-bound in Yves initial
Message 1 of 6 , Jun 20, 2001
Two rather silly things.

Firstly, after pulling a completely random number out of the air rather than actually remembering the error-bound in Yves initial 'FFT' mail, I decided to start rechecking a 'Proth' prime that was in fact valid anyway, but using a non-FFT method.
I now 'proudly' present what I believe to be the world's largest non-FFT-proved prime! (one of David Underbakke's)
116691*2^337001+1 .
Certainly a target nearly as sensible as Paul Jobling's faux Titanix prime which was in the most part made from N+/-1 steps rather than EC steps.

Secondly, I decided to start code-reviewing and verifying some other FFT code used in the prime arena. The particular code I looked at appeared to not suffer from the overflow risk problem! Not only that, but I managed to optimise it too!

So I also, even more proudly, present what I believe to be the world's smallest C program to print the world's largest prime!

#define P for(p=t;p<t+N;
int m=754974721,N,t[1<<22],*p,i,e
=4625195,j,s,c,U;f(d){for(s=1<<23
;s;d=d*1LL*d%m,s/=2)if(s<N)P p+=s
)for(i=s,c=1;i;i--)j=*p+p[s],p[s]
=(m+*p-p[s])*1LL*c%m,*p++=j%m,c=c
*1LL*d%m;for(j=0;++i<N;){for(c=N/
2;!((j^=c)&c);c/=2);i<j?t[i]^=t[j
]^=t[i]^=t[j]:0;}}main(){for(*t=2
,U=N=1;e/=2;){U=U*1LL*(m+1)/2%m;N
*=2;f(362);P)*p++=*p*1LL**p%m*U%m
;f(415027540);P)s+=*p<<(e&1),*p++
=s%10,s/=10;}for(--*t;p>t;)(e|=*
--p)&&printf("%d",*p);}

Yes, it's based on Fabrice's Bellard's IOCCC entry from last year. However, it's over 30 bytes (about 7%) shorter.

(It takes a few minutes to run, and produces >2MB of numeric output.)

Enjoy,
Phil

Mathematics should not have to involve martyrdom;
Support Eric Weisstein, see http://mathworld.wolfram.com
Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com
• ... [SNIP silly thing] ... [SNIP Phil d IOCCC entry] ... You should be disallowed, you know :-) Christ van Willegen
Message 2 of 6 , Jun 20, 2001
On 20 Jun 2001, Phil Carmody wrote:
> Two rather silly things.

[SNIP silly thing]

> Secondly, I decided to start code-reviewing and verifying some
> other FFT code used in the prime arena. The particular code I
> looked at appeared to not suffer from the overflow risk problem!
> Not only that, but I managed to optimise it too!
>
> So I also, even more proudly, present what I believe to be the
> world's smallest C program to print the world's largest prime!

[SNIP Phil'd IOCCC entry]

> Yes, it's based on Fabrice's Bellard's IOCCC entry from last
> year. However, it's over 30 bytes (about 7%) shorter.

You should be disallowed, you know :-)

Christ van Willegen
• ... ignoring cosmic rays and carmody brain failure (which are both more probable than FFT failure:-)
Message 3 of 6 , Jun 20, 2001
Phil Carmody wrote:
>the world's largest prime!
ignoring cosmic rays and carmody brain failure
(which are both more probable than FFT failure:-)
• On Wed, 20 Jun 2001 17:33:37 +0200 (CEST), Christ van Willegen ... Why? Isn t there a rule that all programs must be in the public domain? :-) Nathan
Message 4 of 6 , Jun 20, 2001
On Wed, 20 Jun 2001 17:33:37 +0200 (CEST), Christ van Willegen
<christw@...> wrote:

>On 20 Jun 2001, Phil Carmody wrote:
>> Two rather silly things.
>
>[SNIP silly thing]
>
>> Secondly, I decided to start code-reviewing and verifying some
>> other FFT code used in the prime arena. The particular code I
>> looked at appeared to not suffer from the overflow risk problem!
>> Not only that, but I managed to optimise it too!
>>
>> So I also, even more proudly, present what I believe to be the
>> world's smallest C program to print the world's largest prime!
>
>[SNIP Phil'd IOCCC entry]
>
>> Yes, it's based on Fabrice's Bellard's IOCCC entry from last
>> year. However, it's over 30 bytes (about 7%) shorter.
>
>You should be disallowed, you know :-)

Why? Isn't there a rule that all programs must be in the public
domain? :-)

Nathan
• On Wed, 20 Jun 2001, Nathan Russell wrote: [SNIP Phil s even more obfuscated IOCCC entry] ... Yes, but Phil does this _every_time_. Some time ago, Phil
Message 5 of 6 , Jun 20, 2001
On Wed, 20 Jun 2001, Nathan Russell wrote:

[SNIP Phil's even more obfuscated IOCCC entry]

> >You should be disallowed, you know :-)
>
> Why? Isn't there a rule that all programs must be in the public
> domain? :-)
>
> Nathan

Yes, but Phil does this _every_time_.

Some time ago, Phil contributed an 'illegal' prime into Chris'
database (he one that, you know, contains the highly illegal
source to decrypting DVD's. Oh my, now mathematics _itself_ may
be sued by the MPAA/RIAA if we're not careful). If I remember
correctly, he got his hands onto the program before turning
it into a prime, optimizing the code even further. He even
_admitted_ doing this on the list (I can't find the reference,
but I know it's there...)

Before I get flame-mail from all over the planet, all of this
was :-) for the humor-impaired.

Phil, thanks for optimizing everything you see!

(I'll shut up now, I've ranted enough already today)

Christ van Willegen
• ... Oh dear, am I becoming predictable? ... It was a different piece of code, one by Charles Hannum, that I shrank. ... Maybe just once I ll turn my hand to
Message 6 of 6 , Jun 20, 2001
On Wed, 20 June 2001, Christ van Willegen wrote:
> Yes, but Phil does this _every_time_.

Oh dear, am I becoming predictable?

> Some time ago, Phil contributed an 'illegal' prime into Chris'
> database (he one that, you know, contains the highly illegal
> source to decrypting DVD's. Oh my, now mathematics _itself_ may
> be sued by the MPAA/RIAA if we're not careful). If I remember
> correctly, he got his hands onto the program before turning
> it into a prime, optimizing the code even further. He even

It was a different piece of code, one by Charles Hannum, that I shrank.

> Phil, thanks for optimizing everything you see!

Maybe just once I'll turn my hand to something useful.

Naaaaaah!

Phil

Mathematics should not have to involve martyrdom;
Support Eric Weisstein, see http://mathworld.wolfram.com
Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com
Your message has been successfully submitted and would be delivered to recipients shortly.