Article View: alt.comp.lang.learn.c-c++
Article #763Re: float precision
From: Andreas Kahari
Date: Thu, 13 Apr 2000 00:00
Date: Thu, 13 Apr 2000 00:00
49 lines
2294 bytes
2294 bytes
Why not use 'int' or 'long int'?
Limits are declared in <limits.h> (standard?). This is what it says on
my system:
#define INT_MAX 2147483647 /* max value of an "int" */
#define UINT_MAX 4294967295U /* max value of an "unsigned
int" */
#define LONG_MAX 9223372036854775807L
/* max value of a "long int" */
#define DBL_MAX 1.7976931348623157E+308 /* max decimal value of
a */
/* "double" */
(very system dependent I guess)
/A
In article <38F5D7E6.153591F2@cyberdude.com>,
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 ?
>
> Thanks ......
>
> --
> The Aero Section : http://fly.to/TheAeroSection/
> The Aero Section is a large military aircraft photo gallery.
>
>
--
# Andreas K๏ฟฝh๏ฟฝri, <URL:http://hello.to/andkaha/>.
# All junk email is reported to the appropriate authorities.
Sent via Deja.com http://www.deja.com/
Before you buy.
Technical Details
Message-ID:
<8d4nb6$h8m$1@nnrp1.deja.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38F5D7E6.153591F2@cyberdude.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 114592,fcf1bc31a1ccc99f X-Google-Attributes: gid114592,public X-Google-Thread: fdcad,fcf1bc31a1ccc99f X-Google-Attributes: gidfdcad,public X-Google-Thread: 109fba,fcf1bc31a1ccc99f X-Google-Attributes: gid109fba,public From: Andreas Kahari <andkaha@my-deja.com> Subject: Re: float precision Date: 2000/04/13 Message-ID: <8d4nb6$h8m$1@nnrp1.deja.com> X-Deja-AN: 610682771 References: <38F5D7E6.153591F2@cyberdude.com> X-Http-Proxy: 1.0 bazaar:3128 (Squid/2.3.STABLE1), 1.0 x33.deja.com:80 (Squid/1.1.22) for client 130.238.17.136, 130.238.17.136 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Thu Apr 13 14:58:57 2000 GMT X-MyDeja-Info: XMYDJUIDandkaha Newsgroups: alt.comp.lang.learn.c-c++,comp.lang.c++,fr.comp.lang.c++ X-Http-User-Agent: Mozilla/4.72 [en] (X11; I; SunOS 5.7 sun4u; Nav)