Liste des Groupes | Revenir à c arch |
BGB wrote:Yeah, but as noted, was describing existing behavior in my case, not the standard behavior.
>
Currently, FCMPEQ will be false on NaN, whereas FCMPGT ignores NaN's.I guess possible could be to add an FCMPGE instruction, and then make both FCMPGT and FCMPGE be false on NaN (where the LT and LE cases can be
>
handled by flipping the arguments, so would still be false on NaN).So, as-is:
if(!(a==a))
{
//NaN
}But, as-is:Not when the compare is true to IEEE 754. When there is a floating
if(a>0)
{
//May still potentially get here with NaN
}
point
compare and one of the operands is NaN, none of the 6 standard
comparison
forms are true and control transfers to the else-clause.
In your top example the ! (not) causes NaNs to go to the then-clause
In your bottom example, no NaN is allowed into the then-clause.
Les messages affichés proviennent d'usenet.