help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave: sympy error?


From: Nicholas Jankowski
Subject: Re: Octave: sympy error?
Date: Fri, 18 Nov 2016 10:10:47 -0500

On Fri, Nov 18, 2016 at 10:07 AM, Nicholas Jankowski <address@hidden> wrote:
On Fri, Nov 18, 2016 at 6:28 AM, Constantine Frangos <address@hidden> wrote:

There seems to be an error in the sympy 1.0 limit() function.

The lim(1/x) as x->0 does not exist while the limit()
function indicates this as +infinity.

It seems that a custom octave function could compute the
left and right limits in order to get a better understanding.

Regards,
Constantine.

octave:20> limit(1/x,x,0)
ans = (sym) oo
octave:21>
octave:21> limit(1/x,x,0,'right')
ans = (sym) oo
octave:22> limit(1/x,x,0,'left')
ans = (sym) -oo



Yes, and this does appear to be a matlab incompatibility:

Matlab 2016b:

>> limit (1/x,x,0)
ans =
NaN
>> limit (1/x,x,0,'right')
ans =
Inf
>> limit (1/x,x,0,'left')
ans =
-Inf



Looking at the help for limit, this is explicitly mentioned as a known incompatibility,as it's currently unknown how to get the same behavior from sympy. It hase a FIXME note pointing to : https://github.com/cbm755/octsympy/issues/74


I also noticed that I had to find the function file to read the help... help limit gave me a error: help: 'limit' not found...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]