bugGNU Octave - Bugs: bug #45478, Symbolic pkg errors with E

 
 

bug #45478: Symbolic pkg errors with E

Submitted by:  Doug Stewart <dastew>
Submitted on:  Sun 05 Jul 2015 09:52:06 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: doug stewartOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 07 Jul 2015 07:51:25 PM UTC, comment #4:

*This can be closed fixed.*

Its fixed in:

https://github.com/cbm755/octsympy/commit/f7b5acbcfed6199e5fb31af3a4349776c53de988

by adding E, E1, others to an existing whitelist.

I also filed this to try for a better fix:

https://github.com/cbm755/octsympy/issues/255

Colin Macdonald <cbm>
Mon 06 Jul 2015 09:47:35 AM UTC, comment #3:

Ok, read your whole post now and I see you do get an error from E1 (so that is good). I think I will change E1 to work, the same way I override beta, zeta, gamma and a few others...
(see https://github.com/cbm755/octsympy/issues/23)

Now, about E (and I): these default to "exp(1)" and unit imaginary in SymPy. I suppose I could make "sym('I')" and "sym('E')" override that... For E I think that makes sense: its pretty clear what someone wants when she enters "syms E".

But for "I" I'm not so sure... Maybe I don't want "I = sym('I')" to be different from "I = sym(I)" and "I = sym(i)" and "I = sym('i')" (all of which

Colin Macdonald <cbm>
Mon 06 Jul 2015 08:29:24 AM UTC, comment #2:

I don't even get past your first line:

"E1" is apparently assigned the function expint().

1. But you don't get that error, which is strange! Can you try just the "E1 = sym('E1')" line as above and let me know?

2. It is supposed to be possible (in SymPy) to override these sorts of default symbols, so I'm surprised by this error. I will investigate.

Colin Macdonald <cbm>
Mon 06 Jul 2015 08:21:19 AM UTC, comment #1:

Adding maintainer of symbolic package to cc

@Doug Stewart -- you need to place your code inside verbatim clauses. As it were, the asterisks got interpreted as bold. See the verbatim section https://savannah.gnu.org/cookbook/?func=detailitem&item_id=125

The original, non-interpreted text, is on the mailing list https://lists.gnu.org/archive/html/octave-bug-tracker/2015-07/msg00122.html

Carnë Draug <carandraug>
Project Member
Sun 05 Jul 2015 09:52:06 PM UTC, original submission:

This report is mainly for Colin Macdonald

clear
syms A B C D E E11 E1 ww
e1=2.5A +1.5D -2*E== 57.1
e2= 3A +2.5D -1*E== 27.6
e3=-4A -6D +2*E==-81.2
sf=solve(e1,e2,e3,A,D,E)

1) This first part works correctly.

2) Now try this:
se=solve(e1,A)
# answer is
# se = (sym)
#
# 3⋅D 4⋅ℯ 571
# - ─── + ─── + ───
# 5 5 25

The answer I see has a small letter e in it, but no small letter e in the question.

3) Now try the following: I tried changing E to E1
to try and get away from the small e.
this output is huge and wrong
e1=2.5A +1.5D -2*E1== 57.1
se=solve(e1,A)

4) to trouble shoot the wrong answer I tried:

ww=E1

and found out the E1 is a special function and cannot be used in my program.

The huge output from 3) is just this ascii warning sting treated as ascii values multiplied into the answer to 3)

If i change E to E2 then all is good.
Colin keep up the good work, I am enjoying the symbolic pkg.

Doug Stewart <dastew>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by cbm (Posted a comment)
  • -unavailable- added by carandraug (Colin Macdonald - maintainer of symbolic package)
  • -unavailable- added by dastew (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 10 Feb 2016 05:53:13 PM UTCmtmillerStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 06 Jul 2015 08:21:19 AM UTCcarandraugCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1