bugGNU Octave - Bugs: bug #59266, 1-0.00000035 returns 1

 
 

bug #59266: 1-0.00000035 returns 1

Submitter:  None
Submitted:  Wed 14 Oct 2020 08:55:25 AM UTC
   
 
Category:  Octave Function Severity:  2 - Minor
Priority:  5 - Normal Item Group:  None
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Martin Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 5.2.0
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 14 Oct 2020 09:38:18 AM UTC, comment #1: 

Thank you for your report, but by default the output is rounded, see https://www.octave.org/doc/v5.2.0/XREFformat.html for details.


>> format long
>> 1-0.00000035
ans =    9.999996500000000e-01


Also keep in mind, that Octave is a software for numerical computations.  The number are not infinitely precise

https://en.wikipedia.org/wiki/Round-off_error

Kai Torben Ohlhus <siko1056>
Group Member
Wed 14 Oct 2020 08:55:25 AM UTC, original submission:  

When entering 1-0.00000035 Octave returns
ans =  1.00000


instead of:
ans =  0.99999965

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #49976:  bug.png added by None (9KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by None (Submitted 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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-10-14 siko1056 Severity3 - Normal 2 - Minor
        StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2020-10-14 None Attached File- Added bug.png, #49976

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code