#7017: prime_range problem
-----------------------------+----------------------------------------------
Reporter: kevin.stueve | Owner: kevin.stueve
Type: defect | Status: needs_review
Priority: critical | Milestone:
Component: number theory | Keywords: prime_range, primes, prime number
theory, prime
Work_issues: | Author: kevin.stueve
Upstream: N/A | Reviewer: was
Merged: |
-----------------------------+----------------------------------------------
Description changed by craigcitro:
Old description:
> I am having trouble with the following lines. I am on a
> MacBook pro. kevin.stueve
>
> from sage.rings.fast_arith import prime_range
> print prime_range(10^16,10^16+100)
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/Users/guestadmin/.sage/sage_notebook/worksheets/admin/3/code/
> 22.py",
> line 8, in <module>
> print prime_range(_sage_const_10 **_sage_const_16 ,_sage_const_10
> **_sage_const_16 +_sage_const_100 )
> File "", line 1, in <module>
>
> File "fast_arith.pyx", line 56, in sage.rings.fast_arith.prime_range
> (sage/rings/fast_arith.c:3813)
> File "fast_arith.pyx", line 105, in
> sage.rings.fast_arith.prime_range (sage/rings/fast_arith.c:3580)
> File "gen.pyx", line 8629, in
> sage.libs.pari.gen.PariInstance.primes_up_to_n
> (sage/libs/pari/gen.c:40808)
> OverflowError: long int too large to convert to int
>
>
> Those two lines gave me a segfault on sage.math:
>
> {{{[mv...@sage ~]$ sage
> ----------------------------------------------------------------------
> | Sage Version 4.1.1, Release Date: 2009-08-14 |
> | Type notebook() for the GUI, and license() for information. |
> ----------------------------------------------------------------------
> sage: from sage.rings.fast_arith import prime_range
> sage: print prime_range(10^16,10^16+100)
> /usr/local/sage/local/bin/sage-sage: line 199: 9892 Segmentation
> fault sage-ipython "$@" -i
>
> }}}
>
> Minh Van Nguyen
New description:
I am having trouble with the following lines. I am on a
MacBook pro. kevin.stueve
{{{
sage: from sage.rings.fast_arith import prime_range
sage: print prime_range(10^16,10^16+100)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/guestadmin/.sage/sage_notebook/worksheets/admin/3/code/
22.py",
line 8, in <module>
print prime_range(_sage_const_10 **_sage_const_16 ,_sage_const_10
**_sage_const_16 +_sage_const_100 )
File "", line 1, in <module>
File "fast_arith.pyx", line 56, in sage.rings.fast_arith.prime_range
(sage/rings/fast_arith.c:3813)
File "fast_arith.pyx", line 105, in
sage.rings.fast_arith.prime_range (sage/rings/fast_arith.c:3580)
File "gen.pyx", line 8629, in
sage.libs.pari.gen.PariInstance.primes_up_to_n
(sage/libs/pari/gen.c:40808)
OverflowError: long int too large to convert to int
}}}
Those two lines gave me a segfault on sage.math:
{{{
[mv...@sage ~]$ sage
----------------------------------------------------------------------
| Sage Version 4.1.1, Release Date: 2009-08-14 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: from sage.rings.fast_arith import prime_range
sage: print prime_range(10^16,10^16+100)
/usr/local/sage/local/bin/sage-sage: line 199: 9892 Segmentation
fault sage-ipython "$@" -i
}}}
Minh Van Nguyen
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7017#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
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-trac?hl=en.