invtrig.h (181074) | invtrig.h (181152) |
---|---|
1/*- 2 * Copyright (c) 2008 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * | 1/*- 2 * Copyright (c) 2008 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * $FreeBSD: head/lib/msun/ld80/invtrig.h 181074 2008-07-31 22:41:26Z das $ | 26 * $FreeBSD: head/lib/msun/ld80/invtrig.h 181152 2008-08-02 03:56:22Z das $ |
27 */ 28 29#include <float.h> 30 31#include "fpmath.h" 32 33#define BIAS (LDBL_MAX_EXP - 1) 34#define MANH_SIZE LDBL_MANH_SIZE --- 24 unchanged lines hidden (view full) --- 59#define atanlo _ItL_atanlo 60#define aT _ItL_aT 61#define pi_lo _ItL_pi_lo 62 63#define pio2_hi atanhi[3] 64#define pio2_lo atanlo[3] 65#define pio4_hi atanhi[1] 66 | 27 */ 28 29#include <float.h> 30 31#include "fpmath.h" 32 33#define BIAS (LDBL_MAX_EXP - 1) 34#define MANH_SIZE LDBL_MANH_SIZE --- 24 unchanged lines hidden (view full) --- 59#define atanlo _ItL_atanlo 60#define aT _ItL_aT 61#define pi_lo _ItL_pi_lo 62 63#define pio2_hi atanhi[3] 64#define pio2_lo atanlo[3] 65#define pio4_hi atanhi[1] 66 |
67extern const long double pS0, pS1, pS2, pS3, pS4, pS5, pS6; 68extern const long double qS1, qS2, qS3, qS4, qS5; 69extern const long double atanhi[], atanlo[], aT[]; 70extern const long double pi_lo; | 67#ifdef STRUCT_DECLS 68typedef struct longdouble { 69 uint64_t mant; 70 uint16_t expsign; 71} LONGDOUBLE; 72#else 73typedef long double LONGDOUBLE; 74#endif |
71 | 75 |
76extern const LONGDOUBLE pS0, pS1, pS2, pS3, pS4, pS5, pS6; 77extern const LONGDOUBLE qS1, qS2, qS3, qS4, qS5; 78extern const LONGDOUBLE atanhi[], atanlo[], aT[]; 79extern const LONGDOUBLE pi_lo; 80 81#ifndef STRUCT_DECLS 82 |
|
72static inline long double 73P(long double x) 74{ 75 76 return (x * (pS0 + x * (pS1 + x * (pS2 + x * (pS3 + x * \ 77 (pS4 + x * (pS5 + x * pS6))))))); 78} 79 --- 14 unchanged lines hidden (view full) --- 94 95static inline long double 96T_odd(long double x) 97{ 98 99 return (aT[1] + x * (aT[3] + x * (aT[5] + x * (aT[7] + x * \ 100 (aT[9] + x * aT[11]))))); 101} | 83static inline long double 84P(long double x) 85{ 86 87 return (x * (pS0 + x * (pS1 + x * (pS2 + x * (pS3 + x * \ 88 (pS4 + x * (pS5 + x * pS6))))))); 89} 90 --- 14 unchanged lines hidden (view full) --- 105 106static inline long double 107T_odd(long double x) 108{ 109 110 return (aT[1] + x * (aT[3] + x * (aT[5] + x * (aT[7] + x * \ 111 (aT[9] + x * aT[11]))))); 112} |
113 114#endif |
|