s_exp2.c (175460) | s_exp2.c (175468) |
---|---|
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_exp2.c 175460 2008-01-18 21:42:46Z das $"); | 28__FBSDID("$FreeBSD: head/lib/msun/src/s_exp2.c 175468 2008-01-18 22:19:04Z das $"); |
29 30#include <float.h> 31 32#include "math.h" 33#include "math_private.h" 34 35#define TBLBITS 8 36#define TBLSIZE (1 << TBLBITS) 37 38static const double 39 huge = 0x1p1000, | 29 30#include <float.h> 31 32#include "math.h" 33#include "math_private.h" 34 35#define TBLBITS 8 36#define TBLSIZE (1 << TBLBITS) 37 38static const double 39 huge = 0x1p1000, |
40 twom1000 = 0x1p-1000, | |
41 redux = 0x1.8p52 / TBLSIZE, 42 P1 = 0x1.62e42fefa39efp-1, 43 P2 = 0x1.ebfbdff82c575p-3, 44 P3 = 0x1.c6b08d704a0a6p-5, 45 P4 = 0x1.3b2ab88f70400p-7, 46 P5 = 0x1.5d88003875c74p-10; 47 | 40 redux = 0x1.8p52 / TBLSIZE, 41 P1 = 0x1.62e42fefa39efp-1, 42 P2 = 0x1.ebfbdff82c575p-3, 43 P3 = 0x1.c6b08d704a0a6p-5, 44 P4 = 0x1.3b2ab88f70400p-7, 45 P5 = 0x1.5d88003875c74p-10; 46 |
47static volatile double twom1000 = 0x1p-1000; 48 |
|
48static const double tbl[TBLSIZE * 2] = { 49/* exp2(z + eps) eps */ 50 0x1.6a09e667f3d5dp-1, 0x1.9880p-44, 51 0x1.6b052fa751744p-1, 0x1.8000p-50, 52 0x1.6c012750bd9fep-1, -0x1.8780p-45, 53 0x1.6cfdcddd476bfp-1, 0x1.ec00p-46, 54 0x1.6dfb23c651a29p-1, -0x1.8000p-50, 55 0x1.6ef9298593ae3p-1, -0x1.c000p-52, --- 340 unchanged lines hidden --- | 49static const double tbl[TBLSIZE * 2] = { 50/* exp2(z + eps) eps */ 51 0x1.6a09e667f3d5dp-1, 0x1.9880p-44, 52 0x1.6b052fa751744p-1, 0x1.8000p-50, 53 0x1.6c012750bd9fep-1, -0x1.8780p-45, 54 0x1.6cfdcddd476bfp-1, 0x1.ec00p-46, 55 0x1.6dfb23c651a29p-1, -0x1.8000p-50, 56 0x1.6ef9298593ae3p-1, -0x1.c000p-52, --- 340 unchanged lines hidden --- |