|
Re: Type convertion error ? [message #72721 is a reply to message #72720] |
Fri, 01 October 2010 08:15  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
nata writes:
> Why the following occurs ?
>
> If I have an unsigned LONG like a=1285649589ul
>
> And I do
> PRINT, a, FORMAT='(f0.1)'
> 1285649589.0
>
> PRINT, FLOAT(a), FORMAT='(f0.1)'
> 1285649536.0
>
> I don't understand the problem.. It seems that there is a difference
> changing the data type but, then, I do
> PRINT, a - FLOAT(a), FORMAT='(f0.1)'
> 0.0
>
> WTF ???
> What's going on here ?
The sky is falling. :-)
http://www.dfanning.com/math_tips/sky_is_falling.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|