🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.learn.c-c++
Article #766

Re: float precision

#766
From: Karl Heinz Buchegger
Date: Thu, 13 Apr 2000 00:00
27 lines
1701 bytes

dataman@cyberdude.com wrote:
> 
> I am really confused about float precision ..officially it's 3.4 *
> (10**-38) to 3.4 * (10**+38)
> But, that does not help me much even it confuse me more ....
> 
> Here is my problem:
> 
> I need to define a world of 10 000 000 units .  I need to use float for
> that . I think to use only the positive part (but will depend from the
> answer of my question).
> What precision (after the dot ) can i expect  ?
> 

Not much. If you need to do some arithmetic on the
coordinates, and you will need to do this, you run
into big problems. floats usually have a precision
of 6 or 7 digits. If you do some arithmetics on
them, the error grows very rapidly, so better count
with 5 or 6 significant digits. Since you used all
of them for the integer part, .....

-----------------------------------------------------------
Karl Heinz Buchegger
kbuchegg@gascad.at
Technical Details
Message-ID: <38F5E510.E33662C@gascad.at>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <38F5D7E6.153591F2@cyberdude.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109fba,fcf1bc31a1ccc99f
X-Google-Attributes: gid109fba,public
X-Google-Thread: fdcad,fcf1bc31a1ccc99f
X-Google-Attributes: gidfdcad,public
X-Google-Thread: 114592,fcf1bc31a1ccc99f
X-Google-Attributes: gid114592,public
From: Karl Heinz Buchegger <kbuchegg@gascad.at>
Subject: Re: float precision
Date: 2000/04/13
Message-ID: <38F5E510.E33662C@gascad.at>
X-Deja-AN: 610710592
Content-Transfer-Encoding: 7bit
References: <38F5D7E6.153591F2@cyberdude.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Trace: newsreader.vienna.highway.telekom.at 955639024 58948 212.183.121.138
Organization: GASCAD
MIME-Version: 1.0
Newsgroups: alt.comp.lang.learn.c-c++,comp.lang.c++,fr.comp.lang.c++