paddy3118 has asked for the wisdom of the Perl Monks concerning the following question:
I just cut-n-pasted the Bigint examples into a cygwin window, expecting them all to pass.
The result was:
bash$ perl -Mbigint -le 'print sqrt(33)' 5 bash$ perl -Mbigint -le 'print 2*255' 510 bash$ perl -Mbigint -le 'print 4.5+2*255' 514 bash$ perl -Mbigint -le 'print 3/7 + 5/7 + 8/3' 2 bash$ perl -Mbigint -le 'print 123->is_odd()' 1 bash$ perl -Mbigint -le 'print log(2)' Can't use an undefined value as an ARRAY reference at /usr/lib/ perl5/5.8/Math/Bi gInt/Calc.pm line 1338. bash$ perl -Mbigint -le 'print 2 ** 0.5' 1 bash$ perl -Mbigint=a,65 -le 'print 2 ** 0.2' 1 bash$ perl -Mbignum=a,65,l,GMP -le 'print 7 ** 7777' "l" is not exported by the bignum module Can't continue after import errors at /usr/lib/perl5/5.8/bignum.pm line 171 BEGIN failed--compilation aborted. bash$ <font face="Courier, Monospaced">I guess GMP is missing but why did th +e 'print log(2)' example fail? <font face="Courier, Monospaced">Perl information: <font face="Courier, Monospaced">bash$ perl -V Summary of my perl5 (revision 5 version 8 subversion 7) configuration: Platform: osname=cygwin, osvers=1.5.18(0.13242), archname=cygwin-thread- multi-64int uname='cygwin_nt-5.1 inspiron 1.5.18(0.13242) 2005-07-02 20:30 i686 unknown unknown cygwin ' config_args='-de -Dmksymlinks -Duse64bitint -Dusethreads - Uusemymalloc -Dopt imize=-O3 -Dman3ext=3pm -Dusesitecustomize' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=de fine useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing - pipe -I/usr /local/include', optimize='-O3', cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr +/ local/inc lude' ccversion='', gccversion='3.4.4 (cygming special) (gdc 0.12, using dmd 0.125 )', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lsee ksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='ld2', ldflags =' -s -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lgdbm -ldb -lcrypt -lgdbm_compat perllibs=-lcrypt -lgdbm_compat libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s' cccdlflags=' ', lddlflags=' -s -L/usr/local/lib' <font face="Courier, Monospaced">Characteristics of this binary (from +libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_64_BIT_INT USE_LARGE_FILES USE_SITECUSTOMIZE PERL_IMPLICIT_CONTEXT Locally applied patches: SPRINTF0 - fixes for sprintf formatting issues - CVE-2005-3962 Built under cygwin Compiled at Dec 30 2005 02:44:25 %ENV: CYGWIN="" @INC: /usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 . bash$
20080119 Janitored by Corion: Removed font tags, added code tags, as per Writeup Formatting Tips
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: http://perldoc.perl.org/bigint.html#EXAMPLES Failing on Cygwin
by syphilis (Archbishop) on Jan 05, 2008 at 08:08 UTC |