s_cos.c (38662c9698c40b6b5adf72db4c3c0c4f5d62f6a0) s_cos.c (e044d80d08bf0eca40f938c05dd34a951f4a0814)
1/* @(#)s_cos.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

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

58 int32_t n, ix;
59
60 /* High word of x. */
61 GET_HIGH_WORD(ix,x);
62
63 /* |x| ~< pi/4 */
64 ix &= 0x7fffffff;
65 if(ix <= 0x3fe921fb) {
1/* @(#)s_cos.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

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

58 int32_t n, ix;
59
60 /* High word of x. */
61 GET_HIGH_WORD(ix,x);
62
63 /* |x| ~< pi/4 */
64 ix &= 0x7fffffff;
65 if(ix <= 0x3fe921fb) {
66 if(ix<0x3e400000) /* if x < 2**-27 */
66 if(ix<0x3e46a09e) /* if x < 2**-27 * sqrt(2) */
67 if(((int)x)==0) return 1.0; /* generate inexact */
68 return __kernel_cos(x,z);
69 }
70
71 /* cos(Inf or NaN) is NaN */
72 else if (ix>=0x7ff00000) return x-x;
73
74 /* argument reduction needed */

--- 15 unchanged lines hidden ---
67 if(((int)x)==0) return 1.0; /* generate inexact */
68 return __kernel_cos(x,z);
69 }
70
71 /* cos(Inf or NaN) is NaN */
72 else if (ix>=0x7ff00000) return x-x;
73
74 /* argument reduction needed */

--- 15 unchanged lines hidden ---