bugGNU Octave - Bugs: bug #35236, Inline does not recognise...

 
 

bug #35236: Inline does not recognise "e" as a built-in variable

Submitted by:  None
Submitted on:  Wed 04 Jan 2012 01:51:56 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Other
Status: FixedAssigned to: Jordi GutiĆ©rrez Hermoso <jordigh>
Originator Name: Anders AnderssonOriginator Email: -unavailable-
Open/Closed: ClosedRelease: dev
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 04 Jan 2012 03:56:52 PM UTC, comment #2:

First, there are no "built-in variables" in Octave now. Symbols like "pi" and "NaN" that are given special treatment by the inline function are functions, not variables.

The confusing error message about 'x' undefined happens because by default, inline functions use 'x' as their argument when no other variables are discovered in the expression. That is somewhat strange, but compatible with Matlab.

Matlab's inline function does not give 'e' or 'NA' special treatment.

So now I suppose that we will see bug reports about how

is not compatible with Matlab (Matlab will include 'e' in the list of arguments and Octave will not do that now).

To be fair, this problem already existed for 'NA', but just came to my attention because of this report.

Unfortunately, I don't think the list of symbols that are handled specially by Matlab's inline function are documented.

It looks like we only document 'i' and 'j' and the wording could be better.

John W. Eaton <jwe>
Project Administrator
Wed 04 Jan 2012 03:17:16 PM UTC, comment #1:

Thanks, 'twas a slight oversight. Fixed:

http://hg.savannah.gnu.org/hgweb/octave/rev/5a25a51146a1

This should be part of the stable release scheduled for this week.

Jordi GutiƩrrez Hermoso <jordigh>
Project AdministratorIn charge of this item.
Wed 04 Jan 2012 01:51:56 PM UTC, original submission:

The mathematical constants e and pi are both pre-defined in Octave. However, not to an equal degree. Compare for example

which defines f as a function of two variables, e and x, with

which defines f as a function of only one variable, x.

Furthermore, while

works as expected,

gives the confusing and incorrect error message

Anonymous

 

(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 jwe (Posted a comment)
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by None (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 04 Jan 2012 03:17:16 PM UTCjordighStatusNone=>Fixed
      Assigned toNone=>jordigh
      Open/ClosedOpen=>Closed
      Release3.2.4=>dev
      SummaryIncorrect error message when using mathematical constant e in fplot=>Inline does not recognise "e" as a built-in variable

    Back to the top


    Powered by Savane 3.1-cleanup1