I am a simple minded user and have some questions concerning Sage
functions. May be I misunderstand the docu at
http://sage.math.washington.edu/home/mhansen/sage-epydoc/sage.rings.arith-module.html#primes?
Here an excerpt:
eratosthenes(n)
Return a list of the primes $\leq n$.
prange(start, stop=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37',
'atlas-3.8.1', 'a..., leave_pari=False)
List of all primes between start and stop-1, inclusive.
primes(start, stop=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37',
'atlas-3.8.1', 'a...)
Returns an iterator over all primes between start and stop-1, inclusive.
prime_range(start, stop=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37',
'atlas-3.8.1', 'a..., leave_pari=False)
List of all primes between start and stop-1, inclusive.
I tried all of these functions and found only erasthotenes() and
prime_range() really working. prange() and primes() gives some strange
output:
sage: prange(1,100)
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/home/bb/sage-4.3.3-linux-64bit-arch_linux-x86_64-Linux/<ipython
console> in <module>()
NameError: name 'prange' is not defined
sage: primes(1,100)
<generator object primes at 0x4e576e0>
sage:
I also did some syntactic variations without success. I argue that
prange() and primerange should be identic, but there is a link or an
alias missing?
I tried that on a 64 bit AMD machine self compiled:
----------------------------------------------------------------------
| Sage Version 4.3.3, Release Date: 2010-02-21 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
Regards BB
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
To unsubscribe, reply using "remove me" as the subject.