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

Home » Public Forums » archive » Re: Computing Time
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: Computing Time [message #19377] Mon, 20 March 2000 00:00 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Martin Schultz <martin.schultz@dkrz.de> writes:
>
> JULDAY will give you fractional days as an answer. To convert this back
> into
> days, hours, minutes, etc., you can do:
> days = fix(diff) ; or long() if you desire
> hour = fix( (diff-days)*24. )
> minute = fix( (diff-days-hour/24.)*1440. )
> second = fix( (diff-days-hour/24.-minute/1440.)*86400. )
> just that you may run into roundoff problems here or there. And this is
> why you should probably follow Liam's advice and use the JHU APL
> routines.

Would it be wiser to use FLOOR() instead of FIX(), to handle negative
time differences? This always gets a little sticky.

Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: xloadct
Next Topic: better 3D surfaces ?

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

Current Time: Fri Oct 10 05:17:47 PDT 2025

Total time taken to generate the page: 0.32376 seconds