comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » CalDat
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: CalDat [message #25120 is a reply to message #25034] Wed, 16 May 2001 09:59 Go to previous message
R.G.S. is currently offline  R.G.S.
Messages: 46
Registered: September 2000
Member
Ben Tupper <pemaquidriver@tidewater.net> wrote in message
news:3B017E66.BD5C9F6D@tidewater.net...
> Hello,
>
>
> 1) Unless the Julian Day Number is double precision, the
> minute and hour are always zero.
> 2) I don't believe the hour is correctly determing when
> the Julian Day number is provided as single precision.
> If the Julian Day begins at 1200 on a given day, then 0.36 *
> 24 + 12 = 20.6 (fraction of day * hours per day + offset =
> hour number of day)

I don't think it is a bug. Single precision numbers only give you
0.25 in terms of julian days





Check out the following code

print,'Singl prec #:'
print,float(2529161.36d),format='(f50.25)'

CALDAT,2529161.36d, Month, Day, Year, Hour, Minute,Second
PRINT, 'Doubl: ',Month, Day, Year, Hour, Minute, Second

CALDAT, 2529161.36, Month, Day, Year, Hour, Minute,Second
PRINT, 'Float: ',Month, Day, Year, Hour, Minute, Second

CALDAT, 2529161.25d, Month, Day, Year, Hour, Minute,Second
PRINT, 'Round Doub:',Month, Day, Year, Hour, Minute, Second

print,'Next Singl prec #:'
print,float(2529161.45d),format='(f50.25)'

CALDAT,2529161.45d, Month, Day, Year, Hour, Minute,Second
PRINT, 'Doubl: ',Month, Day, Year, Hour, Minute, Second

CALDAT, 2529161.45, Month, Day, Year, Hour, Minute,Second
PRINT, 'Float: ',Month, Day, Year, Hour, Minute, Second

CALDAT, 2529161.5d, Month, Day, Year, Hour, Minute,Second
PRINT, 'Round Doub:',Month, Day, Year, Hour, Minute, Second

;****************** Results Below *****************************************


Singl prec #:
2529161.2500000000000000000000000
Doubl: 7 4 2212 20
38 23.999989
Float: 7 4 2212 18
0 0.00000000
Round Doub: 7 4 2212 18 0
0.00000000

Next Singl prec #:
2529161.5000000000000000000000000
Doubl: 7 4 2212 22
48 1.6093257e-005
Float: 7 5 2212 0
0 0.00000000
Round Doub: 7 5 2212 0 0
0.00000000


Cheers,
bob stockwell
[Message index]
 
Read Message
Read Message
Previous Topic: HDF-EOS and IDL
Next Topic: Problem with STRSPLIT using /EXTRACT

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 08:45:34 PDT 2025

Total time taken to generate the page: 1.44063 seconds