Deleted Added
full compact
k_tanf.c (151961) k_tanf.c (151963)
1/* k_tanf.c -- float version of k_tan.c
2 * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
3 */
4
5/*
6 * ====================================================
7 * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
8 *
9 * Permission to use, copy, modify, and distribute this
10 * software is freely granted, provided that this notice
11 * is preserved.
12 * ====================================================
13 */
14
15#ifndef lint
1/* k_tanf.c -- float version of k_tan.c
2 * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
3 */
4
5/*
6 * ====================================================
7 * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
8 *
9 * Permission to use, copy, modify, and distribute this
10 * software is freely granted, provided that this notice
11 * is preserved.
12 * ====================================================
13 */
14
15#ifndef lint
16static char rcsid[] = "$FreeBSD: head/lib/msun/src/k_tanf.c 151961 2005-11-02 05:37:31Z bde $";
16static char rcsid[] = "$FreeBSD: head/lib/msun/src/k_tanf.c 151963 2005-11-02 06:45:21Z bde $";
17#endif
18
19#include "math.h"
20#include "math_private.h"
21static const float
22one = 1.0000000000e+00, /* 0x3f800000 */
23pio4 = 7.8539812565e-01, /* 0x3f490fda */
24pio4lo= 3.7748947079e-08, /* 0x33222168 */

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

42__kernel_tanf(float x, float y, int iy)
43{
44 float z,r,v,w,s;
45 int32_t ix,hx;
46 GET_FLOAT_WORD(hx,x);
47 ix = hx&0x7fffffff; /* high word of |x| */
48 if(ix<0x31800000) { /* x < 2**-28 */
49 if ((int) x == 0) { /* generate inexact */
17#endif
18
19#include "math.h"
20#include "math_private.h"
21static const float
22one = 1.0000000000e+00, /* 0x3f800000 */
23pio4 = 7.8539812565e-01, /* 0x3f490fda */
24pio4lo= 3.7748947079e-08, /* 0x33222168 */

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

42__kernel_tanf(float x, float y, int iy)
43{
44 float z,r,v,w,s;
45 int32_t ix,hx;
46 GET_FLOAT_WORD(hx,x);
47 ix = hx&0x7fffffff; /* high word of |x| */
48 if(ix<0x31800000) { /* x < 2**-28 */
49 if ((int) x == 0) { /* generate inexact */
50 if ((ix | (iy + 1)) == 0)
51 return one / fabsf(x);
52 else {
50 {
53 if (iy == 1)
54 return x;
55 else { /* compute -1 / (x+y) carefully */
56 float a, t;
57
58 z = w = x + y;
59 GET_FLOAT_WORD(ix, z);
60 SET_FLOAT_WORD(z, ix & 0xfffff000);

--- 49 unchanged lines hidden ---
51 if (iy == 1)
52 return x;
53 else { /* compute -1 / (x+y) carefully */
54 float a, t;
55
56 z = w = x + y;
57 GET_FLOAT_WORD(ix, z);
58 SET_FLOAT_WORD(z, ix & 0xfffff000);

--- 49 unchanged lines hidden ---