Opened 2 years ago

Closed 8 months ago

#28620 closed defect (duplicate)

Sage fails to compute a (simple) symbolic expression

Reported by: charpent Owned by:
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: symbolics Keywords:
Cc: dimpase, vdelecroix Merged in:
Authors: Reviewers: Dave Morris, Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #30446 Stopgaps:

Status badges

Description

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.

Change History (12)

comment:1 Changed 2 years ago by charpent

  • Type changed from PLEASE CHANGE to defect

comment:2 follow-up: Changed 2 years ago by gh-sheerluck

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
...

comment:3 in reply to: ↑ 2 Changed 2 years ago by charpent

Replying to gh-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...

comment:4 Changed 2 years ago by gh-sheerluck

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)

comment:5 Changed 21 months ago by embray

  • Milestone changed from sage-9.0 to sage-9.1

Ticket retargeted after milestone closed

comment:6 Changed 17 months ago by mkoeppe

  • Cc dimpase vdelecroix added

Still unfixed in 9.1rc2

comment:7 Changed 17 months ago by mkoeppe

  • Milestone changed from sage-9.1 to sage-9.2

comment:8 Changed 11 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:9 Changed 9 months ago by gh-DaveWitteMorris

  • Dependencies set to #30446
  • Priority changed from critical to minor

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

comment:10 Changed 8 months ago by gh-DaveWitteMorris

  • Milestone changed from sage-9.3 to sage-duplicate/invalid/wontfix
  • Reviewers set to Dave Morris
  • Status changed from new to needs_review

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

comment:11 Changed 8 months ago by dimpase

  • Reviewers changed from Dave Morris to Dave Morris, Dima Pasechnik
  • Status changed from needs_review to positive_review

comment:12 Changed 8 months ago by chapoton

  • Resolution set to duplicate
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.