X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 18 Feb 2014 02:16 AM by  anon
declaring Double-type variable
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:14
New Member


--
18 Feb 2014 02:16 AM
    Dear: IDL> a=double(1.123456789) the "Variables" window shows A 1.1234568357467651 IDL> a=double(1.123456789D) the "Variables" window shows A 1.1234567890000000 Why? What does the "D" in "double(1.123456789D)" mean? Thank you very much. Best regards, Chia-Hsiang Yang

    Deleted User



    New Member


    Posts:
    New Member


    --
    18 Feb 2014 11:04 AM
    Your first statement says convert this floating point number that has random values in it past about six decimals of precision to a double precision value. You second statement says (oddly) convert this double precision number (that's what the D means) that is *exactly* this value to a double precision value. You will find lots of information to chew on in these articles: http://www.idlcoyote.com/math_tips/double.html http://www.idlcoyote.com/...tips/readdouble.html http://www.idlcoyote.com/.../sky_is_falling.html
    You are not authorized to post a reply.