bugGNU Octave - Bugs: bug #54397, x*e-y in octave is not the same as...

 
 

bug #54397: x*e-y in octave is not the same as xe-y. Matlab incompatibility

Submitter:  Mo Marikar <momaricks>
Submitted:  Fri 27 Jul 2018 06:31:34 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Wont Fix Assigned to:  None
Originator Name:  Mo Marikar Open/Closed:  * Closed
Release:  * 4.4.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 27 Jul 2018 07:20:39 PM UTC, comment #2: 

Marking as "Won't Fix".  Octave prefers that the interpreter accept a wider range of inputs.

Rik <rik5>
Group administrator
Fri 27 Jul 2018 07:10:05 PM UTC, comment #1: 

In Octave, "e" is a function that returns a numerical constant, similar to "i", or "pi".

Since functions in Matlab and Octave can be called without parenthesis, the expression 2.2*e-8 is a valid expression.

John W. Eaton <jwe>
Group administrator
Fri 27 Jul 2018 06:31:34 PM UTC, original submission:  

dermal_dose_conc = 2.2*e-8;

this executes in Octave to -2.0198e+000, so the dose conc is negative

The correct expression is:

dermal_dose_conc = 2.2e-8;

In MATLAB, 2.2*e-8 throws an error. This should probably be reported as a bug in Octave

Mo Marikar <momaricks>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by momaricks (Submitted the item)
  • -email is unavailable- added by momaricks (octave x*e-y gives wrong value. xe-y is correct)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-27 rik5 CategoryOctave Function Interpreter
        Item GroupInaccurate Result Matlab Compatibility
        StatusNone Wont Fix
        Open/ClosedOpen Closed
        Operating SystemMicrosoft Windows Any
    2018-07-27 momaricks Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code