4 ms·
I did enjoy the one which computes π; > Naturally, a more accurate value can be obtained by using a bigger program. I think that's a first for me.
by gnfargbl 2y ago
I did enjoy the one which computes π;
> Naturally, a more accurate value can be obtained by using a bigger program.
I think that's a first for me.
- schoen 2y agoIsn't there an obfuscated C or Perl competition program that also estimates pi by measuring its own code in some way? Edit: Oh yes, it's "westley" from 1988: https://www.ioccc.org/years-spoiler.html#1988_westley https://www.ioccc.org/years-spoiler.html#1988_westley
- amenghra 2y agoI made a JavaScript port, that might be easier to decipher if you are more familiar with js than C: https://quaxio.com/pi.html https://quaxio.com/pi.html
- mzi 2y agohttps://www.cise.ufl.edu/~manuel/obfuscate/pi.c https://www.cise.ufl.edu/~manuel/obfuscate/pi.c If I remember correctly, this program also calculates pi more precisely the larger the circle.
- schoen 2y agoThat's originally westley.c from IOCCC 1988. As that site says: > Unless otherwise indicated, the code comes from the International Obfuscated C code contest.