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 #56256 is a reply to message #56164] Tue, 09 October 2007 08:11 Go to previous messageGo to previous message
edward.s.meinel@aero. is currently offline  edward.s.meinel@aero.
Messages: 52
Registered: February 2005
Member
On Oct 8, 9:18 am, wlandsman <wlands...@gmail.com> wrote:
> Bob, Bringfried,
>
>> Well, to play devil's advocate, the programmer should not let the
>> user input single precision data in such a case.
>
> Except that single precision or even a long integer (e.g. 2441636)
> *could* be valid, if the user was not interested in fractional
> days. I agree that it is probably safest to force the user to
> input double precision, but this does not feel like the "IDL way".
> Thanks, --Wayne

Actually, it gets rounded:

IDL> jd = 2441636.1
IDL> print, jd, f='(f10.2)'
2441636.00
IDL> jd = 2441636.9
IDL> print, jd, f='(f10.2)'
2441637.00

You're right, that is not a good thing. Mathematica has been doing it
correctly for a long time, why can't IDL?

Ed M
[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: Thu Oct 09 19:05:41 PDT 2025

Total time taken to generate the page: 2.63862 seconds