Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Possreps and numeric types
Matthias Klaey <mpky_at_hotmail.com> wrote in
news:6l7j03di6tdmf1k68s7oa2d6fto0lv9ko3_at_4ax.com:
> "V.J. Kumar" <vjkmail_at_gmail.com> wrote:
>
>>"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 >>post- modern 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 !
It is very sweet of you to provide a trivial and very well known to any programmer demonstration that IEEE 754/854 floating point implementation does not (and cannot) represent *all* real numbers and that may create problems, but what has it got to do with your absurd statement that "2+2" is somewhere between 3 and 4 ?
> The "Swiss" part is that I am using dramatic oversimplification
Your statement about "2+2 != 4" is not a "dramatic oversimplification" but simply false even with IEEE 754 representation. Some students of yours may actually believe that nonsense !
>
> Greetings
> Matthias Kläy
Received on Wed Mar 28 2007 - 06:26:09 CDT