e_rem_pio2l.h (176558) | e_rem_pio2l.h (176640) |
---|---|
1 2/* @(#)e_rem_pio2.c 1.4 95/01/18 */ 3/* 4 * ==================================================== 5 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 6 * 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 * Permission to use, copy, modify, and distribute this 9 * software is freely granted, provided that this notice 10 * is preserved. 11 * ==================================================== 12 * 13 * Optimized by Bruce D. Evans. 14 */ 15 16#include <sys/cdefs.h> | 1 2/* @(#)e_rem_pio2.c 1.4 95/01/18 */ 3/* 4 * ==================================================== 5 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 6 * 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 * Permission to use, copy, modify, and distribute this 9 * software is freely granted, provided that this notice 10 * is preserved. 11 * ==================================================== 12 * 13 * Optimized by Bruce D. Evans. 14 */ 15 16#include <sys/cdefs.h> |
17__FBSDID("$FreeBSD: head/lib/msun/src/e_rem_pio2.c 176558 2008-02-25 18:28:58Z bde $"); | 17__FBSDID("$FreeBSD: head/lib/msun/src/e_rem_pio2.c 176640 2008-02-28 16:22:36Z bde $"); |
18 19/* __ieee754_rem_pio2(x,y) 20 * 21 * return the remainder of x rem pi/2 in y[0]+y[1] 22 * use __kernel_rem_pio2() 23 */ 24 25#include <float.h> --- 95 unchanged lines hidden (view full) --- 121 } else { 122 z = x + 4*pio2_1; 123 y[0] = z + 4*pio2_1t; 124 y[1] = (z-y[0])+4*pio2_1t; 125 return -4; 126 } 127 } 128 } | 18 19/* __ieee754_rem_pio2(x,y) 20 * 21 * return the remainder of x rem pi/2 in y[0]+y[1] 22 * use __kernel_rem_pio2() 23 */ 24 25#include <float.h> --- 95 unchanged lines hidden (view full) --- 121 } else { 122 z = x + 4*pio2_1; 123 y[0] = z + 4*pio2_1t; 124 y[1] = (z-y[0])+4*pio2_1t; 125 return -4; 126 } 127 } 128 } |
129 if(ix<=0x413921fb) { /* |x| ~<= 2^19*(pi/2), medium size */ | 129 if(ix<0x413921fb) { /* |x| ~< 2^20*(pi/2), medium size */ |
130medium: 131 /* Use a specialized rint() to get fn. Assume round-to-nearest. */ 132 STRICT_ASSIGN(double,fn,x*invpio2+0x1.8p52); 133 fn = fn-0x1.8p52; 134#ifdef HAVE_EFFICIENT_IRINT 135 n = irint(fn); 136#else 137 n = (int32_t)fn; --- 51 unchanged lines hidden --- | 130medium: 131 /* Use a specialized rint() to get fn. Assume round-to-nearest. */ 132 STRICT_ASSIGN(double,fn,x*invpio2+0x1.8p52); 133 fn = fn-0x1.8p52; 134#ifdef HAVE_EFFICIENT_IRINT 135 n = irint(fn); 136#else 137 n = (int32_t)fn; --- 51 unchanged lines hidden --- |