s_rint.c (21673) | s_rint.c (22808) |
---|---|
1/* @(#)s_rint.c 5.1 93/09/24 */ 2/* 3 * ==================================================== 4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 5 * 6 * Developed at SunPro, a Sun Microsystems, Inc. business. 7 * Permission to use, copy, modify, and distribute this 8 * software is freely granted, provided that this notice 9 * is preserved. 10 * ==================================================== 11 */ 12 13#ifndef lint | 1/* @(#)s_rint.c 5.1 93/09/24 */ 2/* 3 * ==================================================== 4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 5 * 6 * Developed at SunPro, a Sun Microsystems, Inc. business. 7 * Permission to use, copy, modify, and distribute this 8 * software is freely granted, provided that this notice 9 * is preserved. 10 * ==================================================== 11 */ 12 13#ifndef lint |
14static char rcsid[] = "$FreeBSD: head/lib/msun/src/s_rint.c 21673 1997-01-14 07:20:47Z jkh $"; | 14static char rcsid[] = "$FreeBSD: head/lib/msun/src/s_rint.c 22808 1997-02-16 18:26:31Z bde $"; |
15#endif 16 17/* 18 * rint(x) 19 * Return x rounded to integral value according to the prevailing 20 * rounding mode. 21 * Method: 22 * Using floating addition. --- 17 unchanged lines hidden (view full) --- 40static long double 41#endif 42TWO52[2]={ 43 4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */ 44 -4.50359962737049600000e+15, /* 0xC3300000, 0x00000000 */ 45}; 46 47#ifdef __STDC__ | 15#endif 16 17/* 18 * rint(x) 19 * Return x rounded to integral value according to the prevailing 20 * rounding mode. 21 * Method: 22 * Using floating addition. --- 17 unchanged lines hidden (view full) --- 40static long double 41#endif 42TWO52[2]={ 43 4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */ 44 -4.50359962737049600000e+15, /* 0xC3300000, 0x00000000 */ 45}; 46 47#ifdef __STDC__ |
48 double rint(double x) | 48 double __generic_rint(double x) |
49#else | 49#else |
50 double rint(x) | 50 double __generic_rint(x) |
51 double x; 52#endif 53{ 54 int32_t i0,j0,sx; 55 u_int32_t i,i1; 56 double w,t; 57 EXTRACT_WORDS(i0,i1,x); 58 sx = (i0>>31)&1; --- 35 unchanged lines hidden --- | 51 double x; 52#endif 53{ 54 int32_t i0,j0,sx; 55 u_int32_t i,i1; 56 double w,t; 57 EXTRACT_WORDS(i0,i1,x); 58 sx = (i0>>31)&1; --- 35 unchanged lines hidden --- |