[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JULDAY 5.4 not same as 5.3?



Don Woodraska <don.woodraska@lasp.colorado.edu> writes:
> I've pinpointed the problem.
> 
> SUMMARY:
> ***
> The bug appears only with unsigned-long and unsigned-64-bit-long
> hour argument to JULDAY.

Hm, this is a much more general problem of unsigned data types, I
stumbled across it myself just two weeks ago.

I'm still not sure who's to blame, me (i.e. the programmer) or
IDL/RSI, but in general it does not make sense to take a negative of a
unsigned number, and IMHO there should also occur an automatic type
conversion as soon as a minus sign is involved.  Currently, you get e.g.

IDL> x=5b
IDL> print,-x
 251

Any comments on that?

  Peter

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dr. Peter "Pit" Suetterlin                 http://www.astro.uu.nl/~suetter
Sterrenkundig Instituut Utrecht
Tel.: +31 (0)30 253 5225                   P.Suetterlin@astro.uu.nl
__________________________________________________________________________