Re: checking for Not a Number?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: checking for Not a Number?
- From: Glenn Maynard <glenn@...>
- Date: 2006年12月21日 01:44:51 -0500
On Thu, Dec 21, 2006 at 01:12:10AM -0500, Joe Smith wrote:
> Directly compairing floating point numbers for equality is *always* a bad
> idea.
I'd be interested in an assembly output scenario that could cause this
to fail:
bool b() { return true; }
float f() { return b(); }
assert(f() == 1.0f);
--
Glenn Maynard