[BACK]Return to isnanl_ieee754.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / gen

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/gen/isnanl_ieee754.c between version 1.5 and 1.6

version 1.5, 2003/10/24 00:58:02 version 1.6, 2011/01/17 23:53:03
Line 44  __RCSID("$NetBSD$");
Line 44  __RCSID("$NetBSD$");
 #endif  #endif
 #endif /* LIBC_SCCS and not lint */  #endif /* LIBC_SCCS and not lint */
   
 #include "namespace.h"  
 #include <sys/types.h>  
 #include <machine/ieee.h>  #include <machine/ieee.h>
 #include <math.h>  #include <math.h>
   
 #if !defined(EXT_EXP_INFNAN)  #ifdef __HAVE_LONG_DOUBLE
 #include <assert.h>  /*
 #endif   * 7.12.3.4 isnan - test for a NaN
    *          IEEE 754 compatible 128-bit extended-precision version
 #if 0   /* XXX Currently limited to internal use. */   */
 #ifdef __weak_alias  
 __weak_alias(isnanl,_isnanl)  
 #endif  
 #endif  
   
 int  int
 isnanl(long double ld)  __isnanl(long double x)
 {  {
 #if defined(EXT_EXP_INFNAN)          union ieee_ext_u u;
         union {  
                 long double ld;          u.extu_ld = x;
                 struct ieee_ext ldbl;  
         } u;  
   
         u.ld = ld;          return u.extu_ext.ext_exp == EXT_EXP_INFNAN
         return (u.ldbl.ext_exp == EXT_EXP_INFNAN &&              && (u.extu_ext.ext_frach != 0 || u.extu_ext.ext_frachm != 0
             (u.ldbl.ext_frach != 0 || u.ldbl.ext_frachm != 0 ||                  || u.extu_ext.ext_fraclm != 0 || u.extu_ext.ext_fracl != 0);
              u.ldbl.ext_fraclm != 0 || u.ldbl.ext_fracl != 0));  
 #else  
         _DIAGASSERT(sizeof(double) == sizeof(long double));  
         return (isnan((double) ld));  
 #endif /* EXT_EXP_INFNAN */  
 }  }
   #endif /* __HAVE_LONG_DOUBLE */

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

CVSweb <webmaster@jp.NetBSD.org>