This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/34333] if(nan == nan) wrongly returns TRUE, when nan is a parameter



------- Comment #1 from burnus at gcc dot gnu dot org  2007-12-04 10:26 -------
http://www.mpfr.org/mpfr-2.3.0/mpfr.html#Comparison-Functions

? Function: int mpfr_cmp (mpfr_t op1, mpfr_t op2)
"If one of the operands is NaN, set the erange flag and return zero.

Note: These functions may be useful to distinguish the three possible cases. If
you need to distinguish two cases only, it is recommended to use the predicate
functions (e.g., mpfr_equal_p for the equality) described below; they behave
like the IEEE-754 comparisons, in particular when one or both arguments are
NaN. But only floating-point numbers can be compared (you may need to do a
conversion first)."


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34333


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]