On 2009-02-04 22:27-0800 Alan W. Irwin wrote:

> My immediate further plans at this stage are to directly test the three key
> functions (setFromUT, breakDownMJD, and strfMJD) currently in libqsastime
> against their closest Linux counterparts (timegm, gmtime, and strftime) for
> the complete range of valid Linux times.

I am making some good progress on this.  First I discovered I have access to
essentially unlimited date ranges for my Linux 64-bit system (time_t has a
sizeof 8, i.e., it is 64-bits) so that and the availability of timegm (the
inverse of gmtime) for the Linux C library makes my platform ideal for
comprehensive testing of libqsastime.

I had to implement a Gregorian proleptic (proleptic means extended
consistently backward in time) calendar option (forceJulian=-1) and sort out
leap year bugs for negative years for that case.  I also documented and
simplified the existing forceJulian=1 (Julian proleptic calendar) leap-year
logic.

I have tested setFromUT for a range of years near the Julian date epoch, the
year epoch, and the MJD epoch, and obtained the expected results in all
cases.  I have also tested setFromUT against timegm for an extremely wide
date range (+/- 5 million years, just narrow enough not to overflow the
32-bit integer part of MJD), and got exact agreement for the results in
(time_t) seconds since the Unix epoch.  That result indicates clearly that
the Linux C library uses the Gregorian proleptic calendar for all dates.
This initial comparison is rather coarse (every million years), and I plan
to run one with much finer spacing and also do some fine comparisons between
breakDownMJD and strfMJD and their Linux counterparts.

In sum, it is looking extremely encouraging as of revision 9472, but there
is still more testing to do, and I also have some additional development
plans to add some features to libqsastime (see README.qsastime_API) before I
finalize how we use this library from the libplplot library.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to