Code Golf Challenge : 1,000 Digits Of Pi
Paddy
paddy3118 at netscape.net
Mon Sep 18 17:49:24 EDT 2006
Paul Rubin wrote:
> bearophileHUGS at lycos.com writes:
> > With Python you can't win, because Perl and Ruby allow for shorter
> > programs.
>
> Python has native bignums, which should simplify a program like this
> enormously. I don't know if Ruby has them. Perl doesn't, and if you
> use some CPAN library that simulates them, that should count as part
> of your program size.
Unfortunately:
$ perl -Mbignum -e 'print
1234567890123456789012345678901234567890,"\n"'
1234567890123456789012345678901234567890
HP DV8025EA at PADDYS-HPLAPTOP /cygdrive/c/Documents and Settings/All
Users/Documents/Python tutorial
$ perl -v
This is perl, v5.8.7 built for cygwin-thread-multi-64int
(with 1 registered patch, see perl -V for more detail)
Yep my standard Cygwin perl installation for windows includes the
bignum package.
- Paddy.
More information about the Python-list
mailing list