bugGNU Octave - Bugs: bug #41307, round(-0.1) returns -0

 
 

bug #41307: round(-0.1) returns -0

Submitted by:  Mark van Rossum <cosine>
Submitted on:  Wed 22 Jan 2014 04:36:26 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: InvalidAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.6.4Operating 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 22 Jan 2014 04:48:32 PM UTC, comment #1:

This is not a bug:

https://en.wikipedia.org/wiki/Signed_zero

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Wed 22 Jan 2014 04:36:26 PM UTC, original submission:

As the title says
round(-0.1) returns -0
I would have expected 0.

'-0' does not exist I would say, although I could imagine that in some cases this behaviour is useful.

Octave 3.6.4 on Fedora 20

Mark van Rossum <cosine>

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 22 Jan 2014 04:48:32 PM UTCjordighStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1