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

Home » Public Forums » archive » Re: Grumbling about setting 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: Grumbling about setting double precision [message #78775 is a reply to message #78774] Wed, 21 December 2011 06:20 Go to previous messageGo to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article < 31663559.520.1324400314865.JavaMail.geo-discussion-forums@yq dj19 >,
wlandsman <wlandsman@gmail.com> wrote:

> I am converting a Python program to IDL which includes several hundred double
> precision data values. In Python the data values are written as follows:
>
> a = [2721.64363164731, -1615.73035059635]
>
> As described by David Fanning in
> http://www.idlcoyote.com/math_tips/double.html to make these double precision
> in IDL, it is not enough to convert the vector to double
>
> IDL> print,double(a),f='(2f18.10)'
> 2721.6435546875 -1615.7303466797
>
> and it is not enough to put a "d" at the end of one of the values
>
> IDL> a = [2721.64363164731d, -1615.73035059635]
> IDL> print,double(a),f='(2f18.10)'
> 2721.6436316473 -1615.7303466797
>
> Instead, I must spend an hour in my editor putting a "d" at the end of every
> single data value.
>
> But it would sure be nice to be able to somehow tell the IDL compiler to
> interpret numeric values as double precision. --Wayne

You could replace "," with "D," and replace "]" with "D]".

That should only take a minute or two with find and replace.

Ken
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: running IDL as a 'sleeping' process
Next Topic: Affordable SEO Services

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

Current Time: Wed Oct 08 18:20:44 PDT 2025

Total time taken to generate the page: 0.00450 seconds