Re: Machine precision
On Mon, 20 Oct 2003 20:19:31 +0200, "Patrick Frankenberger"
<p.frankenberge r@gmx.net> wrote in comp.lang.c++:
[color=blue]
>
> "Keith S." wrote:[color=green]
> > P.J. Plauger wrote:
> >[color=darkred]
> > > No, the distribution is extremely *non* uniform, with values much more[/color][/color]
> densely[color=green][color=darkred]
> > > packed close to zero.[/color]
> >
> > This has me interested, since I would have assumed the same as the
> > previous poster, i.e. that values would be evenly spaced according
> > to the smallest value (DBL_EPSILON).[/color]
>
> A floating-point number is: a*2^(b-offset)
> a is a signed integer and b is an unsigned integer.
>
> HTH,
> Patrick[/color]
....on some platforms, perhaps all of those that you are familiar with.
The C++ language standard deliberately does not specify the
implementation details of the floating point types, and some are quite
different from the model you describe.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
On Mon, 20 Oct 2003 20:19:31 +0200, "Patrick Frankenberger"
<p.frankenberge r@gmx.net> wrote in comp.lang.c++:
[color=blue]
>
> "Keith S." wrote:[color=green]
> > P.J. Plauger wrote:
> >[color=darkred]
> > > No, the distribution is extremely *non* uniform, with values much more[/color][/color]
> densely[color=green][color=darkred]
> > > packed close to zero.[/color]
> >
> > This has me interested, since I would have assumed the same as the
> > previous poster, i.e. that values would be evenly spaced according
> > to the smallest value (DBL_EPSILON).[/color]
>
> A floating-point number is: a*2^(b-offset)
> a is a signed integer and b is an unsigned integer.
>
> HTH,
> Patrick[/color]
....on some platforms, perhaps all of those that you are familiar with.
The C++ language standard deliberately does not specify the
implementation details of the floating point types, and some are quite
different from the model you describe.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Comment