s_nexttowardf.c (176451) | s_nexttowardf.c (218511) |
---|---|
1/* 2 * ==================================================== 3 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 4 * 5 * Developed at SunPro, a Sun Microsystems, Inc. business. 6 * Permission to use, copy, modify, and distribute this 7 * software is freely granted, provided that this notice 8 * is preserved. 9 * ==================================================== 10 */ 11 12#include <sys/cdefs.h> | 1/* 2 * ==================================================== 3 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 4 * 5 * Developed at SunPro, a Sun Microsystems, Inc. business. 6 * Permission to use, copy, modify, and distribute this 7 * software is freely granted, provided that this notice 8 * is preserved. 9 * ==================================================== 10 */ 11 12#include <sys/cdefs.h> |
13__FBSDID("$FreeBSD: head/lib/msun/src/s_nexttowardf.c 176451 2008-02-22 02:30:36Z das $"); | 13__FBSDID("$FreeBSD: head/lib/msun/src/s_nexttowardf.c 218511 2011-02-10 07:38:38Z das $"); |
14 15#include <float.h> 16 17#include "fpmath.h" 18#include "math.h" 19#include "math_private.h" 20 21#define LDBL_INFNAN_EXP (LDBL_MAX_EXP * 2 - 1) --- 23 unchanged lines hidden (view full) --- 45 hx -= 1; 46 else /* x += ulp */ 47 hx += 1; 48 ix = hx&0x7f800000; 49 if(ix>=0x7f800000) return x+x; /* overflow */ 50 if(ix<0x00800000) { /* underflow */ 51 t = x*x; 52 if(t!=x) { /* raise underflow flag */ | 14 15#include <float.h> 16 17#include "fpmath.h" 18#include "math.h" 19#include "math_private.h" 20 21#define LDBL_INFNAN_EXP (LDBL_MAX_EXP * 2 - 1) --- 23 unchanged lines hidden (view full) --- 45 hx -= 1; 46 else /* x += ulp */ 47 hx += 1; 48 ix = hx&0x7f800000; 49 if(ix>=0x7f800000) return x+x; /* overflow */ 50 if(ix<0x00800000) { /* underflow */ 51 t = x*x; 52 if(t!=x) { /* raise underflow flag */ |
53 SET_FLOAT_WORD(y,hx); 54 return y; | 53 SET_FLOAT_WORD(x,hx); 54 return x; |
55 } 56 } 57 SET_FLOAT_WORD(x,hx); 58 return x; 59} | 55 } 56 } 57 SET_FLOAT_WORD(x,hx); 58 return x; 59} |