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

Home » Public Forums » archive » types (conflict)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
types (conflict) [message #36842] Sat, 01 November 2003 04:13
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Dear all
only for information

I recognized a lot of people don't know that there is a difference in coding
of double numbers.

a=[10.0D,20.0D,9999.9D]
print,a,format='(F20.10)
10.0000000000
20.0000000000
9999.9000000000

Each number has to get the "D" sign in the definition, this is important.
Sometimes I see routines only first number is signed by "D" then the array
is in double but not all values are definied by the right precision.

a=[10.0D,20.0,9999.9]
print,a,format='(F20.10)
10.0000000000
20.0000000000
9999.9003906250

The same with Make_Array,
b=make_array(value=9999.9D,3,/double)
print,b,format='(F20.10)
9999.9000000000
9999.9000000000
9999.9000000000

If the "D" sign is missing:
b=make_array(value=9999.9,3,/double)
print,b,format='(F20.10)
9999.9003906250
9999.9003906250
9999.9003906250


regards

Reimar



--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: path_sep() or where() crashing my idlde
Next Topic: Re: types (conflict)

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

Current Time: Fri Oct 10 04:17:08 PDT 2025

Total time taken to generate the page: 1.76122 seconds