octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #43753] datevec returns negative dates with in


From: Rik
Subject: [Octave-bug-tracker] [bug #43753] datevec returns negative dates with integer datenum
Date: Fri, 05 Dec 2014 20:39:20 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0

Update of bug #43753 (project octave):

                  Status:         Patch Submitted => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #4:

I applied Nir's patch to the stable branch here
(http://hg.savannah.gnu.org/hgweb/octave/rev/7d272300a880).  I made one change
which was to cast the input to double before taking the floor and subtracting
60.


z = floor (double (date)) - 60;

rather than

z = double (floor (date) - 60);


This handles exceptional inputs like uint8(1) which can't handle negative
numbers.

Closing report.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43753>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]