s_isnan.c (2208ce0a068375ad0295fbe5ef65f353f4d05914) | s_isnan.c (efd0f253c2899af6f3de9dd0991f4a197f1c49dd) |
---|---|
1/*- 2 * Copyright (c) 2004 David Schultz <das@FreeBSD.ORG> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 29 unchanged lines hidden (view full) --- 38 union IEEEd2bits u; 39 40 u.d = d; 41 return (u.bits.exp == 2047 && (u.bits.manl != 0 || u.bits.manh != 0)); 42} 43#endif 44 45int | 1/*- 2 * Copyright (c) 2004 David Schultz <das@FreeBSD.ORG> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 29 unchanged lines hidden (view full) --- 38 union IEEEd2bits u; 39 40 u.d = d; 41 return (u.bits.exp == 2047 && (u.bits.manl != 0 || u.bits.manh != 0)); 42} 43#endif 44 45int |
46isnanf(float f) | 46__isnanf(float f) |
47{ 48 union IEEEf2bits u; 49 50 u.f = f; 51 return (u.bits.exp == 255 && u.bits.man != 0); 52} 53 54int 55__isnanl(long double e) 56{ 57 union IEEEl2bits u; 58 59 u.e = e; 60 mask_nbit_l(u); 61 return (u.bits.exp == 32767 && (u.bits.manl != 0 || u.bits.manh != 0)); 62} | 47{ 48 union IEEEf2bits u; 49 50 u.f = f; 51 return (u.bits.exp == 255 && u.bits.man != 0); 52} 53 54int 55__isnanl(long double e) 56{ 57 union IEEEl2bits u; 58 59 u.e = e; 60 mask_nbit_l(u); 61 return (u.bits.exp == 32767 && (u.bits.manl != 0 || u.bits.manh != 0)); 62} |
63 64__weak_reference(__isnanf, isnanf); |
|