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

Home » Public Forums » archive » Re: Why does 0.8 = 0.80000001 ?
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: Why does 0.8 = 0.80000001 ? [message #31955 is a reply to message #31899] Wed, 28 August 2002 17:35 Go to previous message
condor is currently offline  condor
Messages: 35
Registered: January 2002
Member
Benjamin Panter <benpanterREMOVE@bigfoot.com> wrote in message news:<3D6A306A.BF422364@bigfoot.com>...

> I had it in my head that it was 12 sig fig with an internal mantissa of 14,
> as I mentioned I wasn't overly paniced about it, more interested in finding
> out what was going on. Glad to get that cleared up!

It is actually about 15 significant figures:


help,str1
STR1 DOUBLE = Array[17]
str1[6] = 0.8 ; the original example
print,str1[6]
0.80000001
str1[6] = 0.8d0 ; the correct way
print,str1[6]
0.80000000

...
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: call_external: passing string from IDL to C
Next Topic: Optimal interpolation

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

Current Time: Fri Oct 10 11:16:20 PDT 2025

Total time taken to generate the page: 1.27954 seconds