Re: Possreps and numeric types

From: V.J. Kumar <vjkmail_at_gmail.com>
Date: 27 Mar 2007 13:07:57 +0200
Message-ID: <Xns99004923A442Evdghher_at_217.22.228.20>


"David Cressey" <cressey73_at_verizon.net> wrote in news:KD2Oh.1604$Rp2.1491_at_trndny04:

>
> "V.J. Kumar" <vjkmail_at_gmail.com> wrote in message
> news:Xns98FFEB79C9D6Bvdghher_at_217.22.228.20...

>> Matthias Klaey <mpky_at_hotmail.com> wrote in
>> news:gqsg031cmfnr5p5fbiokksmaf8psios4hh_at_4ax.com:
>>
>> > I used to teach that if you calculate "2 + 2" on a computer, the
>> > result would be somewhere between 3 and 5,
>>
>> You are kidding, right ?  If not,  you might want to fix your
>> computer for the sake of your poor students at least !

>
> I think you missed the irony in the original teaching. If you are
> working with integers,
> there is only one answer that is somewhere between 3 and 5.

I may be missing the irony, but how can adding integer 2 and 2 can produce anything but 4 ? "Somewhere" implies vagueness or ambiguity, at least in the English I am accustomed to. Is it some sort of new postmodern  kind of math, or English, I am unfamiliar with ? It seems that the Swiss secondary education system is in even worse shape than the American !

> Everything works. If you are working with floating point numbers, and
> approximations, you can get some nasty surprises.

Not when adding floating 2.0 and 2.0, it is still 4.0 surprisingly enough for some !

>
> Some decades back, some of us had to find out why the books were out
> of balance by a penny. The answer turned out to be inappropriate use
> of binary floating point numbers to represent decimal fractions of
> currency amounts. Eventually, the round off errors produced a
> discrepancy visible to the guys with green eyeshades. (Younger folks
> may need a lesson in history for this one). I don't remember how much
> labor we put into that one, but it was more than a penny's worth.
>
>
>
Received on Tue Mar 27 2007 - 13:07:57 CEST

Original text of this message