e_remainder.c (21673) | e_remainder.c (22808) |
---|---|
1/* @(#)e_remainder.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/* @(#)e_remainder.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/e_remainder.c 21673 1997-01-14 07:20:47Z jkh $"; | 14static char rcsid[] = "$FreeBSD: head/lib/msun/src/e_remainder.c 22808 1997-02-16 18:26:31Z bde $"; |
15#endif 16 17/* __ieee754_remainder(x,p) 18 * Return : 19 * returns x REM p = x - [x/p]*p as if in infinite 20 * precise arithmetic, where [x/p] is the (infinite bit) 21 * integer nearest x/p (in half way case choose the even one). 22 * Method : --- 6 unchanged lines hidden (view full) --- 29#ifdef __STDC__ 30static const double zero = 0.0; 31#else 32static double zero = 0.0; 33#endif 34 35 36#ifdef __STDC__ | 15#endif 16 17/* __ieee754_remainder(x,p) 18 * Return : 19 * returns x REM p = x - [x/p]*p as if in infinite 20 * precise arithmetic, where [x/p] is the (infinite bit) 21 * integer nearest x/p (in half way case choose the even one). 22 * Method : --- 6 unchanged lines hidden (view full) --- 29#ifdef __STDC__ 30static const double zero = 0.0; 31#else 32static double zero = 0.0; 33#endif 34 35 36#ifdef __STDC__ |
37 double __ieee754_remainder(double x, double p) | 37 double __generic___ieee754_remainder(double x, double p) |
38#else | 38#else |
39 double __ieee754_remainder(x,p) | 39 double __generic___ieee754_remainder(x,p) |
40 double x,p; 41#endif 42{ 43 int32_t hx,hp; 44 u_int32_t sx,lx,lp; 45 double p_half; 46 47 EXTRACT_WORDS(hx,lx,x); --- 33 unchanged lines hidden --- | 40 double x,p; 41#endif 42{ 43 int32_t hx,hp; 44 u_int32_t sx,lx,lp; 45 double p_half; 46 47 EXTRACT_WORDS(hx,lx,x); --- 33 unchanged lines hidden --- |