[Main]
Name=fcmp
Type=Function
Subtype=ROM Call
Header Files=timath.h
Definition=long fcmp (float x, float y);
Attributes=__attribute__((__const__))

[ROM Call]
Index=$BB

[Description]
Floating point comparation.

[Explanation]
fcmp compares floating point arguments <I>x</I> and <I>y</I>, and returns a
value which is
<UL>
<LI>&lt; 0 if <I>x</I> is less than <I>y</I></LI>
<LI>== 0 if <I>x</I> is the same as <I>y</I></LI>
<LI>&gt; 0 if <I>x</I> is greater than <I>y</I></LI>
</UL>
This function may be useful as a comparison function for <A HREF="$$LINK(stdlib.h/qsort)">qsort</A>
function from <A HREF="$$LINK(stdlib.h/)">stdlib.html</A>. All relation operators applied to
floating point types are implemented through implicite calls of this function.
At the fundamental level, fcmp is exactly the same routine as
<A HREF="$$LINK(bcdcmp)">bcdcmp</A>.
<BR><BR>
<B>Note:</B> All kind of zeros are equal from the aspect of comparation. Transfinite values
are incomparable, and the result of fcmp is unpredictable (usually 1, but this is not
guarantee) if any argument is transfinite. See <A HREF="$$LINK(ZERO)">ZERO</A>,
<A HREF="$$LINK(UNSIGNED_ZERO)">UNSIGNED_ZERO</A>, <A HREF="$$LINK(POSITIVE_ZERO)">POSITIVE_ZERO</A>,
<A HREF="$$LINK(NEGATIVE_ZERO)">NEGATIVE_ZERO</A>, <A HREF="$$LINK(UNSIGNED_INF)">UNSIGNED_INF</A>,
<A HREF="$$LINK(POSITIVE_INF)">POSITIVE_INF</A>, <A HREF="$$LINK(NEGATIVE_INF)">NEGATIVE_INF</A>
and <A HREF="$$LINK(NAN)">NAN</A> for more details.

[References]
Out=unknown.h/_bcd_math
In=bcdcmp
