harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Bornstein <danf...@google.com>
Subject Re: Float/Double comparison performance
Date Fri, 01 May 2009 22:46:07 GMT
On Fri, May 1, 2009 at 3:22 PM, Tim Ellison <t.p.ellison@gmail.com> wrote:
> Dan Bornstein wrote:
>> Would the following be a useful and safe improvement over the above?:
>>     if (float1 == float2 && 0.0f != (float1 + float2)) {
>
> In fact, since you have the ==, why is it not sufficient to say
> (float1 == float2 && 0.0f != float1)

Good point!

-dan

Mime
View raw message