Sage crashes with a rational exponent

23 views
Skip to first unread message

Tavian Barnes

unread,
Aug 31, 2017, 12:16:36 PM8/31/17
to sage-support
The following simple expression crashes Sage 8.0 on Arch Linux:

tavianator@cosmicray $ sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.0, Release Date: 2017-07-21                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
sage: version()
'SageMath version 8.0, Release Date: 2017-07-21'
sage: sage: (2*sqrt(x))^Rational(2)
---------------------------------------------------------------------------
MemoryError                               Traceback (most recent call last)
sage/rings/integer.pyx in sage.rings.integer.Integer.__repr__ (/build/sagemath/src/sage-8.0/src/src/build/cythonized/sage/rings/integer.c:7976)()

sage/rings/integer.pyx in sage.rings.integer.Integer.str (/build/sagemath/src/sage-8.0/src/src/build/cythonized/sage/rings/integer.c:8429)()

memory.pxd in cysignals.memory.check_malloc (/build/sagemath/src/sage-8.0/src/src/build/cythonized/sage/rings/integer.c:45920)()

MemoryError: failed to allocate 1292913990 bytes
Exception MemoryError: MemoryError('failed to allocate 1292913990 bytes',) in 'sage.libs.pynac.pynac.py_repr' ignored
 

Vincent Delecroix

unread,
Aug 31, 2017, 12:24:29 PM8/31/17
to sage-s...@googlegroups.com
Thanks for you report. It works fine for me 8.1.beta3 also on archlinux.

Can you give more precision about:
- how did you install sage 8.0?
- does the rest of Sage looks ok?

Tavian Barnes

unread,
Aug 31, 2017, 1:05:44 PM8/31/17
to sage-support
On Thursday, 31 August 2017 12:24:29 UTC-4, vdelecroix wrote:
Thanks for you report. It works fine for me 8.1.beta3 also on archlinux.

1292913990 bytes is only 1.3GiB.  I don't have that much free, but if you do it probably just works.
 
Can you give more precision about:
- how did you install sage 8.0?

pacman -S sagemath
 
- does the rest of Sage looks ok?

Seems to be.

Vincent Delecroix

unread,
Aug 31, 2017, 1:25:05 PM8/31/17
to sage-s...@googlegroups.com
On 31/08/2017 10:05, Tavian Barnes wrote:
> On Thursday, 31 August 2017 12:24:29 UTC-4, vdelecroix wrote:
>>
>> Thanks for you report. It works fine for me 8.1.beta3 also on archlinux.
>>
>
> 1292913990 bytes is only 1.3GiB. I don't have that much free, but if you
> do it probably just works.

Indeed. Though it is weird that Sage asks for that much memory for this
small computation!
Reply all
Reply to author
Forward
0 new messages