[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #37621] isbusday() error when input contains d
From: |
Randy |
Subject: |
[Octave-bug-tracker] [bug #37621] isbusday() error when input contains decimal values |
Date: |
Tue, 23 Oct 2012 18:54:32 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0 |
URL:
<http://savannah.gnu.org/bugs/?37621>
Summary: isbusday() error when input contains decimal values
Project: GNU Octave
Submitted by: littlemanrkc
Submitted on: Tue 23 Oct 2012 06:54:31 PM GMT
Category: Libraries
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Inaccurate Result
Status: None
Assigned to: None
Originator Name: Randy
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.6.1
Operating System: Microsoft Windows
_______________________________________________________
Details:
In the Octave-Forge financial package, isbusday() includes some extra holidays
when the datenums passed into the function are not integer values.
To replicate:
octave:51> n1=now-100;
octave:52> n1=now-600;
octave:79> sum(isbusday(n1:n2))
ans = 357
octave:80> sum(isbusday(floor(n1):floor(n2)))
ans = 345
As a fix for my local copy, I modified line 50 to be
mask = mask | ismember(floor(rd), hol); % I added the floor()
Since hol contains only integer values and rd might contain non-integer values
(that should be equivalent holiday-wise to integer values).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?37621>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #37621] isbusday() error when input contains decimal values,
Randy <=