e_asin.c (21673) | e_asin.c (22808) |
---|---|
1/* @(#)e_asin.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_asin.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_asin.c 21673 1997-01-14 07:20:47Z jkh $"; | 14static char rcsid[] = "$FreeBSD: head/lib/msun/src/e_asin.c 22808 1997-02-16 18:26:31Z bde $"; |
15#endif 16 17/* __ieee754_asin(x) 18 * Method : 19 * Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ... 20 * we approximate asin(x) on [0,0.5] by 21 * asin(x) = x + x*x^2*R(x^2) 22 * where --- 43 unchanged lines hidden (view full) --- 66pS4 = 7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */ 67pS5 = 3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */ 68qS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */ 69qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */ 70qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ 71qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ 72 73#ifdef __STDC__ | 15#endif 16 17/* __ieee754_asin(x) 18 * Method : 19 * Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ... 20 * we approximate asin(x) on [0,0.5] by 21 * asin(x) = x + x*x^2*R(x^2) 22 * where --- 43 unchanged lines hidden (view full) --- 66pS4 = 7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */ 67pS5 = 3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */ 68qS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */ 69qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */ 70qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ 71qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ 72 73#ifdef __STDC__ |
74 double __ieee754_asin(double x) | 74 double __generic___ieee754_asin(double x) |
75#else | 75#else |
76 double __ieee754_asin(x) | 76 double __generic___ieee754_asin(x) |
77 double x; 78#endif 79{ 80 double t=0.0,w,p,q,c,r,s; 81 int32_t hx,ix; 82 GET_HIGH_WORD(hx,x); 83 ix = hx&0x7fffffff; 84 if(ix>= 0x3ff00000) { /* |x|>= 1 */ --- 36 unchanged lines hidden --- | 77 double x; 78#endif 79{ 80 double t=0.0,w,p,q,c,r,s; 81 int32_t hx,ix; 82 GET_HIGH_WORD(hx,x); 83 ix = hx&0x7fffffff; 84 if(ix>= 0x3ff00000) { /* |x|>= 1 */ --- 36 unchanged lines hidden --- |