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

Home » Public Forums » archive » Recognizing double precision?
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: Recognizing double precision? [message #56385 is a reply to message #56164] Wed, 24 October 2007 11:15 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

wlandsman schrieb:
> About once a year I receive a complaint about my code because someone
> inputs a Julian date like this
>
> IDL> jd = 2441636.1
>
> and then gets mysterious results because the value of jd is
> "truncated"
>
> IDL> print, jd, f='(f10.2)'
> 2441636.00
>
> So it would it be reasonable to request that the IDL compiler
> recognize a number as double precision, if it has too many digits to
> be stored as a floating point number? After all, IDL does do
> something like this (in default mode) for short and long integers:
>
> IDL> a = 32767 & help,a
> A INT = 32767
> IDL> a = 32768 & help,a
> A LONG = 32768
>
> I can't imagine how adding this capability would break existing code.
>
> Does anyone know if other interpreted languages can recognize a double
> precision number when they encounter one? Thanks, --Wayne
>

I would prefer a good working function which does get the minimum type
needed to represent the data. That would help on an other issue too.
e.g. you could then read data type dependent into structures.

This function could be used for the compiler too but it should not be
hidden from the user.


cheers
Reimar







-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFHH4vD5aOc3Q9hk/kRAlVkAKC0mr00iPkpCKDKqJZXLioBT6IdWACg qRO8
5vQL005oOUN8ch0Tf5rYQps=
=Z4Fu
-----END PGP SIGNATURE-----
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: large info structure?
Next Topic: Read data from SQL data base?

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

Current Time: Fri Oct 10 02:07:26 PDT 2025

Total time taken to generate the page: 1.44270 seconds