bugGNU Octave - Bugs: bug #63761, Simple arithmetic error. When...

 
 

bug #63761: Simple arithmetic error. When Subtracting a number from another, creates incorrect result

Submitter:  None
Submitted:  Sun 05 Feb 2023 07:43:41 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  Ryan Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 7.3.0
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 05 Feb 2023 12:25:57 PM UTC, comment #1: 

Duplicate of bug #63760

Arun Giridhar <arungiridhar>
Group Member
Sun 05 Feb 2023 07:43:41 AM UTC, original submission:  

I have attached a general script to replicate the issue.

It seems when I create these arrays, assign the data and then try to process it, it results in incorrect arithmetic. Looking at the variables:
a = array(1) = 3729.6
b = array(2) = 3729.4
a-c results in 0.1158 instead of the target 0.2

If these variables are assigned directly and the math attempted, it works fine. It only appears to occur when ran with the various data processing I have done within the file.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #54315:  test_bug.m added by rfleming (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arungiridhar (Posted a comment)
  • -email is unavailable- added by rfleming (Updated the item)
  •  

    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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-02-05 arungiridhar StatusNone Duplicate
        Open/ClosedOpen Closed
    2023-02-05 rfleming Attached File- Added test_bug.m, #54315

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code