Back to index

glibc  2.9
unordsf2.c
Go to the documentation of this file.
00001 /* Software floating-point emulation.
00002    Return 1 iff a or b is a NaN, 0 otherwise.
00003    Copyright (C) 2006,2007 Free Software Foundation, Inc.
00004    This file is part of the GNU C Library.
00005    Contributed by Joseph Myers (joseph@codesourcery.com).
00006 
00007    The GNU C Library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Lesser General Public
00009    License as published by the Free Software Foundation; either
00010    version 2.1 of the License, or (at your option) any later version.
00011 
00012    In addition to the permissions in the GNU Lesser General Public
00013    License, the Free Software Foundation gives you unlimited
00014    permission to link the compiled version of this file into
00015    combinations with other programs, and to distribute those
00016    combinations without any restriction coming from the use of this
00017    file.  (The Lesser General Public License restrictions do apply in
00018    other respects; for example, they cover modification of the file,
00019    and distribution when not linked into a combine executable.)
00020 
00021    The GNU C Library is distributed in the hope that it will be useful,
00022    but WITHOUT ANY WARRANTY; without even the implied warranty of
00023    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00024    Lesser General Public License for more details.
00025 
00026    You should have received a copy of the GNU Lesser General Public
00027    License along with the GNU C Library; if not, write to the Free
00028    Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
00029    MA 02110-1301, USA.  */
00030 
00031 #include "soft-fp.h"
00032 #include "single.h"
00033 
00034 CMPtype __unordsf2(SFtype a, SFtype b)
00035 {
00036   FP_DECL_S(A);
00037   FP_DECL_S(B);
00038   CMPtype r;
00039 
00040   FP_UNPACK_RAW_S(A, a);
00041   FP_UNPACK_RAW_S(B, b);
00042   FP_CMP_UNORD_S(r, A, B);
00043 
00044   return r;
00045 }