1/*
2 * IBM Accurate Mathematical Library
3 * Written by International Business Machines Corp.
4 * Copyright (C) 2001-2018 Free Software Foundation, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 */
19
20/******************************************************************/
21/* */
22/* MODULE_NAME:ulog.h */
23/* */
24/* common data and variables prototype and definition */
25/******************************************************************/
26
27#ifndef ULOG_H
28#define ULOG_H
29
30#ifdef BIG_ENDI
31 static const number
32 /* polynomial I */
33/**/ a2 = {{0xbfe00000, 0x0001aa8f} }, /* -0.500... */
34/**/ a3 = {{0x3fd55555, 0x55588d2e} }, /* 0.333... */
35 /* polynomial II */
36/**/ b0 = {{0x3fd55555, 0x55555555} }, /* 0.333... */
37/**/ b1 = {{0xbfcfffff, 0xffffffbb} }, /* -0.249... */
38/**/ b2 = {{0x3fc99999, 0x9999992f} }, /* 0.199... */
39/**/ b3 = {{0xbfc55555, 0x556503fd} }, /* -0.166... */
40/**/ b4 = {{0x3fc24924, 0x925b3d62} }, /* 0.142... */
41/**/ b5 = {{0xbfbffffe, 0x160472fc} }, /* -0.124... */
42/**/ b6 = {{0x3fbc71c5, 0x25db58ac} }, /* 0.111... */
43/**/ b7 = {{0xbfb9a4ac, 0x11a2a61c} }, /* -0.100... */
44/**/ b8 = {{0x3fb75077, 0x0df2b591} }, /* 0.091... */
45 /* constants */
46/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc} }, /* sqrt(2) */
47/**/ h1 = {{0x3fd2e000, 0x00000000} }, /* 151/2**9 */
48/**/ h2 = {{0x3f669000, 0x00000000} }, /* 361/2**17 */
49/**/ delu = {{0x3f700000, 0x00000000} }, /* 1/2**8 */
50/**/ delv = {{0x3ef00000, 0x00000000} }, /* 1/2**16 */
51/**/ ln2a = {{0x3fe62e42, 0xfefa3800} }, /* ln(2) 43 bits */
52/**/ ln2b = {{0x3d2ef357, 0x93c76730} }, /* ln(2)-ln2a */
53/**/ two54 = {{0x43500000, 0x00000000} }, /* 2**54 */
54/**/ u03 = {{0x3f9eb851, 0xeb851eb8} }; /* 0.03 */
55
56#else
57#ifdef LITTLE_ENDI
58 static const number
59 /* polynomial I */
60/**/ a2 = {{0x0001aa8f, 0xbfe00000} }, /* -0.500... */
61/**/ a3 = {{0x55588d2e, 0x3fd55555} }, /* 0.333... */
62 /* polynomial II */
63/**/ b0 = {{0x55555555, 0x3fd55555} }, /* 0.333... */
64/**/ b1 = {{0xffffffbb, 0xbfcfffff} }, /* -0.249... */
65/**/ b2 = {{0x9999992f, 0x3fc99999} }, /* 0.199... */
66/**/ b3 = {{0x556503fd, 0xbfc55555} }, /* -0.166... */
67/**/ b4 = {{0x925b3d62, 0x3fc24924} }, /* 0.142... */
68/**/ b5 = {{0x160472fc, 0xbfbffffe} }, /* -0.124... */
69/**/ b6 = {{0x25db58ac, 0x3fbc71c5} }, /* 0.111... */
70/**/ b7 = {{0x11a2a61c, 0xbfb9a4ac} }, /* -0.100... */
71/**/ b8 = {{0x0df2b591, 0x3fb75077} }, /* 0.091... */
72 /* constants */
73/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e} }, /* sqrt(2) */
74/**/ h1 = {{0x00000000, 0x3fd2e000} }, /* 151/2**9 */
75/**/ h2 = {{0x00000000, 0x3f669000} }, /* 361/2**17 */
76/**/ delu = {{0x00000000, 0x3f700000} }, /* 1/2**8 */
77/**/ delv = {{0x00000000, 0x3ef00000} }, /* 1/2**16 */
78/**/ ln2a = {{0xfefa3800, 0x3fe62e42} }, /* ln(2) 43 bits */
79/**/ ln2b = {{0x93c76730, 0x3d2ef357} }, /* ln(2)-ln2a */
80/**/ two54 = {{0x00000000, 0x43500000} }, /* 2**54 */
81/**/ u03 = {{0xeb851eb8, 0x3f9eb851} }; /* 0.03 */
82
83#endif
84#endif
85
86#define SQRT_2 sqrt_2.d
87#define DEL_U delu.d
88#define DEL_V delv.d
89#define LN2A ln2a.d
90#define LN2B ln2b.d
91#define U03 u03.d
92
93#endif
94