Ask Your Question
1

Why is Sage calling 1 a variable?

asked 7 years ago

cybervigilante gravatar image

updated 2 years ago

tmonteil gravatar image

Consider

x = var('x') 
f = 1/(x-3) 

limit(f,x=3,dir='below')

UnboundLocalError: local variable 'l' referenced before assignment

Preview: (hide)

Comments

I'm using preformat so I have no idea why the first two statements keep showing up on the same line, but they aren't

cybervigilante gravatar imagecybervigilante ( 7 years ago )

The error message is local variable 'l' referenced before assignment. It's variable l (small cap L), not 1. I have reported the issue on sage-dev.

David Coudert gravatar imageDavid Coudert ( 7 years ago )

Thanks for reporting.

tmonteil gravatar imagetmonteil ( 7 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 7 years ago

mforets gravatar image

updated 7 years ago

Try with limit(f, x=3, dir='minus').

I think this is a (trivial) bug, thanks for reporting. The code in question is in lines 1228-1245 of calculus.py.

Edit: this is #23048.

Preview: (hide)
link

Comments

Thanks for fixing.

tmonteil gravatar imagetmonteil ( 7 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 7 years ago

Seen: 351 times

Last updated: May 23 '17