-Wfloat-equal and comparison to zero
Michael Matz
matz@suse.de
Wed Nov 13 13:56:03 GMT 2024
Hello,
On Tue, 12 Nov 2024, Thomas Koenig via Gcc wrote:
> Am 12.11.24 um 17:25 schrieb Michael Matz via Gcc:
>
> > If you think of float as
> > approximated reals, then yes, division by zero is undefined (not
> > somewhat undefined!).
>
> Depends on how you look at it.
>
> IEEE 754-2008, for example, says in 7.3
When you regard floats (I meant IEEE floats) as approximated reals (I
meant R) then IEEE 754 doesn't enter the picture. In R division by zero
is undefined. Of course in IEEE division is completey defined, as I also
said.
Ciao,
Michael.
More information about the Gcc
mailing list