Ticket #5015 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[with patch, positive review] Horrible bug in old (and new) symbolic calculus: f(x)=1; f*e --> BOOM!

Reported by: was Owned by: burcin
Priority: major Milestone: sage-3.3
Component: calculus Keywords:
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description


On Sun, Jan 18, 2009 at 7:08 AM, YannLC  wrote:
>
> but in fact the same error occurs without ns=1...
>
> ----------------------------------------------------------------------
> | Sage Version 3.2.3, Release Date: 2009-01-05                       |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
> sage: f(x)=1
> sage: f*e
> [...]
> RuntimeError: maximum recursion depth exceeded

That is weird.  What a horrible bug!   Thanks for reporting this.  It is now trac #

It also happens with ns=1. I've verified this.

Attachments

trac_5015.patch Download (1.2 KB) - added by mhansen 4 years ago.

Change History

Changed 4 years ago by mhansen

comment:1 Changed 4 years ago by mhansen

  • Summary changed from Horrible bug in old (and new) symbolic calculus: f(x)=1; f*e --> BOOM! to [with patch, needs review] Horrible bug in old (and new) symbolic calculus: f(x)=1; f*e --> BOOM!

Note that the new code doesn't get run as doing

f(x) = 1

overwrites the old x (which was created with var('x',ns=1)) with just var('x'). The infinite recursion is due the CallableSymbolicExpression? ring assuming that all elements of SR were instances of SymbolicExpression?.

comment:2 Changed 4 years ago by was

  • Summary changed from [with patch, needs review] Horrible bug in old (and new) symbolic calculus: f(x)=1; f*e --> BOOM! to [with patch, positive review] Horrible bug in old (and new) symbolic calculus: f(x)=1; f*e --> BOOM!

Looks good. Great work fixing this so quickly!

comment:3 Changed 4 years ago by mabshoff

  • Status changed from new to closed
  • Resolution set to fixed

Merged in Sage 3.3.alpha0

Note: See TracTickets for help on using tickets.