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

Home » Public Forums » archive » Re: JULDAY-CALDAT problem
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: JULDAY-CALDAT problem [message #38265 is a reply to message #38264] Thu, 26 February 2004 06:52 Go to previous messageGo to previous message
btupper is currently offline  btupper
Messages: 55
Registered: January 2002
Member
On Thu, 26 Feb 2004 07:19:10 -0700, David Fanning <david@dfanning.com>
wrote:

> Luciano writes:
>
>> Hi, maybe somebody has a clue about the following:
>>
>> IDL> aa=JulDay(11,18,1990,2,0,0)
>> IDL> Caldat,aa,m,d,y,h,mi,s
>> IDL> print,m,d,y,h,mi,s
>> 11 18 1990 2 0 5.3644181e-005
>>
>> Why does s=5.3644181e-005 and not s=0 as it should be?
>
> I think it is a question of using a computer to do the
> calculations rather than your fingers. :-)
>
> Floating point numbers have about 7 significant figures.
> Assuming 60 seconds in a minute, this number starts to
> vary in the seventh place. So, about as close to zero
> as you gonna get, I think.
>
> For a more complete explanation, see this article:
>
> http://www.dfanning.com/math_tips/sky_is_falling.html
>

Hello,

One additional thing to add to David's explanation is that JULDAY adds
a small offset to the seconds argument. I forget why, but the reason
is described in the documentation for JULDAY. You could test it out
by editing the JULDAY function so it does not add the offset. I'll
bet you still will not get the answer you expect because of the
condition David describes.

Ben
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Extracting strings from an array
Next Topic: JULDAY-CALDAT problem

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

Current Time: Sat Oct 11 04:45:16 PDT 2025

Total time taken to generate the page: 1.27946 seconds