From: Phoenix on
On 7 Jun, 09:44, Mok-Kong Shen <mok-kong.s...(a)t-online.de> wrote:

> Any floating point implementation covers of course only a finitely
> many values (an extremely small part) of R and these values are
> not uniformly distributed in the range implemented. Integers
> implemented cover similarly only a small part of Z or N, but
> the values are uniformly distributed in the range implemented.

Why integers are uniformly distributed and fp not?

From: Tom St Denis on
On Jun 7, 5:45 am, Phoenix <ribeiroa...(a)gmail.com> wrote:
> On 7 Jun, 09:44, Mok-Kong Shen <mok-kong.s...(a)t-online.de> wrote:
>
> > Any floating point implementation covers of course only a finitely
> > many values (an extremely small part) of R and these values are
> > not uniformly distributed in the range implemented. Integers
> > implemented cover similarly only a small part of Z or N, but
> > the values are uniformly distributed in the range implemented.
>
> Why integers are uniformly distributed and fp not?

Because some fractions are not easily representable in 2-adic terms.

Tom
From: Phoenix on
On 7 Jun, 11:54, Tom St Denis <t...(a)iahu.ca> wrote:

> > Why integers are uniformly distributed and fp not?
>
> Because some fractions are not easily representable in 2-adic terms.
>
> Tom

Well, with that assumption, we never have uniformly distribution in
(0;1).

From: Mok-Kong Shen on
Phoenix wrote:
> Mok-Kong Shen wrote:
>
>> Any floating point implementation covers of course only a finitely
>> many values (an extremely small part) of R and these values are
>> not uniformly distributed in the range implemented. Integers
>> implemented cover similarly only a small part of Z or N, but
>> the values are uniformly distributed in the range implemented.
>
> Why integers are uniformly distributed and fp not?

For integers on computers, the difference between neighbours is 1.
For floating points, which consist of mantissa and exponent, the
difference between neighbours depends on the exponent; the larger
the exponent the larger the distance between them (when considered
on the line of R).

M. K. Shen

From: Noob on
Phoenix wrote:

> The incompatibility between i.e. (Intel/SUN) communications, is for
> all areas (Chemistry, Trigonometry, Biology, Geometry, etc) or only
> for crypto?
> If answer is only for crypto, what is the solution to pass accurate
> and compatible values in R from one system to another?

You might be interested in reading Goldberg's famous paper.

What Every Computer Scientist Should Know About Floating-Point Arithmetic
http://docs.sun.com/source/806-3568/ncg_goldberg.html

Regards.