From: Arne Vajhøj on
On 07-07-2010 21:32, Lew wrote:
> Lew wrote:
>>> 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.
>
> Arne Vajhøj wrote:
>> There are actually programmers that are never exposed to floating
>> point.
>
> Then a) they aren't programmers and b) they are derelict if they wish to
> be.

There are lots of fields where floating point is never used.

I consider it a bit arbitrary to consider programmers with
narrow focus on business apps or embedded apps not to be programmers
a bit arbitrary.

Arne
From: Arne Vajhøj on
On 08-07-2010 09:20, Tom Anderson wrote:
> On Thu, 8 Jul 2010, Martin Gregorie wrote:
>> On Wed, 07 Jul 2010 21:32:30 -0400, Lew wrote:
>>> Lew wrote:
>>>>> 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.
>>>
>>> Arne Vajh?j wrote:
>>>> There are actually programmers that are never exposed to floating
>>>> point.
>>>
>>> Then a) they aren't programmers and b) they are derelict if they wish to
>>> be.
>>
>> Depends what they're doing, e.g. if they're writing financial software in
>> COBOL or RPG 3, its quite likely that they may never need use floating
>> point in their entire working life: by default COBOL does fixed decimal
>> point arithmetic which is more appropriate for financial calculations
>> than floating point because the answer is always exact.
>
> Exact, although not necessarily correct!

If the results matches the specification for the language
then it is correct.

Arne
From: Arne Vajhøj on
On 08-07-2010 19:05, Jim Janney wrote:
> Lew<noone(a)lewscanon.com> writes:
>> Boris Punk wrote:
>>> I did plenty of manual sums of floating point numbers at college on paper -
>>> just wanted a refresher from some knowlegeable folk on how it's applied in
>>> java [sic]. Is Lew on a period or something? Hehe get it...period...never mind....
>>
>> Are you suggesting that there's something wrong with programmers
>> knowing the basics of our profession? Or with espousing that we do?
>>
>> Seems to me that someone with a commitment to excellence in the
>> programming profession would agree that we should improve our skills,
>> study the basics, and strive for superiority in our professionalism,
>> rather than make sexist, low-brow remarks about someone who makes
>> those points.
>
> I'm with Lew on this one: it's an important subject and I meet too
> many programmers, many with CS degrees, who not only don't understand
> it but don't even seem to know that it exists.
>
> I learned enough numerical analysis to understand how little I know
> about it: many programmers don't seem to know even that.

Numerical analysis is not a big CS topic.

You may find more experience with it in the other sciences: physics,
astronomy, statistics, econometrics etc..

Arne

From: Arne Vajhøj on
On 08-07-2010 06:26, Screamin Lord Byron wrote:
> On 07/08/2010 07:01 AM, Roedy Green wrote:
>> On Wed, 07 Jul 2010 19:48:24 +0200, Mayeul<mayeul.marguet(a)free.fr>
>> wrote, quoted or indirectly quoted someone who said :
>>> 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.
>>
>> I used use to teach FORTRAN at UBC way back when. We covered this in
>> the first semester. This very basic stuff about floating point. If
>> you taught yourself you may have missed this. See
>> http://mindprod.com/jgloss/floatingpoint.html
>> to fill in your missing background.
>
> Why not simply read Wiki's article about IEEE 754. If floating point
> calculations must be precise and predictable across platforms, one must
> ensure to use IEEE 754 (ie. strictfp keyword), and not the default,
> machine-dependent fp representation.

Note that Java always use IEEE 754 representation for storage of
floating point numbers. The strictfp keyword only ensures that
intermediate results in calculations also are represented that way.

Arne



From: Lew on
Arne Vajhøj wrote:
>>> There are actually programmers that are never exposed to floating
>>> point.

Lew wrote:
>> Then a) they aren't programmers and b) they are derelict if they wish to
>> be.

Arne Vajhøj wrote:
> There are lots of fields where floating point is never used.
>
> I consider it a bit arbitrary to consider programmers with
> narrow focus on business apps or embedded apps not to be programmers
> a bit arbitrary.

I consider people who call themselves "programmers" with only a very narrow
understanding of the field to be poseurs.

It's a "tip of the iceberg" thing. You should know more than you use. I
don't say one should know everything about everything in programming, but
there's a reason the seminal article on floating-point computing is named,
"What *Every* Computer Scientist Should Know About Floating-Point Arithmetic"
[emph. added]. OK, I extend that to every programmer, but come on! One
should at least be aware of the basics.

I am shocked and horrified at the apologistics for ignorance in this thread.
For shame!

--
Lew