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

Home » Public Forums » archive » 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
Grumbling about setting double precision [message #78788] Tue, 20 December 2011 08:58 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
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
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Problem with the astron database on Mac OS X
Next Topic: LUSOL for Sparse Matrices using Sprsin?

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

Current Time: Wed Oct 08 18:35:46 PDT 2025

Total time taken to generate the page: 0.00432 seconds