Subject: | Documentation error in Math::Big |
Date: | Sun, 22 Aug 2010 14:05:57 +0300 |
To: | bug-Math-Big [...] rt.cpan.org |
From: | Tuomo Salo <bass [...] iki.fi> |
The synopsis for the primes() function in the Math::Big module is mistaken:
@primes = primes(100); # first 100 primes
$prime = primes(100); # 100th prime
this is not what happens:
tasalo@bimari:~$ perl -MMath::Big -le 'print for Math::Big::primes(10)'
2
3
5
7
tasalo@bimari:~$
The documentation in the METHODS section says
primes()
...
Calculates all the primes below N and returns them as array. In scalar
context returns the number of primes below N.
This seems to be the actual behaviour.
Cheers,
-bass