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
Recognizing double precision? [message #56164] Fri, 05 October 2007 08:12 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
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
[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: Wed Oct 08 17:36:04 PDT 2025

Total time taken to generate the page: 0.00509 seconds