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

Home » Public Forums » archive » JULDAY 5.4 not same as 5.3?
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 5.4 not same as 5.3? [message #24050 is a reply to message #23992] Mon, 05 March 2001 14:22 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
pit@phys.uu.nl (Peter Suetterlin) writes:
...
> 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

We can argue all day about what is correct mathematically.

However I think it is correct from a microprocessor standpoint (ie,
that's what the processor does). Further more it satisfies certain
identities like:

(-x) + x EQ 0

And what would you do with a number like -('ffffffff'xul), ie a number
that to begin with is too large to fit into a signed type.

Finally, you would have the people (like me) who would gripe about how
IDL changed the type of a variable without asking me first!

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
Read Message
Read Message
Read Message
Previous Topic: Linux and 3D graphics hardware support
Next Topic: BETTER FONTS

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

Current Time: Fri Nov 28 23:12:10 PST 2025

Total time taken to generate the page: 0.56021 seconds