Opened 4 years ago

Closed 4 years ago

#23048 closed defect (fixed)

Fix directions acceptable keywords in limit function

Reported by: mforets Owned by:
Priority: major Milestone: sage-8.0
Component: calculus Keywords: limit
Cc: kcrisman, rws, dcoudert Merged in:
Authors: Marcelo Forets Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 6529547 (Commits, GitHub, GitLab) Commit: 65295478620b301cdceb36863e8964afd333e46f
Dependencies: Stopgaps:

Status badges

Description

Seemingly erroneous handling of the different nicknames that the keyword dir (direction) the limit function can have. For example,

sage: (1/(x-3)).limit(x=3, dir='below', algorithm='maxima')
Traceback (most recent call last)
...
UnboundLocalError: local variable 'l' referenced before assignment

but breaks for no apparent reason, since:

sage: (1/(x-3)).limit(x=3, dir='below', algorithm='maxima_taylor')
-Infinity

works.

Reported in why is sage calling 1 a variable?

Change History (7)

comment:1 Changed 4 years ago by mforets

  • Authors set to Marcelo Forets
  • Branch set to u/mforets/23048
  • Commit set to 02aad12dea392ea29d417ec4fae4f5d2063850dc
  • Status changed from new to needs_review

New commits:

02aad12fix directions parsing

comment:2 Changed 4 years ago by mforets

  • Cc dcoudert added

comment:3 follow-up: Changed 4 years ago by tscrim

Typo?

elif dir == ['minus', '-', 'left', 'below']:

comment:4 Changed 4 years ago by git

  • Commit changed from 02aad12dea392ea29d417ec4fae4f5d2063850dc to 65295478620b301cdceb36863e8964afd333e46f

Branch pushed to git repo; I updated commit sha1. New commits:

6529547fix typo

comment:5 in reply to: ↑ 3 Changed 4 years ago by mforets

Replying to tscrim:

Typo?

elif dir == ['minus', '-', 'left', 'below']:

nice catch.

comment:6 Changed 4 years ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

LGTM.

comment:7 Changed 4 years ago by vbraun

  • Branch changed from u/mforets/23048 to 65295478620b301cdceb36863e8964afd333e46f
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.