[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Matcompat's datenum.m weirdness
From: |
E. Joshua Rigler |
Subject: |
Matcompat's datenum.m weirdness |
Date: |
Wed, 29 Aug 2001 11:36:46 -0600 |
Can someone explain the following?
octave:240> datenum (1995, 01, 05)
ans = 728664.291666667
^^^^^^^^^
In particular, why is there a fractional day? I included no hours,
minutes, or seconds. I should note than when I do include hours,
minutes, and seconds, this fractional offset remains.
octave:246> datenum (1995, 01, 05, 0, 02, 30)
ans = 728664.293402778
(should be 728664.0017361111)
Should this be considered a bug? Does this have anything to do with
working on a 32 bit architecture (PC linux), as opposed to a 64? Matlab
on solaris does this properly. I begin to wonder if using standard C
libraries for time/date functions is appropriate. They seem buggy, and
too architecture dependant.
-EJR
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- Matcompat's datenum.m weirdness,
E. Joshua Rigler <=