[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rounding errors
On Fri, 27 Apr 2001, Liam E. Gumley wrote:
> This is a subtle but important point. DOUBLE() is a type conversion
> function, and
>
> a = double(2.348339)
>
> shows a FLOAT argument being converted to a DOUBLE. The safest way to
> 'cast' a double variable is
>
> a = 2.348339d
[snip]
Wow... I am glad that I have now learned that particular 'IDL feature'
early on in my PhD. Just yesterday, I convinced the department that we
really need a few good IDL programming books as the current
'learning-by-fire' approach could have some unfortunate consequences ;)
Oh well, back to searching my IDL code for incorrect double precision
constants...