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

Home » Public Forums » archive » Re: fix(4.70*100) is... 469
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: fix(4.70*100) is... 469 [message #53559 is a reply to message #53558] Thu, 19 April 2007 07:32 Go to previous messageGo to previous message
b_efremova@yahoo.com is currently offline  b_efremova@yahoo.com
Messages: 18
Registered: July 2005
Junior Member
Sorry Guys, I should have made myself clearer.
I'm afraid David this is not actually the question you describe in
your article.
and I do not expect better accuracy than I provide.

There is nothing wrong here with the floating point accuracy.
print,4.700*100.00
470.000

It is the conversion to integer (I imagine) which makes no sence.

print,fix(4.700*100.00)
469
also (which is what I really needed)

print,string(4.700*100.00,format='(i3)')
469

Cheers
Boryana

> Hooboy! Haven't had one of these in awhile. :-)
>
> 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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: sparsab, sparsax and complex arrays
Next Topic: Re: idl 6.1 crashes on linux

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

Current Time: Wed Oct 08 19:03:53 PDT 2025

Total time taken to generate the page: 0.00490 seconds