Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sage fails to compute a (simple) symbolic expression #28620

Closed
EmmanuelCharpentier mannequin opened this issue Oct 17, 2019 · 10 comments
Closed

Sage fails to compute a (simple) symbolic expression #28620

EmmanuelCharpentier mannequin opened this issue Oct 17, 2019 · 10 comments

Comments

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Oct 17, 2019

See this sage-devel thread. In short:

sage: t=((1/10)*I/pi)^(3/2)
sage: t
(1/10*I/pi)^(3/2)
sage: t^2

This doesn't return(!), and seems hard to interrupt.

Depends on #30446

CC: @dimpase @videlec

Component: symbolics

Reviewer: Dave Morris, Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/28620

@EmmanuelCharpentier EmmanuelCharpentier mannequin added this to the sage-9.0 milestone Oct 17, 2019
@sheerluck
Copy link
Contributor

comment:2

with some additional prints:

sage: t=((1/10)*I/pi)**3

Expression._pow_ 1/10*I/pi 3
class NumberFieldElement.__pow__ 1/10*I 3 None
generic_power_long', 1/10*I, 3
generic_power_long', 1/10*I, 3
generic_power_pos', 1/10*I, 3
apow = -1/100
n = 0
res = -1/1000*I

sage: t**2

Expression._pow_ -1/1000*I/pi^3 2
class NumberFieldElement.__pow__ -1/1000*I 2 None
generic_power_long, -1/1000*I, 2
generic_power_long, -1/1000*I, 2
generic_power_pos, -1/1000*I, 2
apow = -1/1000000
n = 1

-1/1000000/pi^6

sage: t=((1/10)*I/pi)**(3/2)

Expression._pow_ 1/10*I/pi 3/2

sage: t**2

Expression._pow_ (1/10*I/pi)^(3/2) 2
class NumberFieldElement.__pow__ 1/10*I 4294967297 None
generic_power_long', 1/10*I, 4294967297
generic_power_long', 1/10*I, 4294967297
generic_power_pos', 1/10*I, 4294967297
apow = -1/100
n = 1073741824
res = 1/10*I
apow = 1/10000
n = 536870912
res = 1/10*I
apow = 1/100000000
n = 268435456
res = 1/10*I
apow = 1/10000000000000000
n = 134217728
res = 1/10*I
apow = 1/100000000000000000000000000000000
n = 67108864
res = 1/10*I
...

@EmmanuelCharpentier
Copy link
Mannequin Author

EmmanuelCharpentier mannequin commented Oct 17, 2019

comment:3

Replying to @sheerluck:

with some additional prints:

How did you got them ? I wasn't aware of the availability of this steb-by-step tracing...

[ SNIP... ]

Illuminating...

@sheerluck
Copy link
Contributor

comment:4

no, it's not steb-by-step tracing, I just inserted lines in

  • symbolic/expression.pyx
  • rings/number_field/number_field_element.pyx
  • arith/power.pyx
    and just reinstalled sage (I use Gentoo Linux)

@embray
Copy link
Contributor

embray commented Jan 6, 2020

comment:5

Ticket retargeted after milestone closed

@embray embray modified the milestones: sage-9.0, sage-9.1 Jan 6, 2020
@mkoeppe
Copy link
Contributor

mkoeppe commented May 5, 2020

comment:6

Still unfixed in 9.1rc2

@mkoeppe mkoeppe modified the milestones: sage-9.1, sage-9.2 May 7, 2020
@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Oct 24, 2020
@DaveWitteMorris
Copy link
Member

Dependencies: #30446

@DaveWitteMorris
Copy link
Member

comment:9

This will be fixed by the patch to pynac in #30446. When that ticket is closed, we can add this as another doctest.

@DaveWitteMorris
Copy link
Member

comment:10

This can be closed as a duplicate of #30446. The pull request at #30786 adds the appropriate doctest.

@DaveWitteMorris
Copy link
Member

Reviewer: Dave Morris

@DaveWitteMorris DaveWitteMorris removed this from the sage-9.3 milestone Jan 10, 2021
@dimpase
Copy link
Member

dimpase commented Jan 12, 2021

Changed reviewer from Dave Morris to Dave Morris, Dima Pasechnik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants