[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #57726] double() not working on the symbolic e
From: |
Jing-Chen Peng |
Subject: |
[Octave-bug-tracker] [bug #57726] double() not working on the symbolic expressions |
Date: |
Sun, 2 Feb 2020 10:49:15 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36 |
URL:
<https://savannah.gnu.org/bugs/?57726>
Summary: double() not working on the symbolic expressions
Project: GNU Octave
Submitted by: jcpeng
Submitted on: Sun 02 Feb 2020 03:49:13 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Other
Status: None
Assigned to: None
Originator Name: jcpeng
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 5.1.0
Operating System: Microsoft Windows
_______________________________________________________
Details:
I was messing around with the symbolic package and wanted to evaluate a
symbolic expression with subs(), vpa(), and double(), but vpa() in octave
returns an equality object which can't be converted to a complex or floating
point number directly in python.
The new python code for double():
cmd = { '(x,) = _ins'
'if x == zoo:' % zoo -> Inf + Infi
' return (float(sp.oo), float(sp.oo))'
'if x == nan:'
' return (float(nan), 0.0)'
% Adding check for Eq type to evaluate vpa()'d symbolic
% variables.
'if isinstance(x, Eq):'
' x = complex(x.rhs)'
' return (x.real, x.imag)'
'x = complex(x)'
'return (x.real, x.imag)'
};
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57726>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #57726] double() not working on the symbolic expressions,
Jing-Chen Peng <=
- [Octave-bug-tracker] [bug #57726] [octave forge] (symbolic) double not working on symbolic expressions, Mike Miller, 2020/02/03
- [Octave-bug-tracker] [bug #57726] [octave forge] (symbolic) double not working on symbolic expressions, Jing-Chen Peng, 2020/02/03
- [Octave-bug-tracker] [bug #57726] [octave forge] (symbolic) double not working on symbolic expressions, Jing-Chen Peng, 2020/02/03
- [Octave-bug-tracker] [bug #57726] [octave forge] (symbolic) double not working on symbolic expressions, Mike Miller, 2020/02/03
- [Octave-bug-tracker] [bug #57726] [octave forge] (symbolic) double not working on symbolic expressions, Jing-Chen Peng, 2020/02/03
- [Octave-bug-tracker] [bug #57726] [octave forge] (symbolic) double not working on symbolic expressions, Jing-Chen Peng, 2020/02/03
- [Octave-bug-tracker] [bug #57726] [octave forge] (symbolic) dsolve should return expression instead of equation, Mike Miller, 2020/02/03
- [Octave-bug-tracker] [bug #57726] [octave forge] (symbolic) dsolve should return expression instead of equation, Jing-Chen Peng, 2020/02/03
- [Octave-bug-tracker] [bug #57726] [octave forge] (symbolic) dsolve should return expression instead of equation, Mike Miller, 2020/02/03
- [Octave-bug-tracker] [bug #57726] [octave forge] (symbolic) dsolve should return expression instead of equation, Jing-Chen Peng, 2020/02/03