Now that I'm thinking about it... we can do better by exploiting the fact that comparisons to NaN are always false. This should check for both NaN and negative infinity in a single comparison, right?
if (!(score > Float.NEGATIVE_INFINITY)) This is inner loop stuff - probably worth the change (along with good comments ;-) -Yonik http://www.lucidimagination.com On Mon, Jun 8, 2009 at 9:55 AM, Mark Miller <[email protected]> wrote: > Yonik Seeley wrote: >> >> On Mon, Jun 8, 2009 at 9:38 AM, Mark Miller <[email protected]> wrote: >> >>> >>> We have score!=score (same variable) - just wondering what that was >>> trying >>> to accomplish, or whether it can just be dropped. >>> >> >> Good thing you checked :-) >> >> > > Well I knew it was your work, so I had a sneaky suspicion something was > right about it. > > The comment didn't lead me to remember that NAN does not equal NAN. I think > I had lost that bit of info long ago. It did > make me think there could be something tricky going on though. > > -- > - Mark > > http://www.lucidimagination.com
