Deleted Added
full compact
s_exp2f.c (176231) s_exp2f.c (176450)
1/*-
2 * Copyright (c) 2005 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

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2005 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

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/lib/msun/src/s_exp2f.c 176231 2008-02-13 10:44:44Z bde $");
28__FBSDID("$FreeBSD: head/lib/msun/src/s_exp2f.c 176450 2008-02-22 02:27:34Z das $");
29
30#include <float.h>
31
32#include "math.h"
33#include "math_private.h"
34
35#define TBLBITS 4
36#define TBLSIZE (1 << TBLBITS)

--- 53 unchanged lines hidden (view full) ---

90 * Tang, P. Table-driven Implementation of the Exponential Function
91 * in IEEE Floating-Point Arithmetic. TOMS 15(2), 144-157 (1989).
92 */
93float
94exp2f(float x)
95{
96 double tv, twopk, u, z;
97 float t;
29
30#include <float.h>
31
32#include "math.h"
33#include "math_private.h"
34
35#define TBLBITS 4
36#define TBLSIZE (1 << TBLBITS)

--- 53 unchanged lines hidden (view full) ---

90 * Tang, P. Table-driven Implementation of the Exponential Function
91 * in IEEE Floating-Point Arithmetic. TOMS 15(2), 144-157 (1989).
92 */
93float
94exp2f(float x)
95{
96 double tv, twopk, u, z;
97 float t;
98 uint32_t hx, htv, ix, i0;
98 uint32_t hx, ix, i0;
99 int32_t k;
100
101 /* Filter out exceptional cases. */
102 GET_FLOAT_WORD(hx, x);
103 ix = hx & 0x7fffffff; /* high word of |x| */
104 if(ix >= 0x43000000) { /* |x| >= 128 */
105 if(ix >= 0x7f800000) {
106 if ((ix & 0x7fffff) != 0 || (hx & 0x80000000) == 0)

--- 30 unchanged lines hidden ---
99 int32_t k;
100
101 /* Filter out exceptional cases. */
102 GET_FLOAT_WORD(hx, x);
103 ix = hx & 0x7fffffff; /* high word of |x| */
104 if(ix >= 0x43000000) { /* |x| >= 128 */
105 if(ix >= 0x7f800000) {
106 if ((ix & 0x7fffff) != 0 || (hx & 0x80000000) == 0)

--- 30 unchanged lines hidden ---