From: Boris Punk on

This is a FAQ. Don't they teach numerical analysis at university any
more? What's with the education system these days anyway?



Didn't in Software Dev. Objects n diagrams in dev.


From: Lew on
Lew wrote:
>> Your answer is here:
>> <http://docs.sun.com/source/806-3568/ncg_goldberg.html>
>

Mayeul wrote:
> Come on, if that did not lead to horribly broken code out in production,
> it would be a great IT achievement that you can produce new programs
> that work, without understanding what you're programming.
>

You said it yourself - it leads to horribly broken code out in
production that people produce new programs without understanding what
they're programming.

The reason that computer programmers command such good wages is that
it is a *skilled* profession. Most people cannot do it, and of those
who can it requires intelligence, study and practice, i.e., it
requires tremendous intellectual effort and capacity.

It is one of the most fundamental and introductory aspects of computer
programming that floating-point "numbers" in a computer are limited-
precision approximations of real numbers.

Mayeul, I'm not sure what point you were actually making. I sincerely
hope you are not arguing in favor of programmers not understanding
what they're doing.

--
Lew
From: Lew on
Please set off citations, traditionally with leading ">" characters,
and cite the source.

Lew wrote:
> This is a FAQ.  Don't they teach numerical analysis at university any
> more?  What's with the education system these days anyway?
>

Boris Punk wrote:
> Didn't in Software Dev. Objects n diagrams in dev.
>

Whatever you said, I commend you heartily for making up the gap.

(What is "Software Dev. Objects n diagrams in dev"? That was well-
nigh incomprehensible.)

--
Lew
From: Arne Vajhøj on
On 07-07-2010 12:37, Boris Punk wrote:
> long l = 9999999999999L;
> double f = 0.11111111111D;
> double fl = f+l;
> System.out.println(fl);
>
> =9.999999999999111E12
>
> Where's the rest of the 0.1111111's ?

Floating point math is not always exact.

The floating point types in Java has a fixed
size and is therefore limited to a certain precision.

The 9999999999999 is converted to 9999999999999.0
before the addition is happening.

9999999999999.0 + 0.11111111111

in floating point should be read as:

something between 9999999999998.995 and 9999999999999.005 plus
something between 0.1111111111099995 and 0.1111111111100005
and the result something between 9999999999999.105 and 9999999999999.115
is correct.

Arne

From: Arne Vajhøj on
On 07-07-2010 14:13, Lew wrote:
> The reason that computer programmers command such good wages is that
> it is a *skilled* profession. Most people cannot do it, and of those
> who can it requires intelligence, study and practice, i.e., it
> requires tremendous intellectual effort and capacity.

Why can I hear violins in the background?

:-)

> It is one of the most fundamental and introductory aspects of computer
> programming that floating-point "numbers" in a computer are limited-
> precision approximations of real numbers.

There are actually programmers that are never exposed to floating
point.

Arne