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

Home » Public Forums » archive » Re: Numbers from nowhere?
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: Numbers from nowhere? [message #58738 is a reply to message #58737] Fri, 15 February 2008 13:12 Go to previous messageGo to previous message
bennette is currently offline  bennette
Messages: 1
Registered: February 2008
Junior Member
On Feb 15, 10:08 am, Conor <cmanc...@gmail.com> wrote:
> I'm just curious:
>
> print,3.3,format='(f30.28)'
> 3.2999999523162841796875000000
>
> Obviously float is only good to ~6 decimal places, but IDL will still
> print out additional digits. It seems that it does reach a point
> where IDL will only print out zeroes. I'm just curious - where do
> these extra digits come from? Does it come from rounding errors
> converting binary to decimal? Or does it come from some other
> nefarious location?

I think that you hit the nail on the head. There is a nice article on
decimal to binary conversion on David Fanning's sight.
http://www.dfanning.com/math_tips/sky_is_falling.html

Eric

----------------
Eric Bennett
National Institutes of Health
bennette at nih.nhlbi.gov
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Labeling the x-axis with a non standard time string
Next Topic: idl format codes and output files

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

Current Time: Sun Nov 30 07:14:19 PST 2025

Total time taken to generate the page: 1.60445 seconds