This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Serious bug
- To: Richard Hadsell <hadsell at blueskystudios dot com>
- Subject: Re: Serious bug
- From: Kamil Iskra <kamil at dwd dot interkom dot pl>
- Date: Tue, 29 Sep 1998 13:11:27 +0200 (EEST)
- cc: egcs at cygnus dot com
On Mon, 28 Sep 1998, Richard Hadsell wrote:
> The bottom
> line for any language ought to be:
>
> (1) If you subtract a number from itself, you get 0.
Unless using floating point.
> (2) If you compare a number with itself, you get equality.
Unless using floating point.
> (3) If you assign a number to another of the same type, you get the same
> number.
Unless using floating point.
> This has nothing to do with rounding questions. If the processor
> architecture has problems with this, the compiler has to work around
> those problems. If this was left out of the C++ standard, it was only
> because nobody thought it would be necessary. It's obvious.
Not to me. I was taught NEVER to use == or != with floating point, because
they simply don't make sense. Too bad that C[++] standard allows them.
/ Kamil Iskra AmigaOS Linux/i386 Linux/m68k \
| GeekGadgets m68k-amigaos GCC maintainer |
| iskra@student.uci.agh.edu.pl kiskra@ernie.icslab.agh.edu.pl |
\ kamil@dwd.interkom.pl http://student.uci.agh.edu.pl/~iskra /