Fix warnings.

This commit is contained in:
Ulrich Drepper 2001-03-12 07:57:09 +00:00
parent 445028e348
commit 50944bca4b
48 changed files with 17351 additions and 17211 deletions

View File

@ -3,7 +3,7 @@
/***************************************************************************/
#ifdef BIG_ENDI
static const union {int4 i[5136];double x[2568];} asncs = {
static const union {int4 i[5136];double x[2568];} asncs = { .i = {
/**/ 0x3FC04000, 0x00000000,
/**/ 0x3FF02169, 0x88994424,
/**/ 0x3FB0A6A2, 0xB799B115,
@ -2571,11 +2571,11 @@ static const union {int4 i[5136];double x[2568];} asncs = {
/**/ 0x3C935690, 0xE395EEA6,
/**/ 0x3FF4FF86, 0x2E5965A2,
/**/ 0x400F4000, 0x00000000,
/**/ 0x3F7C6B82, 0xD36A5E70 };
/**/ 0x3F7C6B82, 0xD36A5E70 } };
#else
#ifdef LITTLE_ENDI
static const union {int4 i[5136];double x[2568];} asncs = {
static const union {int4 i[5136];double x[2568];} asncs = { .i = {
/**/ 0x00000000, 0x3FC04000,
/**/ 0x88994424, 0x3FF02169,
/**/ 0xB799B115, 0x3FB0A6A2,
@ -5143,7 +5143,7 @@ static const union {int4 i[5136];double x[2568];} asncs = {
/**/ 0xE395EEA6, 0x3C935690,
/**/ 0x2E5965A2, 0x3FF4FF86,
/**/ 0x00000000, 0x400F4000,
/**/ 0xD36A5E70, 0x3F7C6B82 };
/**/ 0xD36A5E70, 0x3F7C6B82 } };
#endif
#endif

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: atnat.h */
@ -31,109 +31,109 @@
#ifdef BIG_ENDI
static const number
/* polynomial I */
/**/ d3 = {0xbfd55555, 0x55555555, }, /* -0.333... */
/**/ d5 = {0x3fc99999, 0x999997fd, }, /* 0.199... */
/**/ d7 = {0xbfc24924, 0x923f7603, }, /* -0.142... */
/**/ d9 = {0x3fbc71c6, 0xe5129a3b, }, /* 0.111... */
/**/ d11 = {0xbfb74580, 0x22b13c25, }, /* -0.090... */
/**/ d13 = {0x3fb375f0, 0x8b31cbce, }, /* 0.076... */
/**/ d3 = {{0xbfd55555, 0x55555555} }, /* -0.333... */
/**/ d5 = {{0x3fc99999, 0x999997fd} }, /* 0.199... */
/**/ d7 = {{0xbfc24924, 0x923f7603} }, /* -0.142... */
/**/ d9 = {{0x3fbc71c6, 0xe5129a3b} }, /* 0.111... */
/**/ d11 = {{0xbfb74580, 0x22b13c25} }, /* -0.090... */
/**/ d13 = {{0x3fb375f0, 0x8b31cbce} }, /* 0.076... */
/* polynomial II */
/**/ f3 = {0xbfd55555, 0x55555555, }, /* -1/3 */
/**/ ff3 = {0xbc755555, 0x55555555, }, /* -1/3-f3 */
/**/ f5 = {0x3fc99999, 0x9999999a, }, /* 1/5 */
/**/ ff5 = {0xbc699999, 0x9999999a, }, /* 1/5-f5 */
/**/ f7 = {0xbfc24924, 0x92492492, }, /* -1/7 */
/**/ ff7 = {0xbc624924, 0x92492492, }, /* -1/7-f7 */
/**/ f9 = {0x3fbc71c7, 0x1c71c71c, }, /* 1/9 */
/**/ ff9 = {0x3c5c71c7, 0x1c71c71c, }, /* 1/9-f9 */
/**/ f11 = {0xbfb745d1, 0x745d1746, }, /* -1/11 */
/**/ f13 = {0x3fb3b13b, 0x13b13b14, }, /* 1/13 */
/**/ f15 = {0xbfb11111, 0x11111111, }, /* -1/15 */
/**/ f17 = {0x3fae1e1e, 0x1e1e1e1e, }, /* 1/17 */
/**/ f19 = {0xbfaaf286, 0xbca1af28, }, /* -1/19 */
/**/ f3 = {{0xbfd55555, 0x55555555} }, /* -1/3 */
/**/ ff3 = {{0xbc755555, 0x55555555} }, /* -1/3-f3 */
/**/ f5 = {{0x3fc99999, 0x9999999a} }, /* 1/5 */
/**/ ff5 = {{0xbc699999, 0x9999999a} }, /* 1/5-f5 */
/**/ f7 = {{0xbfc24924, 0x92492492} }, /* -1/7 */
/**/ ff7 = {{0xbc624924, 0x92492492} }, /* -1/7-f7 */
/**/ f9 = {{0x3fbc71c7, 0x1c71c71c} }, /* 1/9 */
/**/ ff9 = {{0x3c5c71c7, 0x1c71c71c} }, /* 1/9-f9 */
/**/ f11 = {{0xbfb745d1, 0x745d1746} }, /* -1/11 */
/**/ f13 = {{0x3fb3b13b, 0x13b13b14} }, /* 1/13 */
/**/ f15 = {{0xbfb11111, 0x11111111} }, /* -1/15 */
/**/ f17 = {{0x3fae1e1e, 0x1e1e1e1e} }, /* 1/17 */
/**/ f19 = {{0xbfaaf286, 0xbca1af28} }, /* -1/19 */
/* constants */
/**/ zero = {0x00000000, 0x00000000, }, /* 0 */
/**/ one = {0x3ff00000, 0x00000000, }, /* 1 */
/**/ a = {0x3e4bb67a, 0x00000000, }, /* 1.290e-8 */
/**/ b = {0x3fb00000, 0x00000000, }, /* 1/16 */
/**/ c = {0x3ff00000, 0x00000000, }, /* 1 */
/**/ d = {0x40300000, 0x00000000, }, /* 16 */
/**/ e = {0x43349ff2, 0x00000000, }, /* 5.805e15 */
/**/ hpi = {0x3ff921fb, 0x54442d18, }, /* pi/2 */
/**/ mhpi = {0xbff921fb, 0x54442d18, }, /* -pi/2 */
/**/ hpi1 = {0x3c91a626, 0x33145c07, }, /* pi/2-hpi */
/**/ u1 = {0x3c2d3382, 0x00000000, }, /* 7.915e-19 */
/**/ u21 = {0x3c6dffc0, 0x00000000, }, /* 1.301e-17 */
/**/ u22 = {0x3c527bd0, 0x00000000, }, /* 4.008e-18 */
/**/ u23 = {0x3c3cd057, 0x00000000, }, /* 1.562e-18 */
/**/ u24 = {0x3c329cdf, 0x00000000, }, /* 1.009e-18 */
/**/ u31 = {0x3c3a1edf, 0x00000000, }, /* 1.416e-18 */
/**/ u32 = {0x3c33f0e1, 0x00000000, }, /* 1.081e-18 */
/**/ u4 = {0x3bf955e4, 0x00000000, }, /* 8.584e-20 */
/**/ u5 = {0x3aaef2d1, 0x00000000, }, /* 5e-26 */
/**/ u6 = {0x3a98c56d, 0x00000000, }, /* 2.001e-26 */
/**/ u7 = {0x3a9375de, 0x00000000, }, /* 1.572e-26 */
/**/ u8 = {0x3a6eeb36, 0x00000000, }, /* 3.122e-27 */
/**/ u9[M] ={{0x38c1aa5b, 0x00000000, }, /* 2.658e-35 */
/**/ {0x35c1aa4d, 0x00000000, }, /* 9.443e-50 */
/**/ {0x32c1aa88, 0x00000000, }, /* 3.355e-64 */
/**/ {0x11c1aa56, 0x00000000, }},/* 3.818e-223 */
/**/ two8 = {0x40700000, 0x00000000, }, /* 2**8=256 */
/**/ two52 = {0x43300000, 0x00000000, }; /* 2**52 */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ a = {{0x3e4bb67a, 0x00000000} }, /* 1.290e-8 */
/**/ b = {{0x3fb00000, 0x00000000} }, /* 1/16 */
/**/ c = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ d = {{0x40300000, 0x00000000} }, /* 16 */
/**/ e = {{0x43349ff2, 0x00000000} }, /* 5.805e15 */
/**/ hpi = {{0x3ff921fb, 0x54442d18} }, /* pi/2 */
/**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */
/**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */
/**/ u1 = {{0x3c2d3382, 0x00000000} }, /* 7.915e-19 */
/**/ u21 = {{0x3c6dffc0, 0x00000000} }, /* 1.301e-17 */
/**/ u22 = {{0x3c527bd0, 0x00000000} }, /* 4.008e-18 */
/**/ u23 = {{0x3c3cd057, 0x00000000} }, /* 1.562e-18 */
/**/ u24 = {{0x3c329cdf, 0x00000000} }, /* 1.009e-18 */
/**/ u31 = {{0x3c3a1edf, 0x00000000} }, /* 1.416e-18 */
/**/ u32 = {{0x3c33f0e1, 0x00000000} }, /* 1.081e-18 */
/**/ u4 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */
/**/ u5 = {{0x3aaef2d1, 0x00000000} }, /* 5e-26 */
/**/ u6 = {{0x3a98c56d, 0x00000000} }, /* 2.001e-26 */
/**/ u7 = {{0x3a9375de, 0x00000000} }, /* 1.572e-26 */
/**/ u8 = {{0x3a6eeb36, 0x00000000} }, /* 3.122e-27 */
/**/ u9[M] ={{{0x38c1aa5b, 0x00000000} }, /* 2.658e-35 */
/**/ {{0x35c1aa4d, 0x00000000} }, /* 9.443e-50 */
/**/ {{0x32c1aa88, 0x00000000} }, /* 3.355e-64 */
/**/ {{0x11c1aa56, 0x00000000} }},/* 3.818e-223 */
/**/ two8 = {{0x40700000, 0x00000000} }, /* 2**8=256 */
/**/ two52 = {{0x43300000, 0x00000000} }; /* 2**52 */
#else
#ifdef LITTLE_ENDI
static const number
/* polynomial I */
/**/ d3 = {0x55555555, 0xbfd55555, }, /* -0.333... */
/**/ d5 = {0x999997fd, 0x3fc99999, }, /* 0.199... */
/**/ d7 = {0x923f7603, 0xbfc24924, }, /* -0.142... */
/**/ d9 = {0xe5129a3b, 0x3fbc71c6, }, /* 0.111... */
/**/ d11 = {0x22b13c25, 0xbfb74580, }, /* -0.090... */
/**/ d13 = {0x8b31cbce, 0x3fb375f0, }, /* 0.076... */
/**/ d3 = {{0x55555555, 0xbfd55555} }, /* -0.333... */
/**/ d5 = {{0x999997fd, 0x3fc99999} }, /* 0.199... */
/**/ d7 = {{0x923f7603, 0xbfc24924} }, /* -0.142... */
/**/ d9 = {{0xe5129a3b, 0x3fbc71c6} }, /* 0.111... */
/**/ d11 = {{0x22b13c25, 0xbfb74580} }, /* -0.090... */
/**/ d13 = {{0x8b31cbce, 0x3fb375f0} }, /* 0.076... */
/* polynomial II */
/**/ f3 = {0x55555555, 0xbfd55555, }, /* -1/3 */
/**/ ff3 = {0x55555555, 0xbc755555, }, /* -1/3-f3 */
/**/ f5 = {0x9999999a, 0x3fc99999, }, /* 1/5 */
/**/ ff5 = {0x9999999a, 0xbc699999, }, /* 1/5-f5 */
/**/ f7 = {0x92492492, 0xbfc24924, }, /* -1/7 */
/**/ ff7 = {0x92492492, 0xbc624924, }, /* -1/7-f7 */
/**/ f9 = {0x1c71c71c, 0x3fbc71c7, }, /* 1/9 */
/**/ ff9 = {0x1c71c71c, 0x3c5c71c7, }, /* 1/9-f9 */
/**/ f11 = {0x745d1746, 0xbfb745d1, }, /* -1/11 */
/**/ f13 = {0x13b13b14, 0x3fb3b13b, }, /* 1/13 */
/**/ f15 = {0x11111111, 0xbfb11111, }, /* -1/15 */
/**/ f17 = {0x1e1e1e1e, 0x3fae1e1e, }, /* 1/17 */
/**/ f19 = {0xbca1af28, 0xbfaaf286, }, /* -1/19 */
/**/ f3 = {{0x55555555, 0xbfd55555} }, /* -1/3 */
/**/ ff3 = {{0x55555555, 0xbc755555} }, /* -1/3-f3 */
/**/ f5 = {{0x9999999a, 0x3fc99999} }, /* 1/5 */
/**/ ff5 = {{0x9999999a, 0xbc699999} }, /* 1/5-f5 */
/**/ f7 = {{0x92492492, 0xbfc24924} }, /* -1/7 */
/**/ ff7 = {{0x92492492, 0xbc624924} }, /* -1/7-f7 */
/**/ f9 = {{0x1c71c71c, 0x3fbc71c7} }, /* 1/9 */
/**/ ff9 = {{0x1c71c71c, 0x3c5c71c7} }, /* 1/9-f9 */
/**/ f11 = {{0x745d1746, 0xbfb745d1} }, /* -1/11 */
/**/ f13 = {{0x13b13b14, 0x3fb3b13b} }, /* 1/13 */
/**/ f15 = {{0x11111111, 0xbfb11111} }, /* -1/15 */
/**/ f17 = {{0x1e1e1e1e, 0x3fae1e1e} }, /* 1/17 */
/**/ f19 = {{0xbca1af28, 0xbfaaf286} }, /* -1/19 */
/* constants */
/**/ zero = {0x00000000, 0x00000000, }, /* 0 */
/**/ one = {0x00000000, 0x3ff00000, }, /* 1 */
/**/ a = {0x00000000, 0x3e4bb67a, }, /* 1.290e-8 */
/**/ b = {0x00000000, 0x3fb00000, }, /* 1/16 */
/**/ c = {0x00000000, 0x3ff00000, }, /* 1 */
/**/ d = {0x00000000, 0x40300000, }, /* 16 */
/**/ e = {0x00000000, 0x43349ff2, }, /* 5.805e15 */
/**/ hpi = {0x54442d18, 0x3ff921fb, }, /* pi/2 */
/**/ mhpi = {0x54442d18, 0xbff921fb, }, /* -pi/2 */
/**/ hpi1 = {0x33145c07, 0x3c91a626, }, /* pi/2-hpi */
/**/ u1 = {0x00000000, 0x3c2d3382, }, /* 7.915e-19 */
/**/ u21 = {0x00000000, 0x3c6dffc0, }, /* 1.301e-17 */
/**/ u22 = {0x00000000, 0x3c527bd0, }, /* 4.008e-18 */
/**/ u23 = {0x00000000, 0x3c3cd057, }, /* 1.562e-18 */
/**/ u24 = {0x00000000, 0x3c329cdf, }, /* 1.009e-18 */
/**/ u31 = {0x00000000, 0x3c3a1edf, }, /* 1.416e-18 */
/**/ u32 = {0x00000000, 0x3c33f0e1, }, /* 1.081e-18 */
/**/ u4 = {0x00000000, 0x3bf955e4, }, /* 8.584e-20 */
/**/ u5 = {0x00000000, 0x3aaef2d1, }, /* 5e-26 */
/**/ u6 = {0x00000000, 0x3a98c56d, }, /* 2.001e-26 */
/**/ u7 = {0x00000000, 0x3a9375de, }, /* 1.572e-26 */
/**/ u8 = {0x00000000, 0x3a6eeb36, }, /* 3.122e-27 */
/**/ u9[M] ={{0x00000000, 0x38c1aa5b, }, /* 2.658e-35 */
/**/ {0x00000000, 0x35c1aa4d, }, /* 9.443e-50 */
/**/ {0x00000000, 0x32c1aa88, }, /* 3.355e-64 */
/**/ {0x00000000, 0x11c1aa56, }},/* 3.818e-223 */
/**/ two8 = {0x00000000, 0x40700000, }, /* 2**8=256 */
/**/ two52 = {0x00000000, 0x43300000, }; /* 2**52 */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ a = {{0x00000000, 0x3e4bb67a} }, /* 1.290e-8 */
/**/ b = {{0x00000000, 0x3fb00000} }, /* 1/16 */
/**/ c = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ d = {{0x00000000, 0x40300000} }, /* 16 */
/**/ e = {{0x00000000, 0x43349ff2} }, /* 5.805e15 */
/**/ hpi = {{0x54442d18, 0x3ff921fb} }, /* pi/2 */
/**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */
/**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */
/**/ u1 = {{0x00000000, 0x3c2d3382} }, /* 7.915e-19 */
/**/ u21 = {{0x00000000, 0x3c6dffc0} }, /* 1.301e-17 */
/**/ u22 = {{0x00000000, 0x3c527bd0} }, /* 4.008e-18 */
/**/ u23 = {{0x00000000, 0x3c3cd057} }, /* 1.562e-18 */
/**/ u24 = {{0x00000000, 0x3c329cdf} }, /* 1.009e-18 */
/**/ u31 = {{0x00000000, 0x3c3a1edf} }, /* 1.416e-18 */
/**/ u32 = {{0x00000000, 0x3c33f0e1} }, /* 1.081e-18 */
/**/ u4 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */
/**/ u5 = {{0x00000000, 0x3aaef2d1} }, /* 5e-26 */
/**/ u6 = {{0x00000000, 0x3a98c56d} }, /* 2.001e-26 */
/**/ u7 = {{0x00000000, 0x3a9375de} }, /* 1.572e-26 */
/**/ u8 = {{0x00000000, 0x3a6eeb36} }, /* 3.122e-27 */
/**/ u9[M] ={{{0x00000000, 0x38c1aa5b} }, /* 2.658e-35 */
/**/ {{0x00000000, 0x35c1aa4d} }, /* 9.443e-50 */
/**/ {{0x00000000, 0x32c1aa88} }, /* 3.355e-64 */
/**/ {{0x00000000, 0x11c1aa56} }},/* 3.818e-223 */
/**/ two8 = {{0x00000000, 0x40700000} }, /* 2**8=256 */
/**/ two52 = {{0x00000000, 0x43300000} }; /* 2**52 */
#endif
#endif

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: atnat2.h */
@ -35,140 +35,140 @@
static const number
/* polynomial I */
/**/ d3 = {0xbfd55555, 0x55555555, }, /* -0.333... */
/**/ d5 = {0x3fc99999, 0x999997fd, }, /* 0.199... */
/**/ d7 = {0xbfc24924, 0x923f7603, }, /* -0.142... */
/**/ d9 = {0x3fbc71c6, 0xe5129a3b, }, /* 0.111... */
/**/ d11 = {0xbfb74580, 0x22b13c25, }, /* -0.090... */
/**/ d13 = {0x3fb375f0, 0x8b31cbce, }, /* 0.076... */
/**/ d3 = {{0xbfd55555, 0x55555555} }, /* -0.333... */
/**/ d5 = {{0x3fc99999, 0x999997fd} }, /* 0.199... */
/**/ d7 = {{0xbfc24924, 0x923f7603} }, /* -0.142... */
/**/ d9 = {{0x3fbc71c6, 0xe5129a3b} }, /* 0.111... */
/**/ d11 = {{0xbfb74580, 0x22b13c25} }, /* -0.090... */
/**/ d13 = {{0x3fb375f0, 0x8b31cbce} }, /* 0.076... */
/* polynomial II */
/**/ f3 = {0xbfd55555, 0x55555555, }, /* -1/3 */
/**/ ff3 = {0xbc755555, 0x55555555, }, /* -1/3-f3 */
/**/ f5 = {0x3fc99999, 0x9999999a, }, /* 1/5 */
/**/ ff5 = {0xbc699999, 0x9999999a, }, /* 1/5-f5 */
/**/ f7 = {0xbfc24924, 0x92492492, }, /* -1/7 */
/**/ ff7 = {0xbc624924, 0x92492492, }, /* -1/7-f7 */
/**/ f9 = {0x3fbc71c7, 0x1c71c71c, }, /* 1/9 */
/**/ ff9 = {0x3c5c71c7, 0x1c71c71c, }, /* 1/9-f9 */
/**/ f11 = {0xbfb745d1, 0x745d1746, }, /* -1/11 */
/**/ f13 = {0x3fb3b13b, 0x13b13b14, }, /* 1/13 */
/**/ f15 = {0xbfb11111, 0x11111111, }, /* -1/15 */
/**/ f17 = {0x3fae1e1e, 0x1e1e1e1e, }, /* 1/17 */
/**/ f19 = {0xbfaaf286, 0xbca1af28, }, /* -1/19 */
/**/ f3 = {{0xbfd55555, 0x55555555} }, /* -1/3 */
/**/ ff3 = {{0xbc755555, 0x55555555} }, /* -1/3-f3 */
/**/ f5 = {{0x3fc99999, 0x9999999a} }, /* 1/5 */
/**/ ff5 = {{0xbc699999, 0x9999999a} }, /* 1/5-f5 */
/**/ f7 = {{0xbfc24924, 0x92492492} }, /* -1/7 */
/**/ ff7 = {{0xbc624924, 0x92492492} }, /* -1/7-f7 */
/**/ f9 = {{0x3fbc71c7, 0x1c71c71c} }, /* 1/9 */
/**/ ff9 = {{0x3c5c71c7, 0x1c71c71c} }, /* 1/9-f9 */
/**/ f11 = {{0xbfb745d1, 0x745d1746} }, /* -1/11 */
/**/ f13 = {{0x3fb3b13b, 0x13b13b14} }, /* 1/13 */
/**/ f15 = {{0xbfb11111, 0x11111111} }, /* -1/15 */
/**/ f17 = {{0x3fae1e1e, 0x1e1e1e1e} }, /* 1/17 */
/**/ f19 = {{0xbfaaf286, 0xbca1af28} }, /* -1/19 */
/* constants */
/**/ zero = {0x00000000, 0x00000000, }, /* 0 */
/**/ mzero = {0x80000000, 0x00000000, }, /* -0 */
/**/ one = {0x3ff00000, 0x00000000, }, /* 1 */
/**/ inv16 = {0x3fb00000, 0x00000000, }, /* 1/16 */
/**/ opi = {0x400921fb, 0x54442d18, }, /* pi */
/**/ opi1 = {0x3ca1a626, 0x33145c07, }, /* pi-opi */
/**/ mopi = {0xc00921fb, 0x54442d18, }, /* -pi */
/**/ hpi = {0x3ff921fb, 0x54442d18, }, /* pi/2 */
/**/ hpi1 = {0x3c91a626, 0x33145c07, }, /* pi/2-hpi */
/**/ mhpi = {0xbff921fb, 0x54442d18, }, /* -pi/2 */
/**/ qpi = {0x3fe921fb, 0x54442d18, }, /* pi/4 */
/**/ qpi1 = {0x3c81a626, 0x33145c07, }, /* pi/4-qpi */
/**/ mqpi = {0xbfe921fb, 0x54442d18, }, /* -pi/4 */
/**/ tqpi = {0x4002d97c, 0x7f3321d2, }, /* 3pi/4 */
/**/ tqpi1 = {0x3c9a7939, 0x4c9e8a0a, }, /* 3pi/4-tqpi */
/**/ mtqpi = {0xc002d97c, 0x7f3321d2, }, /* -3pi/4 */
/**/ u1 = {0x3c314c2a, 0x00000000, }, /* 9.377e-19 */
/**/ u2 = {0x3bf955e4, 0x00000000, }, /* 8.584e-20 */
/**/ u3 = {0x3bf955e4, 0x00000000, }, /* 8.584e-20 */
/**/ u4 = {0x3bf955e4, 0x00000000, }, /* 8.584e-20 */
/**/ u5 = {0x3aaef2d1, 0x00000000, }, /* 5e-26 */
/**/ u6 = {0x3a6eeb36, 0x00000000, }, /* 3.122e-27 */
/**/ u7 = {0x3a6eeb36, 0x00000000, }, /* 3.122e-27 */
/**/ u8 = {0x3a6eeb36, 0x00000000, }, /* 3.122e-27 */
/**/ u91 = {0x3c6dffc0, 0x00000000, }, /* 1.301e-17 */
/**/ u92 = {0x3c527bd0, 0x00000000, }, /* 4.008e-18 */
/**/ u93 = {0x3c3cd057, 0x00000000, }, /* 1.562e-18 */
/**/ u94 = {0x3c329cdf, 0x00000000, }, /* 1.009e-18 */
/**/ ua1 = {0x3c3a1edf, 0x00000000, }, /* 1.416e-18 */
/**/ ua2 = {0x3c33f0e1, 0x00000000, }, /* 1.081e-18 */
/**/ ub = {0x3a98c56d, 0x00000000, }, /* 2.001e-26 */
/**/ uc = {0x3a9375de, 0x00000000, }, /* 1.572e-26 */
/**/ ud[MM] ={{0x38c6eddf, 0x00000000, }, /* 3.450e-35 */
/**/ {0x35c6ef60, 0x00000000, }, /* 1.226e-49 */
/**/ {0x32c6ed2f, 0x00000000, }, /* 4.354e-64 */
/**/ {0x23c6eee8, 0x00000000, }, /* 2.465e-136 */
/**/ {0x11c6ed16, 0x00000000, }},/* 4.955e-223 */
/**/ ue = {0x38900e9d, 0x00000000, }, /* 3.02e-36 */
/**/ two8 = {0x40700000, 0x00000000, }, /* 2**8=256 */
/**/ two52 = {0x43300000, 0x00000000, }, /* 2**52 */
/**/ two500 = {0x5f300000, 0x00000000, }, /* 2**500 */
/**/ twom500 = {0x20b00000, 0x00000000, }, /* 2**(-500) */
/**/ twom1022 = {0x00100000, 0x00000000, }; /* 2**(-1022) */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ mzero = {{0x80000000, 0x00000000} }, /* -0 */
/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ inv16 = {{0x3fb00000, 0x00000000} }, /* 1/16 */
/**/ opi = {{0x400921fb, 0x54442d18} }, /* pi */
/**/ opi1 = {{0x3ca1a626, 0x33145c07} }, /* pi-opi */
/**/ mopi = {{0xc00921fb, 0x54442d18} }, /* -pi */
/**/ hpi = {{0x3ff921fb, 0x54442d18} }, /* pi/2 */
/**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */
/**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */
/**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */
/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */
/**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */
/**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */
/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */
/**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */
/**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */
/**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */
/**/ u3 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */
/**/ u4 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */
/**/ u5 = {{0x3aaef2d1, 0x00000000} }, /* 5e-26 */
/**/ u6 = {{0x3a6eeb36, 0x00000000} }, /* 3.122e-27 */
/**/ u7 = {{0x3a6eeb36, 0x00000000} }, /* 3.122e-27 */
/**/ u8 = {{0x3a6eeb36, 0x00000000} }, /* 3.122e-27 */
/**/ u91 = {{0x3c6dffc0, 0x00000000} }, /* 1.301e-17 */
/**/ u92 = {{0x3c527bd0, 0x00000000} }, /* 4.008e-18 */
/**/ u93 = {{0x3c3cd057, 0x00000000} }, /* 1.562e-18 */
/**/ u94 = {{0x3c329cdf, 0x00000000} }, /* 1.009e-18 */
/**/ ua1 = {{0x3c3a1edf, 0x00000000} }, /* 1.416e-18 */
/**/ ua2 = {{0x3c33f0e1, 0x00000000} }, /* 1.081e-18 */
/**/ ub = {{0x3a98c56d, 0x00000000} }, /* 2.001e-26 */
/**/ uc = {{0x3a9375de, 0x00000000} }, /* 1.572e-26 */
/**/ ud[MM] ={{{0x38c6eddf, 0x00000000} }, /* 3.450e-35 */
/**/ {{0x35c6ef60, 0x00000000} }, /* 1.226e-49 */
/**/ {{0x32c6ed2f, 0x00000000} }, /* 4.354e-64 */
/**/ {{0x23c6eee8, 0x00000000} }, /* 2.465e-136 */
/**/ {{0x11c6ed16, 0x00000000} }},/* 4.955e-223 */
/**/ ue = {{0x38900e9d, 0x00000000} }, /* 3.02e-36 */
/**/ two8 = {{0x40700000, 0x00000000} }, /* 2**8=256 */
/**/ two52 = {{0x43300000, 0x00000000} }, /* 2**52 */
/**/ two500 = {{0x5f300000, 0x00000000} }, /* 2**500 */
/**/ twom500 = {{0x20b00000, 0x00000000} }, /* 2**(-500) */
/**/ twom1022 = {{0x00100000, 0x00000000} }; /* 2**(-1022) */
#else
#ifdef LITTLE_ENDI
static const number
/* polynomial I */
/**/ d3 = {0x55555555, 0xbfd55555, }, /* -0.333... */
/**/ d5 = {0x999997fd, 0x3fc99999, }, /* 0.199... */
/**/ d7 = {0x923f7603, 0xbfc24924, }, /* -0.142... */
/**/ d9 = {0xe5129a3b, 0x3fbc71c6, }, /* 0.111... */
/**/ d11 = {0x22b13c25, 0xbfb74580, }, /* -0.090... */
/**/ d13 = {0x8b31cbce, 0x3fb375f0, }, /* 0.076... */
/**/ d3 = {{0x55555555, 0xbfd55555} }, /* -0.333... */
/**/ d5 = {{0x999997fd, 0x3fc99999} }, /* 0.199... */
/**/ d7 = {{0x923f7603, 0xbfc24924} }, /* -0.142... */
/**/ d9 = {{0xe5129a3b, 0x3fbc71c6} }, /* 0.111... */
/**/ d11 = {{0x22b13c25, 0xbfb74580} }, /* -0.090... */
/**/ d13 = {{0x8b31cbce, 0x3fb375f0} }, /* 0.076... */
/* polynomial II */
/**/ f3 = {0x55555555, 0xbfd55555, }, /* -1/3 */
/**/ ff3 = {0x55555555, 0xbc755555, }, /* -1/3-f3 */
/**/ f5 = {0x9999999a, 0x3fc99999, }, /* 1/5 */
/**/ ff5 = {0x9999999a, 0xbc699999, }, /* 1/5-f5 */
/**/ f7 = {0x92492492, 0xbfc24924, }, /* -1/7 */
/**/ ff7 = {0x92492492, 0xbc624924, }, /* -1/7-f7 */
/**/ f9 = {0x1c71c71c, 0x3fbc71c7, }, /* 1/9 */
/**/ ff9 = {0x1c71c71c, 0x3c5c71c7, }, /* 1/9-f9 */
/**/ f11 = {0x745d1746, 0xbfb745d1, }, /* -1/11 */
/**/ f13 = {0x13b13b14, 0x3fb3b13b, }, /* 1/13 */
/**/ f15 = {0x11111111, 0xbfb11111, }, /* -1/15 */
/**/ f17 = {0x1e1e1e1e, 0x3fae1e1e, }, /* 1/17 */
/**/ f19 = {0xbca1af28, 0xbfaaf286, }, /* -1/19 */
/**/ f3 = {{0x55555555, 0xbfd55555} }, /* -1/3 */
/**/ ff3 = {{0x55555555, 0xbc755555} }, /* -1/3-f3 */
/**/ f5 = {{0x9999999a, 0x3fc99999} }, /* 1/5 */
/**/ ff5 = {{0x9999999a, 0xbc699999} }, /* 1/5-f5 */
/**/ f7 = {{0x92492492, 0xbfc24924} }, /* -1/7 */
/**/ ff7 = {{0x92492492, 0xbc624924} }, /* -1/7-f7 */
/**/ f9 = {{0x1c71c71c, 0x3fbc71c7} }, /* 1/9 */
/**/ ff9 = {{0x1c71c71c, 0x3c5c71c7} }, /* 1/9-f9 */
/**/ f11 = {{0x745d1746, 0xbfb745d1} }, /* -1/11 */
/**/ f13 = {{0x13b13b14, 0x3fb3b13b} }, /* 1/13 */
/**/ f15 = {{0x11111111, 0xbfb11111} }, /* -1/15 */
/**/ f17 = {{0x1e1e1e1e, 0x3fae1e1e} }, /* 1/17 */
/**/ f19 = {{0xbca1af28, 0xbfaaf286} }, /* -1/19 */
/* constants */
/**/ zero = {0x00000000, 0x00000000, }, /* 0 */
/**/ mzero = {0x00000000, 0x80000000, }, /* -0 */
/**/ one = {0x00000000, 0x3ff00000, }, /* 1 */
/**/ inv16 = {0x00000000, 0x3fb00000, }, /* 1/16 */
/**/ opi = {0x54442d18, 0x400921fb, }, /* pi */
/**/ opi1 = {0x33145c07, 0x3ca1a626, }, /* pi-opi */
/**/ mopi = {0x54442d18, 0xc00921fb, }, /* -pi */
/**/ hpi = {0x54442d18, 0x3ff921fb, }, /* pi/2 */
/**/ hpi1 = {0x33145c07, 0x3c91a626, }, /* pi/2-hpi */
/**/ mhpi = {0x54442d18, 0xbff921fb, }, /* -pi/2 */
/**/ qpi = {0x54442d18, 0x3fe921fb, }, /* pi/4 */
/**/ qpi1 = {0x33145c07, 0x3c81a626, }, /* pi/4-qpi */
/**/ mqpi = {0x54442d18, 0xbfe921fb, }, /* -pi/4 */
/**/ tqpi = {0x7f3321d2, 0x4002d97c, }, /* 3pi/4 */
/**/ tqpi1 = {0x4c9e8a0a, 0x3c9a7939, }, /* 3pi/4-tqpi */
/**/ mtqpi = {0x7f3321d2, 0xc002d97c, }, /* -3pi/4 */
/**/ u1 = {0x00000000, 0x3c314c2a, }, /* 9.377e-19 */
/**/ u2 = {0x00000000, 0x3bf955e4, }, /* 8.584e-20 */
/**/ u3 = {0x00000000, 0x3bf955e4, }, /* 8.584e-20 */
/**/ u4 = {0x00000000, 0x3bf955e4, }, /* 8.584e-20 */
/**/ u5 = {0x00000000, 0x3aaef2d1, }, /* 5e-26 */
/**/ u6 = {0x00000000, 0x3a6eeb36, }, /* 3.122e-27 */
/**/ u7 = {0x00000000, 0x3a6eeb36, }, /* 3.122e-27 */
/**/ u8 = {0x00000000, 0x3a6eeb36, }, /* 3.122e-27 */
/**/ u91 = {0x00000000, 0x3c6dffc0, }, /* 1.301e-17 */
/**/ u92 = {0x00000000, 0x3c527bd0, }, /* 4.008e-18 */
/**/ u93 = {0x00000000, 0x3c3cd057, }, /* 1.562e-18 */
/**/ u94 = {0x00000000, 0x3c329cdf, }, /* 1.009e-18 */
/**/ ua1 = {0x00000000, 0x3c3a1edf, }, /* 1.416e-18 */
/**/ ua2 = {0x00000000, 0x3c33f0e1, }, /* 1.081e-18 */
/**/ ub = {0x00000000, 0x3a98c56d, }, /* 2.001e-26 */
/**/ uc = {0x00000000, 0x3a9375de, }, /* 1.572e-26 */
/**/ ud[MM] ={{0x00000000, 0x38c6eddf, }, /* 3.450e-35 */
/**/ {0x00000000, 0x35c6ef60, }, /* 1.226e-49 */
/**/ {0x00000000, 0x32c6ed2f, }, /* 4.354e-64 */
/**/ {0x00000000, 0x23c6eee8, }, /* 2.465e-136 */
/**/ {0x00000000, 0x11c6ed16, }},/* 4.955e-223 */
/**/ ue = {0x00000000, 0x38900e9d, }, /* 3.02e-36 */
/**/ two8 = {0x00000000, 0x40700000, }, /* 2**8=256 */
/**/ two52 = {0x00000000, 0x43300000, }, /* 2**52 */
/**/ two500 = {0x00000000, 0x5f300000, }, /* 2**500 */
/**/ twom500 = {0x00000000, 0x20b00000, }, /* 2**(-500) */
/**/ twom1022 = {0x00000000, 0x00100000, }; /* 2**(-1022) */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ mzero = {{0x00000000, 0x80000000} }, /* -0 */
/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ inv16 = {{0x00000000, 0x3fb00000} }, /* 1/16 */
/**/ opi = {{0x54442d18, 0x400921fb} }, /* pi */
/**/ opi1 = {{0x33145c07, 0x3ca1a626} }, /* pi-opi */
/**/ mopi = {{0x54442d18, 0xc00921fb} }, /* -pi */
/**/ hpi = {{0x54442d18, 0x3ff921fb} }, /* pi/2 */
/**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */
/**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */
/**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */
/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */
/**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */
/**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */
/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */
/**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */
/**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */
/**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */
/**/ u3 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */
/**/ u4 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */
/**/ u5 = {{0x00000000, 0x3aaef2d1} }, /* 5e-26 */
/**/ u6 = {{0x00000000, 0x3a6eeb36} }, /* 3.122e-27 */
/**/ u7 = {{0x00000000, 0x3a6eeb36} }, /* 3.122e-27 */
/**/ u8 = {{0x00000000, 0x3a6eeb36} }, /* 3.122e-27 */
/**/ u91 = {{0x00000000, 0x3c6dffc0} }, /* 1.301e-17 */
/**/ u92 = {{0x00000000, 0x3c527bd0} }, /* 4.008e-18 */
/**/ u93 = {{0x00000000, 0x3c3cd057} }, /* 1.562e-18 */
/**/ u94 = {{0x00000000, 0x3c329cdf} }, /* 1.009e-18 */
/**/ ua1 = {{0x00000000, 0x3c3a1edf} }, /* 1.416e-18 */
/**/ ua2 = {{0x00000000, 0x3c33f0e1} }, /* 1.081e-18 */
/**/ ub = {{0x00000000, 0x3a98c56d} }, /* 2.001e-26 */
/**/ uc = {{0x00000000, 0x3a9375de} }, /* 1.572e-26 */
/**/ ud[MM] ={{{0x00000000, 0x38c6eddf} }, /* 3.450e-35 */
/**/ {{0x00000000, 0x35c6ef60} }, /* 1.226e-49 */
/**/ {{0x00000000, 0x32c6ed2f} }, /* 4.354e-64 */
/**/ {{0x00000000, 0x23c6eee8} }, /* 2.465e-136 */
/**/ {{0x00000000, 0x11c6ed16} }},/* 4.955e-223 */
/**/ ue = {{0x00000000, 0x38900e9d} }, /* 3.02e-36 */
/**/ two8 = {{0x00000000, 0x40700000} }, /* 2**8=256 */
/**/ two52 = {{0x00000000, 0x43300000} }, /* 2**52 */
/**/ two500 = {{0x00000000, 0x5f300000} }, /* 2**500 */
/**/ twom500 = {{0x00000000, 0x20b00000} }, /* 2**(-500) */
/**/ twom1022 = {{0x00000000, 0x00100000} }; /* 2**(-1022) */
#endif
#endif

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,14 +15,14 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*******************************************************************/
/* */
/* MODULE_NAME: branred.c */
/* MODULE_NAME: branred.c */
/* */
/* FUNCTIONS: branred */
/* */
/* */
/* FILES NEEDED: branred.h mydefs.h endian.h mpa.h */
/* mha.c */
/* */
@ -45,35 +45,41 @@
/* x=n*pi/2+(a+aa), abs(a+aa)<pi/4, n=0,+-1,+-2,.... */
/* Routine return integer (n mod 4) */
/*******************************************************************/
int branred(double x, double *a, double *aa)
int branred(double x, double *a, double *aa)
{
int i,k,n;
mynumber u,v,gor;
double r[6],s,t,sum,b,bb,sum1,sum2,b1,bb1,b2,bb2,x1,x2,t1,t2;
int i,k;
#if 0
int n;
#endif
mynumber u,gor;
#if 0
mynumber v;
#endif
double r[6],s,t,sum,b,bb,sum1,sum2,b1,bb1,b2,bb2,x1,x2,t1,t2;
x*=tm600.x;
t=x*split; /* split x to two numbers */
x1=t-(t-x);
x2=x-x1;
sum=0;
u.x = x1;
k = (u.i[HIGH_HALF]>>20)&2047;
k = (u.i[HIGH_HALF]>>20)&2047;
k = (k-450)/24;
if (k<0)
k=0;
gor.x = t576.x;
gor.i[HIGH_HALF] -= ((k*24)<<20);
for (i=0;i<6;i++)
for (i=0;i<6;i++)
{ r[i] = x1*toverp[k+i]*gor.x; gor.x *= tm24.x; }
for (i=0;i<3;i++) {
s=(r[i]+big.x)-big.x;
s=(r[i]+big.x)-big.x;
sum+=s;
r[i]-=s;
}
t=0;
for (i=0;i<6;i++)
for (i=0;i<6;i++)
t+=r[5-i];
bb=(((((r[0]-t)+r[1])+r[2])+r[3])+r[4])+r[5];
bb=(((((r[0]-t)+r[1])+r[2])+r[3])+r[4])+r[5];
s=(t+big.x)-big.x;
sum+=s;
t-=s;
@ -85,7 +91,7 @@ int branred(double x, double *a, double *aa)
bb1=bb;
sum1=sum;
sum=0;
u.x = x2;
k = (u.i[HIGH_HALF]>>20)&2047;
k = (k-450)/24;
@ -96,14 +102,14 @@ int branred(double x, double *a, double *aa)
for (i=0;i<6;i++)
{ r[i] = x2*toverp[k+i]*gor.x; gor.x *= tm24.x; }
for (i=0;i<3;i++) {
s=(r[i]+big.x)-big.x;
s=(r[i]+big.x)-big.x;
sum+=s;
r[i]-=s;
}
t=0;
for (i=0;i<6;i++)
t+=r[5-i];
bb=(((((r[0]-t)+r[1])+r[2])+r[3])+r[4])+r[5];
bb=(((((r[0]-t)+r[1])+r[2])+r[3])+r[4])+r[5];
s=(t+big.x)-big.x;
sum+=s;
t-=s;
@ -111,17 +117,17 @@ int branred(double x, double *a, double *aa)
bb=(t-b)+bb;
s=(sum+big1.x)-big1.x;
sum-=s;
b2=b;
bb2=bb;
sum2=sum;
sum=sum1+sum2;
b=b1+b2;
bb = (ABS(b1)>ABS(b2))? (b1-b)+b2 : (b2-b)+b1;
if (b > 0.5)
bb = (ABS(b1)>ABS(b2))? (b1-b)+b2 : (b2-b)+b1;
if (b > 0.5)
{b-=1.0; sum+=1.0;}
else if (b < -0.5)
else if (b < -0.5)
{b+=1.0; sum-=1.0;}
s=b+(bb+bb1+bb2);
t=((b-s)+bb)+(bb1+bb2);
@ -136,4 +142,3 @@ int branred(double x, double *a, double *aa)
*aa=t;
return ((int) sum)&3; /* return quater of unit circle */
}

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: branred.h */
@ -31,49 +31,49 @@
#ifdef BIG_ENDI
static const mynumber
/**/ t576 = {0x63f00000, 0x00000000 }, /* 2 ^ 576 */
/**/ tm600 = {0x1a700000, 0x00000000 }, /* 2 ^- 600 */
/**/ tm24 = {0x3e700000, 0x00000000 }, /* 2 ^- 24 */
/**/ big = {0x43380000, 0x00000000 }, /* 6755399441055744 */
/**/ big1 = {0x43580000, 0x00000000 }, /* 27021597764222976 */
/**/ hp0 = {0x3FF921FB, 0x54442D18 } ,/* 1.5707963267948966 */
/**/ hp1 = {0x3C91A626, 0x33145C07 } ,/* 6.123233995736766e-17 */
/**/ mp1 = {0x3FF921FB, 0x58000000 }, /* 1.5707963407039642 */
/**/ mp2 = {0xBE4DDE97, 0x40000000 }; /*-1.3909067675399456e-08 */
/**/ t576 = {{0x63f00000, 0x00000000}}, /* 2 ^ 576 */
/**/ tm600 = {{0x1a700000, 0x00000000}}, /* 2 ^- 600 */
/**/ tm24 = {{0x3e700000, 0x00000000}}, /* 2 ^- 24 */
/**/ big = {{0x43380000, 0x00000000}}, /* 6755399441055744 */
/**/ big1 = {{0x43580000, 0x00000000}}, /* 27021597764222976 */
/**/ hp0 = {{0x3FF921FB, 0x54442D18}} ,/* 1.5707963267948966 */
/**/ hp1 = {{0x3C91A626, 0x33145C07}} ,/* 6.123233995736766e-17 */
/**/ mp1 = {{0x3FF921FB, 0x58000000}}, /* 1.5707963407039642 */
/**/ mp2 = {{0xBE4DDE97, 0x40000000}}; /*-1.3909067675399456e-08 */
#else
#ifdef LITTLE_ENDI
static const mynumber
/**/ t576 = {0x00000000, 0x63f00000 }, /* 2 ^ 576 */
/**/ tm600 = {0x00000000, 0x1a700000 }, /* 2 ^- 600 */
/**/ tm24 = {0x00000000, 0x3e700000 }, /* 2 ^- 24 */
/**/ big = {0x00000000, 0x43380000 }, /* 6755399441055744 */
/**/ big1 = {0x00000000, 0x43580000 }, /* 27021597764222976 */
/**/ hp0 = {0x54442D18, 0x3FF921FB }, /* 1.5707963267948966 */
/**/ hp1 = {0x33145C07, 0x3C91A626 }, /* 6.123233995736766e-17 */
/**/ mp1 = {0x58000000, 0x3FF921FB }, /* 1.5707963407039642 */
/**/ mp2 = {0x40000000, 0xBE4DDE97 }; /*-1.3909067675399456e-08 */
/**/ t576 = {{0x00000000, 0x63f00000}}, /* 2 ^ 576 */
/**/ tm600 = {{0x00000000, 0x1a700000}}, /* 2 ^- 600 */
/**/ tm24 = {{0x00000000, 0x3e700000}}, /* 2 ^- 24 */
/**/ big = {{0x00000000, 0x43380000}}, /* 6755399441055744 */
/**/ big1 = {{0x00000000, 0x43580000}}, /* 27021597764222976 */
/**/ hp0 = {{0x54442D18, 0x3FF921FB}}, /* 1.5707963267948966 */
/**/ hp1 = {{0x33145C07, 0x3C91A626}}, /* 6.123233995736766e-17 */
/**/ mp1 = {{0x58000000, 0x3FF921FB}}, /* 1.5707963407039642 */
/**/ mp2 = {{0x40000000, 0xBE4DDE97}}; /*-1.3909067675399456e-08 */
#endif
#endif
static const double toverp[75] = { /* 2/ PI base 24*/
10680707.0, 7228996.0, 1387004.0, 2578385.0, 16069853.0,
12639074.0, 9804092.0, 4427841.0, 16666979.0, 11263675.0,
12935607.0, 2387514.0, 4345298.0, 14681673.0, 3074569.0,
13734428.0, 16653803.0, 1880361.0, 10960616.0, 8533493.0,
3062596.0, 8710556.0, 7349940.0, 6258241.0, 3772886.0,
3769171.0, 3798172.0, 8675211.0, 12450088.0, 3874808.0,
9961438.0, 366607.0, 15675153.0, 9132554.0, 7151469.0,
3571407.0, 2607881.0, 12013382.0, 4155038.0, 6285869.0,
7677882.0, 13102053.0, 15825725.0, 473591.0, 9065106.0,
15363067.0, 6271263.0, 9264392.0, 5636912.0, 4652155.0,
7056368.0, 13614112.0, 10155062.0, 1944035.0, 9527646.0,
15080200.0, 6658437.0, 6231200.0, 6832269.0, 16767104.0,
5075751.0, 3212806.0, 1398474.0, 7579849.0, 6349435.0,
12618859.0, 4703257.0, 12806093.0, 14477321.0, 2786137.0,
12875403.0, 9837734.0, 14528324.0, 13719321.0, 343717.0 };
10680707.0, 7228996.0, 1387004.0, 2578385.0, 16069853.0,
12639074.0, 9804092.0, 4427841.0, 16666979.0, 11263675.0,
12935607.0, 2387514.0, 4345298.0, 14681673.0, 3074569.0,
13734428.0, 16653803.0, 1880361.0, 10960616.0, 8533493.0,
3062596.0, 8710556.0, 7349940.0, 6258241.0, 3772886.0,
3769171.0, 3798172.0, 8675211.0, 12450088.0, 3874808.0,
9961438.0, 366607.0, 15675153.0, 9132554.0, 7151469.0,
3571407.0, 2607881.0, 12013382.0, 4155038.0, 6285869.0,
7677882.0, 13102053.0, 15825725.0, 473591.0, 9065106.0,
15363067.0, 6271263.0, 9264392.0, 5636912.0, 4652155.0,
7056368.0, 13614112.0, 10155062.0, 1944035.0, 9527646.0,
15080200.0, 6658437.0, 6231200.0, 6832269.0, 16767104.0,
5075751.0, 3212806.0, 1398474.0, 7579849.0, 6349435.0,
12618859.0, 4703257.0, 12806093.0, 14477321.0, 2786137.0,
12875403.0, 9837734.0, 14528324.0, 13719321.0, 343717.0 };
static const double split = 134217729.0;

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: doasin.h */
@ -31,30 +31,30 @@
#ifdef BIG_ENDI
static const mynumber
/**/ c1 = {0x3FC55555, 0x55555555}, /* 0.16666666666666666 */
/**/ cc1 = {0x3C655555, 0x55775389}, /* 9.2518585419753846e-18 */
/**/ c2 = {0x3FB33333, 0x33333333}, /* 0.074999999999999997 */
/**/ cc2 = {0x3C499993, 0x63F1A115}, /* 2.7755472886508899e-18 */
/**/ c3 = {0x3FA6DB6D, 0xB6DB6DB7}, /* 0.044642857142857144 */
/**/ cc3 = {0xBC320FC0, 0x3D5CF0C5}, /* -9.7911734574147224e-19 */
/**/ c4 = {0x3F9F1C71, 0xC71C71C5}, /* 0.030381944444444437 */
/**/ cc4 = {0xBC02B240, 0xFF23ED1E}; /* -1.2669108566898312e-19 */
static const mynumber
/**/ c1 = {{0x3FC55555, 0x55555555}}, /* 0.16666666666666666 */
/**/ cc1 = {{0x3C655555, 0x55775389}}, /* 9.2518585419753846e-18 */
/**/ c2 = {{0x3FB33333, 0x33333333}}, /* 0.074999999999999997 */
/**/ cc2 = {{0x3C499993, 0x63F1A115}}, /* 2.7755472886508899e-18 */
/**/ c3 = {{0x3FA6DB6D, 0xB6DB6DB7}}, /* 0.044642857142857144 */
/**/ cc3 = {{0xBC320FC0, 0x3D5CF0C5}}, /* -9.7911734574147224e-19 */
/**/ c4 = {{0x3F9F1C71, 0xC71C71C5}}, /* 0.030381944444444437 */
/**/ cc4 = {{0xBC02B240, 0xFF23ED1E}}; /* -1.2669108566898312e-19 */
#else
#ifdef LITTLE_ENDI
static const mynumber
/**/ c1 = {0x55555555, 0x3FC55555}, /* 0.16666666666666666 */
/**/ cc1 = {0x55775389, 0x3C655555}, /* 9.2518585419753846e-18 */
/**/ c2 = {0x33333333, 0x3FB33333}, /* 0.074999999999999997 */
/**/ cc2 = {0x63F1A115, 0x3C499993}, /* 2.7755472886508899e-18 */
/**/ c3 = {0xB6DB6DB7, 0x3FA6DB6D}, /* 0.044642857142857144 */
/**/ cc3 = {0x3D5CF0C5, 0xBC320FC0}, /* -9.7911734574147224e-19 */
/**/ c4 = {0xC71C71C5, 0x3F9F1C71}, /* 0.030381944444444437 */
/**/ cc4 = {0xFF23ED1E, 0xBC02B240}; /* -1.2669108566898312e-19 */
static const mynumber
/**/ c1 = {{0x55555555, 0x3FC55555}}, /* 0.16666666666666666 */
/**/ cc1 = {{0x55775389, 0x3C655555}}, /* 9.2518585419753846e-18 */
/**/ c2 = {{0x33333333, 0x3FB33333}}, /* 0.074999999999999997 */
/**/ cc2 = {{0x63F1A115, 0x3C499993}}, /* 2.7755472886508899e-18 */
/**/ c3 = {{0xB6DB6DB7, 0x3FA6DB6D}}, /* 0.044642857142857144 */
/**/ cc3 = {{0x3D5CF0C5, 0xBC320FC0}}, /* -9.7911734574147224e-19 */
/**/ c4 = {{0xC71C71C5, 0x3F9F1C71}}, /* 0.030381944444444437 */
/**/ cc4 = {{0xFF23ED1E, 0xBC02B240}}; /* -1.2669108566898312e-19 */
#endif
#endif

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,10 +15,10 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/********************************************************************/
/* */
/* */
/* MODULE_NAME: dosincos.c */
/* */
/* */
@ -34,7 +34,7 @@
#include "endian.h"
#include "mydefs.h"
#include "mydefs.h"
#include "sincos.tbl"
#include "dla.h"
#include "dosincos.h"
@ -42,15 +42,18 @@
/* Routine receive Double-Length number (x+dx) and computing sin(x+dx) */
/* as Double-Length number and store it at array v .It computes it by */
/* arithmetic action on Double-Length numbers */
/*(x+dx) between 0 and PI/4 */
/*(x+dx) between 0 and PI/4 */
/***********************************************************************/
void dubsin(double x, double dx, double v[]) {
double xx,y,yy,z,zz,r,s,p,hx,tx,hy,ty,q,c,cc,d,dd,d2,dd2,e,ee,
double r,s,p,hx,tx,hy,ty,q,c,cc,d,dd,d2,dd2,e,ee,
sn,ssn,cs,ccs,ds,dss,dc,dcc;
#if 0
double xx,y,yy,z,zz;
#endif
mynumber u;
int4 k;
u.x=x+big.x;
k = u.i[LOW_HALF]<<2;
x=x-(u.x-big.x);
@ -63,26 +66,26 @@ void dubsin(double x, double dx, double v[]) {
cs=sincos.x[k+2]; /* */
ccs=sincos.x[k+3]; /* */
MUL2(d2,dd2,s7.x,ss7.x,ds,dss,p,hx,tx,hy,ty,q,c,cc); /* Taylor */
ADD2(ds,dss,s5.x,ss5.x,ds,dss,r,s);
ADD2(ds,dss,s5.x,ss5.x,ds,dss,r,s);
MUL2(d2,dd2,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc); /* series */
ADD2(ds,dss,s3.x,ss3.x,ds,dss,r,s);
ADD2(ds,dss,s3.x,ss3.x,ds,dss,r,s);
MUL2(d2,dd2,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc); /* for sin */
MUL2(d,dd,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,d,dd,ds,dss,r,s); /* ds=sin(t) */
MUL2(d2,dd2,c8.x,cc8.x,dc,dcc,p,hx,tx,hy,ty,q,c,cc); ;/* Taylor */
ADD2(dc,dcc,c6.x,cc6.x,dc,dcc,r,s);
ADD2(dc,dcc,c6.x,cc6.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc); /* series */
ADD2(dc,dcc,c4.x,cc4.x,dc,dcc,r,s);
ADD2(dc,dcc,c4.x,cc4.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc); /* for cos */
ADD2(dc,dcc,c2.x,cc2.x,dc,dcc,r,s);
ADD2(dc,dcc,c2.x,cc2.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc); /* dc=cos(t) */
MUL2(cs,ccs,ds,dss,e,ee,p,hx,tx,hy,ty,q,c,cc);
MUL2(dc,dcc,sn,ssn,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
SUB2(e,ee,dc,dcc,e,ee,r,s);
SUB2(e,ee,dc,dcc,e,ee,r,s);
ADD2(e,ee,sn,ssn,e,ee,r,s); /* e+ee=sin(x+dx) */
v[0]=e;
v[1]=ee;
}
@ -94,46 +97,49 @@ void dubsin(double x, double dx, double v[]) {
/**********************************************************************/
void dubcos(double x, double dx, double v[]) {
double xx,y,yy,z,zz,r,s,p,hx,tx,hy,ty,q,c,cc,d,dd,d2,dd2,e,ee,
double r,s,p,hx,tx,hy,ty,q,c,cc,d,dd,d2,dd2,e,ee,
sn,ssn,cs,ccs,ds,dss,dc,dcc;
#if 0
double xx,y,yy,z,zz;
#endif
mynumber u;
int4 k;
u.x=x+big.x;
int4 k;
u.x=x+big.x;
k = u.i[LOW_HALF]<<2;
x=x-(u.x-big.x);
d=x+dx;
d=x+dx;
dd=(x-d)+dx; /* cos(x+dx)=cos(Xi+t)=cos(Xi)cos(t) - sin(Xi)sin(t) */
MUL2(d,dd,d,dd,d2,dd2,p,hx,tx,hy,ty,q,c,cc);
MUL2(d,dd,d,dd,d2,dd2,p,hx,tx,hy,ty,q,c,cc);
sn=sincos.x[k]; /* */
ssn=sincos.x[k+1]; /* sin(Xi) and cos(Xi) */
cs=sincos.x[k+2]; /* */
ccs=sincos.x[k+3]; /* */
MUL2(d2,dd2,s7.x,ss7.x,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,s5.x,ss5.x,ds,dss,r,s);
ADD2(ds,dss,s5.x,ss5.x,ds,dss,r,s);
MUL2(d2,dd2,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,s3.x,ss3.x,ds,dss,r,s);
ADD2(ds,dss,s3.x,ss3.x,ds,dss,r,s);
MUL2(d2,dd2,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
MUL2(d,dd,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,d,dd,ds,dss,r,s);
ADD2(ds,dss,d,dd,ds,dss,r,s);
MUL2(d2,dd2,c8.x,cc8.x,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
ADD2(dc,dcc,c6.x,cc6.x,dc,dcc,r,s);
ADD2(dc,dcc,c6.x,cc6.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
ADD2(dc,dcc,c4.x,cc4.x,dc,dcc,r,s);
ADD2(dc,dcc,c4.x,cc4.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
ADD2(dc,dcc,c2.x,cc2.x,dc,dcc,r,s);
ADD2(dc,dcc,c2.x,cc2.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
MUL2(cs,ccs,ds,dss,e,ee,p,hx,tx,hy,ty,q,c,cc);
MUL2(dc,dcc,sn,ssn,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
MUL2(d2,dd2,s7.x,ss7.x,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,s5.x,ss5.x,ds,dss,r,s);
MUL2(d2,dd2,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,s3.x,ss3.x,ds,dss,r,s);
ADD2(ds,dss,s3.x,ss3.x,ds,dss,r,s);
MUL2(d2,dd2,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
MUL2(d,dd,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,d,dd,ds,dss,r,s);
MUL2(d,dd,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,d,dd,ds,dss,r,s);
MUL2(d2,dd2,c8.x,cc8.x,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
ADD2(dc,dcc,c6.x,cc6.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
@ -143,9 +149,9 @@ void dubcos(double x, double dx, double v[]) {
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
MUL2(sn,ssn,ds,dss,e,ee,p,hx,tx,hy,ty,q,c,cc);
MUL2(dc,dcc,cs,ccs,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
ADD2(e,ee,dc,dcc,e,ee,r,s);
SUB2(cs,ccs,e,ee,e,ee,r,s);
ADD2(e,ee,dc,dcc,e,ee,r,s);
SUB2(cs,ccs,e,ee,e,ee,r,s);
v[0]=e;
v[1]=ee;
}
@ -164,14 +170,14 @@ void docos(double x, double dx, double v[]) {
yy=hp1.x-yy;
y=p+yy;
yy=(p-y)+yy;
if (y>0) {dubsin(y,yy,w); v[0]=w[0]; v[1]=w[1];}
if (y>0) {dubsin(y,yy,w); v[0]=w[0]; v[1]=w[1];}
/* cos(x) = sin ( 90 - x ) */
else {dubsin(-y,-yy,w); v[0]=-w[0]; v[1]=-w[1];
else {dubsin(-y,-yy,w); v[0]=-w[0]; v[1]=-w[1];
}
}
else { /* y>= 3/4 * PI */
p=2.0*hp0.x-y; /* p = PI- y */
yy=2.0*hp1.x-yy;
yy=2.0*hp1.x-yy;
y=p+yy;
yy=(p-y)+yy;
dubcos(y,yy,w);

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: dosincos.h */
@ -32,47 +32,47 @@
#ifdef BIG_ENDI
static const mynumber
/**/ s3 = {0xBFC55555, 0x55555555}, /* -0.16666666666666666 */
/**/ ss3 = {0xBC6553AA, 0xE77EE482}, /* -9.2490366677784492e-18 */
/**/ s5 = {0x3F811111, 0x11110F15}, /* 0.008333333333332452 */
/**/ ss5 = {0xBC21AC06, 0xDA488820}, /* -4.7899996586987931e-19 */
/**/ s7 = {0xBF2A019F, 0x5816C78D}, /* -0.00019841261022928957 */
/**/ ss7 = {0x3BCDCEC9, 0x6A18BF2A}, /* 1.2624077757871259e-20 */
/**/ c2 = {0x3FE00000, 0x00000000}, /* 0.5 */
/**/ cc2 = {0xBA282FD8, 0x00000000}, /* -1.5264073330037701e-28 */
/**/ c4 = {0xBFA55555, 0x55555555}, /* -0.041666666666666664 */
/**/ cc4 = {0xBC4554BC, 0x2FFF257E}, /* -2.312711276085743e-18 */
/**/ c6 = {0x3F56C16C, 0x16C16A96}, /* 0.0013888888888888055 */
/**/ cc6 = {0xBBD2E846, 0xE6346F14}, /* -1.6015133010194884e-20 */
/**/ c8 = {0xBEFA019F, 0x821D5987}, /* -2.480157866754367e-05 */
/**/ cc8 = {0x3B7AB71E, 0x72FFE5CC}, /* 3.5357416224857556e-22 */
/**/ s3 = {{0xBFC55555, 0x55555555}},/* -0.16666666666666666 */
/**/ ss3 = {{0xBC6553AA, 0xE77EE482}},/* -9.2490366677784492e-18 */
/**/ s5 = {{0x3F811111, 0x11110F15}},/* 0.008333333333332452 */
/**/ ss5 = {{0xBC21AC06, 0xDA488820}},/* -4.7899996586987931e-19 */
/**/ s7 = {{0xBF2A019F, 0x5816C78D}},/* -0.00019841261022928957 */
/**/ ss7 = {{0x3BCDCEC9, 0x6A18BF2A}},/* 1.2624077757871259e-20 */
/**/ c2 = {{0x3FE00000, 0x00000000}},/* 0.5 */
/**/ cc2 = {{0xBA282FD8, 0x00000000}},/* -1.5264073330037701e-28 */
/**/ c4 = {{0xBFA55555, 0x55555555}},/* -0.041666666666666664 */
/**/ cc4 = {{0xBC4554BC, 0x2FFF257E}},/* -2.312711276085743e-18 */
/**/ c6 = {{0x3F56C16C, 0x16C16A96}},/* 0.0013888888888888055 */
/**/ cc6 = {{0xBBD2E846, 0xE6346F14}},/* -1.6015133010194884e-20 */
/**/ c8 = {{0xBEFA019F, 0x821D5987}},/* -2.480157866754367e-05 */
/**/ cc8 = {{0x3B7AB71E, 0x72FFE5CC}},/* 3.5357416224857556e-22 */
/**/ big = {0x42c80000, 0x00000000}, /* 52776558133248 */
/**/ big = {{0x42c80000, 0x00000000}}, /* 52776558133248 */
/**/ hp0 = {0x3FF921FB, 0x54442D18 }, /* PI / 2 */
/**/ hp1 = {0x3C91A626, 0x33145C07 }; /* 6.123233995736766e-17 */
/**/ hp0 = {{0x3FF921FB, 0x54442D18}}, /* PI / 2 */
/**/ hp1 = {{0x3C91A626, 0x33145C07}}; /* 6.123233995736766e-17 */
#else
#ifdef LITTLE_ENDI
static const mynumber
/**/ s3 = {0x55555555, 0xBFC55555}, /* -0.16666666666666666 */
/**/ ss3 = {0xE77EE482, 0xBC6553AA}, /* -9.2490366677784492e-18 */
/**/ s5 = {0x11110F15, 0x3F811111}, /* 0.008333333333332452 */
/**/ ss5 = {0xDA488820, 0xBC21AC06}, /* -4.7899996586987931e-19 */
/**/ s7 = {0x5816C78D, 0xBF2A019F}, /* -0.00019841261022928957 */
/**/ ss7 = {0x6A18BF2A, 0x3BCDCEC9}, /* 1.2624077757871259e-20 */
/**/ c2 = {0x00000000, 0x3FE00000}, /* 0.5 */
/**/ cc2 = {0x00000000, 0xBA282FD8}, /* -1.5264073330037701e-28 */
/**/ c4 = {0x55555555, 0xBFA55555}, /* -0.041666666666666664 */
/**/ cc4 = {0x2FFF257E, 0xBC4554BC}, /* -2.312711276085743e-18 */
/**/ c6 = {0x16C16A96, 0x3F56C16C}, /* 0.0013888888888888055 */
/**/ cc6 = {0xE6346F14, 0xBBD2E846}, /* -1.6015133010194884e-20 */
/**/ c8 = {0x821D5987, 0xBEFA019F}, /* -2.480157866754367e-05 */
/**/ cc8 = {0x72FFE5CC, 0x3B7AB71E}, /* 3.5357416224857556e-22 */
/**/ s3 = {{0x55555555, 0xBFC55555}},/* -0.16666666666666666 */
/**/ ss3 = {{0xE77EE482, 0xBC6553AA}},/* -9.2490366677784492e-18 */
/**/ s5 = {{0x11110F15, 0x3F811111}},/* 0.008333333333332452 */
/**/ ss5 = {{0xDA488820, 0xBC21AC06}},/* -4.7899996586987931e-19 */
/**/ s7 = {{0x5816C78D, 0xBF2A019F}},/* -0.00019841261022928957 */
/**/ ss7 = {{0x6A18BF2A, 0x3BCDCEC9}},/* 1.2624077757871259e-20 */
/**/ c2 = {{0x00000000, 0x3FE00000}},/* 0.5 */
/**/ cc2 = {{0x00000000, 0xBA282FD8}},/* -1.5264073330037701e-28 */
/**/ c4 = {{0x55555555, 0xBFA55555}},/* -0.041666666666666664 */
/**/ cc4 = {{0x2FFF257E, 0xBC4554BC}},/* -2.312711276085743e-18 */
/**/ c6 = {{0x16C16A96, 0x3F56C16C}},/* 0.0013888888888888055 */
/**/ cc6 = {{0xE6346F14, 0xBBD2E846}},/* -1.6015133010194884e-20 */
/**/ c8 = {{0x821D5987, 0xBEFA019F}},/* -2.480157866754367e-05 */
/**/ cc8 = {{0x72FFE5CC, 0x3B7AB71E}},/* 3.5357416224857556e-22 */
/**/ big = {0x00000000, 0x42c80000}, /* 52776558133248 */
/**/ big = {{0x00000000, 0x42c80000}}, /* 52776558133248 */
/**/ hp0 = {0x54442D18, 0x3FF921FB }, /* PI / 2 */
/**/ hp1 = {0x33145C07, 0x3C91A626 }; /* 6.123233995736766e-17 */
/**/ hp0 = {{0x54442D18, 0x3FF921FB}}, /* PI / 2 */
/**/ hp1 = {{0x33145C07, 0x3C91A626}}; /* 6.123233995736766e-17 */
#endif
#endif

View File

@ -54,7 +54,10 @@ double __cos32(double x, double res, double res1);
double __ieee754_asin(double x){
double x1,x2,xx,s1,s2,res1,p,t,res,r,cor,cc,y,c,z,w[2];
mynumber u,v;
int4 k,m,n,nn;
int4 k,m,n;
#if 0
int4 nn;
#endif
u.x = x;
m = u.i[HIGH_HALF];
@ -90,7 +93,7 @@ double __ieee754_asin(double x){
y=ABS(x);
res=ABS(w[0]);
res1=ABS(w[0]+1.1*w[1]);
return (m>0)?sin32(y,res,res1):-sin32(y,res,res1);
return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1);
}
}
}
@ -123,7 +126,7 @@ double __ieee754_asin(double x){
else if (z<-1.0e-27) return (m>0)?max(res,res1):-max(res,res1);
else {
y=ABS(x);
return (m>0)?sin32(y,res,res1):-sin32(y,res,res1);
return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1);
}
}
}
@ -156,7 +159,7 @@ double __ieee754_asin(double x){
else if (z<-1.0e-27) return (m>0)?max(res,res1):-max(res,res1);
else {
y=ABS(x);
return (m>0)?sin32(y,res,res1):-sin32(y,res,res1);
return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1);
}
}
}
@ -191,7 +194,7 @@ double __ieee754_asin(double x){
else if (z<-1.0e-27) return (m>0)?max(res,res1):-max(res,res1);
else {
y=ABS(x);
return (m>0)?sin32(y,res,res1):-sin32(y,res,res1);
return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1);
}
}
}
@ -229,7 +232,7 @@ double __ieee754_asin(double x){
else if (z<-1.0e-27) return (m>0)?max(res,res1):-max(res,res1);
else {
y=ABS(x);
return (m>0)?sin32(y,res,res1):-sin32(y,res,res1);
return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1);
}
}
}
@ -268,7 +271,7 @@ double __ieee754_asin(double x){
else if (z<-1.0e-27) return (m>0)?max(res,res1):-max(res,res1);
else {
y=ABS(x);
return (m>0)?sin32(y,res,res1):-sin32(y,res,res1);
return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1);
}
}
}
@ -303,7 +306,7 @@ double __ieee754_asin(double x){
else {
y=ABS(x);
res1=res+1.1*cor;
return (m>0)?sin32(y,res,res1):-sin32(y,res,res1);
return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1);
}
}
} /* else if (k < 0x3ff00000) */
@ -327,9 +330,14 @@ double __ieee754_asin(double x){
double __ieee754_acos(double x)
{
double x1,x2,xx,s1,s2,res1,p,t,res,r,cor,cc,y,c,z,w[2],eps;
#if 0
double fc;
#endif
mynumber u,v;
int4 k,m,n,nn;
int4 k,m,n;
#if 0
int4 nn;
#endif
u.x = x;
m = u.i[HIGH_HALF];
k = 0x7fffffff&m;
@ -371,7 +379,7 @@ double __ieee754_acos(double x)
if (res ==(res +1.00000001*cor)) return res;
else {
res1=res+1.1*cor;
return cos32(x,res,res1);
return __cos32(x,res,res1);
}
}
}
@ -408,7 +416,7 @@ double __ieee754_acos(double x)
z=(w[0]-x)+w[1];
if (z>1.0e-27) return max(res,res1);
else if (z<-1.0e-27) return min(res,res1);
else return cos32(x,res,res1);
else return __cos32(x,res,res1);
}
}
} /* else if (k < 0x3fe00000) */
@ -443,7 +451,7 @@ double __ieee754_acos(double x)
z=(w[0]-x)+w[1];
if (z>1.0e-27) return max(res,res1);
else if (z<-1.0e-27) return min(res,res1);
else return cos32(x,res,res1);
else return __cos32(x,res,res1);
}
}
} /* else if (k < 0x3fe80000) */
@ -478,7 +486,7 @@ double __ieee754_acos(double x)
z=(w[0]-x)+w[1];
if (z>1.0e-27) return max(res,res1);
else if (z<-1.0e-27) return min(res,res1);
else return cos32(x,res,res1);
else return __cos32(x,res,res1);
}
}
} /* else if (k < 0x3fed8000) */
@ -514,7 +522,7 @@ double __ieee754_acos(double x)
z=(w[0]-x)+w[1];
if (z>1.0e-27) return max(res,res1);
else if (z<-1.0e-27) return min(res,res1);
else return cos32(x,res,res1);
else return __cos32(x,res,res1);
}
}
} /* else if (k < 0x3fee8000) */
@ -550,7 +558,7 @@ double __ieee754_acos(double x)
z=(w[0]-x)+w[1];
if (z>1.0e-27) return max(res,res1);
else if (z<-1.0e-27) return min(res,res1);
else return cos32(x,res,res1);
else return __cos32(x,res,res1);
}
}
} /* else if (k < 0x3fef0000) */
@ -586,7 +594,7 @@ double __ieee754_acos(double x)
else {
res=res+res;
res1=res+1.2*cor;
return cos32(x,res,res1);
return __cos32(x,res,res1);
}
}
}
@ -604,7 +612,7 @@ double __ieee754_acos(double x)
else {
res=res+res;
res1=res+1.2*cor;
return cos32(x,res,res1);
return __cos32(x,res,res1);
}
}
}

View File

@ -54,12 +54,20 @@ void __mpatan2(mp_no *,mp_no *,mp_no *,int);
double __ieee754_atan2(double y,double x) {
int i,de,ux,dx,uy,dy,p;
int i,de,ux,dx,uy,dy;
#if 0
int p;
#endif
static const int pr[MM]={6,8,10,20,32};
double ax,ay,u,du,u9,ua,v,vv,dv,t1,t2,t3,t4,t5,t6,t7,t8,
z,zz,z1,z2,cor,s1,ss1,s2,ss2;
z,zz,cor,s1,ss1,s2,ss2;
#if 0
double z1,z2;
#endif
number num;
#if 0
mp_no mperr,mpt1,mpx,mpy,mpz,mpz1,mpz2;
#endif
static const int ep= 59768832, /* 57*16**5 */
em=-59768832; /* -57*16**5 */
@ -368,7 +376,7 @@ static double normalized(double ax,double ay,double y, double z)
p=6;
dbl_mp(ax,&mpx,p); dbl_mp(ay,&mpy,p); dvd(&mpy,&mpx,&mpz,p);
dbl_mp(ue.d,&mpt1,p); mul(&mpz,&mpt1,&mperr,p);
sub(&mpz,&mperr,&mpz2,p); mp_dbl(&mpz2,&z,p);
sub(&mpz,&mperr,&mpz2,p); __mp_dbl(&mpz2,&z,p);
return signArctan2(y,z);
}
/* Fix the sign and return after stage 1 or stage 2 */
@ -388,7 +396,7 @@ static double atan2Mp(double x,double y,const int pr[])
__mpatan2(&mpy,&mpx,&mpz,p);
dbl_mp(ud[i].d,&mpt1,p); mul(&mpz,&mpt1,&mperr,p);
add(&mpz,&mperr,&mpz1,p); sub(&mpz,&mperr,&mpz2,p);
mp_dbl(&mpz1,&z1,p); mp_dbl(&mpz2,&z2,p);
__mp_dbl(&mpz1,&z1,p); __mp_dbl(&mpz2,&z2,p);
if (z1==z2) return z1;
}
return z1; /*if unpossible to do exact computing */

View File

@ -45,8 +45,11 @@ double __slowexp(double);
/***************************************************************************/
double __ieee754_exp(double x) {
double bexp, t, eps, del, base, y, al, bet, res, rem, cor;
mynumber junk1, junk2, binexp = {0,0};
int4 k,i,j,m,n,ex;
mynumber junk1, junk2, binexp = {{0,0}};
#if 0
int4 k;
#endif
int4 i,j,m,n,ex;
junk1.x = x;
m = junk1.i[HIGH_HALF];
@ -149,8 +152,11 @@ double __ieee754_exp(double x) {
double __exp1(double x, double xx, double error) {
double bexp, t, eps, del, base, y, al, bet, res, rem, cor;
mynumber junk1, junk2, binexp = {0,0};
int4 k,i,j,m,n,ex;
mynumber junk1, junk2, binexp = {{0,0}};
#if 0
int4 k;
#endif
int4 i,j,m,n,ex;
junk1.x = x;
m = junk1.i[HIGH_HALF];

View File

@ -47,7 +47,10 @@ void __mplog(mp_no *, mp_no *, int);
double __ieee754_log(double x) {
#define M 4
static const int pr[M]={8,10,18,32};
int i,j,k,n,ux,dx,p;
int i,j,n,ux,dx,p;
#if 0
int k;
#endif
double dbl_n,u,p0,q,r0,w,nln2a,luai,lubi,lvaj,lvbj,
sij,ssij,ttij,A,B,B0,y,y1,y2,polI,polII,sa,sb,
t1,t2,t3,t4,t5,t6,t7,t8,t,ra,rb,ww,
@ -190,7 +193,7 @@ double __ieee754_log(double x) {
__mplog(&mpx,&mpy,p);
dbl_mp(e[i].d,&mperr,p);
add(&mpy,&mperr,&mpy1,p); sub(&mpy,&mperr,&mpy2,p);
mp_dbl(&mpy1,&y1,p); mp_dbl(&mpy2,&y2,p);
__mp_dbl(&mpy1,&y1,p); __mp_dbl(&mpy2,&y2,p);
if (y1==y2) return y1;
}
return y1;

View File

@ -54,7 +54,10 @@ static int checkint(double x);
/* it computes the correctly rounded (to nearest) value of X^y. */
/***************************************************************************/
double __ieee754_upow(double x, double y) {
double z,a,aa,error, t,a1,a2,y1,y2,gor=1.0;
double z,a,aa,error, t,a1,a2,y1,y2;
#if 0
double gor=1.0;
#endif
mynumber u,v;
int k;
int4 qx,qy;
@ -154,8 +157,14 @@ static double power1(double x, double y) {
/* The result is bounded by error (rightmost argument) */
/****************************************************************************/
static double log1(double x, double *delta, double *error) {
int i,j,m,n;
double uu,vv,eps,nx,e,e1,e2,t,t1,t2,res,cor,add=0;
int i,j,m;
#if 0
int n;
#endif
double uu,vv,eps,nx,e,e1,e2,t,t1,t2,res,add=0;
#if 0
double cor;
#endif
mynumber u,v;
u.x = x;
@ -231,8 +240,14 @@ static double log1(double x, double *delta, double *error) {
/* The result is bounded by error (right argument) */
/****************************************************************************/
static double log2(double x, double *delta, double *error) {
int i,j,m,n;
double uu,vv,eps,nx,e,e1,e2,t,t1,t2,res,cor,add=0;
int i,j,m;
#if 0
int n;
#endif
double uu,vv,eps,nx,e,e1,e2,t,t1,t2,res,add=0;
#if 0
double cor;
#endif
double ou1,ou2,lu1,lu2,ov,lv1,lv2,a,a1,a2;
double y,yy,z,zz,j1,j2,j3,j4,j5,j6,j7,j8;
mynumber u,v;
@ -308,7 +323,10 @@ static double log2(double x, double *delta, double *error) {
/**********************************************************************/
static int checkint(double x) {
union {int4 i[2]; double x;} u;
int k,l,m,n;
int k,m,n;
#if 0
int l;
#endif
u.x = x;
m = u.i[HIGH_HALF]&0x7fffffff; /* no sign */
if (m >= 0x7ff00000) return 0; /* x is +/-inf or NaN */

View File

@ -40,9 +40,15 @@
/**************************************************************************/
double __ieee754_remainder(double x, double y)
{
double z,d,xx,yy;
int4 kx,ky,m,n,nn,n1,m1,l;
mynumber u,t,w={0,0},v={0,0},ww={0,0},r;
double z,d,xx;
#if 0
double yy;
#endif
int4 kx,ky,n,nn,n1,m1,l;
#if 0
int4 m;
#endif
mynumber u,t,w={{0,0}},v={{0,0}},ww={{0,0}},r;
u.x=x;
t.x=y;
kx=u.i[HIGH_HALF]&0x7fffffff; /* no sign for x*/

View File

@ -1,10 +1,14 @@
#include <endian.h>
#if __FLOAT_WORD_ORDER == __BIG_ENDIAN
#define BIG_ENDI 1
#undef LITTLE_ENDI
#define HIGH_HALF 0
#define LOW_HALF 1
#else
#if __FLOAT_WORD_ORDER == __LITTLE_ENDIAN
#undef BIG_ENDI
#define LITTLE_ENDI 1
#define HIGH_HALF 1
#define LOW_HALF 0
#endif

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: mpa.c */
@ -123,10 +123,13 @@ void cpymn(const mp_no *x, int m, mp_no *y, int n) {
/* Convert a multiple precision number *x into a double precision */
/* number *y, normalized case (|x| >= 2**(-1022))) */
static void norm(const mp_no *x, double *y, int p)
{
static void norm(const mp_no *x, double *y, int p)
{
#define R radixi.d
int i,k;
int i;
#if 0
int k;
#endif
double a,c,u,v,z[5];
if (p<5) {
if (p==1) c = X[1];
@ -135,7 +138,7 @@ static void norm(const mp_no *x, double *y, int p)
else if (p==4) c =(X[1] + R* X[2]) + R*R*(X[3] + R*X[4]);
}
else {
for (a=ONE, z[1]=X[1]; z[1] < TWO23; )
for (a=ONE, z[1]=X[1]; z[1] < TWO23; )
{a *= TWO; z[1] *= TWO; }
for (i=2; i<5; i++) {
@ -175,10 +178,13 @@ static void norm(const mp_no *x, double *y, int p)
/* Convert a multiple precision number *x into a double precision */
/* number *y, denormalized case (|x| < 2**(-1022))) */
static void denorm(const mp_no *x, double *y, int p)
{
static void denorm(const mp_no *x, double *y, int p)
{
int i,k;
double a,c,u,v,z[5];
double c,u,z[5];
#if 0
double a,v;
#endif
#define R radixi.d
if (EX<-44 || (EX==-44 && X[1]<TWO5))
@ -222,10 +228,11 @@ static void denorm(const mp_no *x, double *y, int p)
/* Convert a multiple precision number *x into a double precision number *y. */
/* The result is correctly rounded to the nearest/even. *x is left unchanged */
void mp_dbl(const mp_no *x, double *y, int p) {
void __mp_dbl(const mp_no *x, double *y, int p) {
#if 0
int i,k;
double a,c,u,v,z[5];
#endif
if (X[0] == ZERO) {*y = ZERO; return; }
@ -458,17 +465,20 @@ void mul(const mp_no *x, const mp_no *y, mp_no *z, int p) {
/* *x=0 is not permissible. *x is left unchanged. */
void inv(const mp_no *x, mp_no *y, int p) {
int i,l;
int i;
#if 0
int l;
#endif
double t;
mp_no z,w;
static const int np1[] = {0,0,0,0,1,2,2,2,2,3,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4};
const mp_no mptwo = {1,1.0,2.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
const mp_no mptwo = {1,{1.0,2.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,};
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
cpy(x,&z,p); z.e=0; mp_dbl(&z,&t,p);
cpy(x,&z,p); z.e=0; __mp_dbl(&z,&t,p);
t=ONE/t; dbl_mp(t,y,p); EY -= EX;
for (i=0; i<np1[p]; i++) {
@ -494,4 +504,3 @@ void dvd(const mp_no *x, const mp_no *y, mp_no *z, int p) {
else {inv(y,&w,p); mul(x,&w,z,p);}
return;
}

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: mpa.h */
@ -69,11 +69,10 @@ int acr(const mp_no *, const mp_no *, int);
int cr(const mp_no *, const mp_no *, int);
void cpy(const mp_no *, mp_no *, int);
void cpymn(const mp_no *, int, mp_no *, int);
void mp_dbl(const mp_no *, double *, int);
void __mp_dbl(const mp_no *, double *, int);
void dbl_mp(double, mp_no *, int);
void add(const mp_no *, const mp_no *, mp_no *, int);
void sub(const mp_no *, const mp_no *, mp_no *, int);
void mul(const mp_no *, const mp_no *, mp_no *, int);
void inv(const mp_no *, mp_no *, int);
void dvd(const mp_no *, const mp_no *, mp_no *, int);

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,15 +15,15 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**************************************************************************/
/* */
/* */
/* MODULE_NAME:mpa2.h */
/* */
/* */
/* variables prototype and definition according to type of processor */
/* types definition */
/* types definition */
/**************************************************************************/
#ifndef MPA2_H
@ -32,42 +32,42 @@
#ifdef BIG_ENDI
static const number
/**/ radix = {0x41700000, 0x00000000, }, /* 2**24 */
/**/ radixi = {0x3e700000, 0x00000000, }, /* 2**-24 */
/**/ cutter = {0x44b00000, 0x00000000, }, /* 2**76 */
/**/ zero = {0x00000000, 0x00000000, }, /* 0 */
/**/ one = {0x3ff00000, 0x00000000, }, /* 1 */
/**/ mone = {0xbff00000, 0x00000000, }, /* -1 */
/**/ two = {0x40000000, 0x00000000, }, /* 2 */
/**/ two5 = {0x40400000, 0x00000000, }, /* 2**5 */
/**/ two10 = {0x40900000, 0x00000000, }, /* 2**10 */
/**/ two18 = {0x41100000, 0x00000000, }, /* 2**18 */
/**/ two19 = {0x41200000, 0x00000000, }, /* 2**19 */
/**/ two23 = {0x41600000, 0x00000000, }, /* 2**23 */
/**/ two52 = {0x43300000, 0x00000000, }, /* 2**52 */
/**/ two57 = {0x43800000, 0x00000000, }, /* 2**57 */
/**/ two71 = {0x44600000, 0x00000000, }, /* 2**71 */
/**/ twom1032 = {0x00000400, 0x00000000, }; /* 2**-1032 */
/**/ radix = {{0x41700000, 0x00000000} }, /* 2**24 */
/**/ radixi = {{0x3e700000, 0x00000000} }, /* 2**-24 */
/**/ cutter = {{0x44b00000, 0x00000000} }, /* 2**76 */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ mone = {{0xbff00000, 0x00000000} }, /* -1 */
/**/ two = {{0x40000000, 0x00000000} }, /* 2 */
/**/ two5 = {{0x40400000, 0x00000000} }, /* 2**5 */
/**/ two10 = {{0x40900000, 0x00000000} }, /* 2**10 */
/**/ two18 = {{0x41100000, 0x00000000} }, /* 2**18 */
/**/ two19 = {{0x41200000, 0x00000000} }, /* 2**19 */
/**/ two23 = {{0x41600000, 0x00000000} }, /* 2**23 */
/**/ two52 = {{0x43300000, 0x00000000} }, /* 2**52 */
/**/ two57 = {{0x43800000, 0x00000000} }, /* 2**57 */
/**/ two71 = {{0x44600000, 0x00000000} }, /* 2**71 */
/**/ twom1032 = {{0x00000400, 0x00000000} }; /* 2**-1032 */
#else
#ifdef LITTLE_ENDI
static const number
/**/ radix = {0x00000000, 0x41700000, }, /* 2**24 */
/**/ radixi = {0x00000000, 0x3e700000, }, /* 2**-24 */
/**/ cutter = {0x00000000, 0x44b00000, }, /* 2**76 */
/**/ zero = {0x00000000, 0x00000000, }, /* 0 */
/**/ one = {0x00000000, 0x3ff00000, }, /* 1 */
/**/ mone = {0x00000000, 0xbff00000, }, /* -1 */
/**/ two = {0x00000000, 0x40000000, }, /* 2 */
/**/ two5 = {0x00000000, 0x40400000, }, /* 2**5 */
/**/ two10 = {0x00000000, 0x40900000, }, /* 2**10 */
/**/ two18 = {0x00000000, 0x41100000, }, /* 2**18 */
/**/ two19 = {0x00000000, 0x41200000, }, /* 2**19 */
/**/ two23 = {0x00000000, 0x41600000, }, /* 2**23 */
/**/ two52 = {0x00000000, 0x43300000, }, /* 2**52 */
/**/ two57 = {0x00000000, 0x43800000, }, /* 2**57 */
/**/ two71 = {0x00000000, 0x44600000, }, /* 2**71 */
/**/ twom1032 = {0x00000000, 0x00000400, }; /* 2**-1032 */
/**/ radix = {{0x00000000, 0x41700000} }, /* 2**24 */
/**/ radixi = {{0x00000000, 0x3e700000} }, /* 2**-24 */
/**/ cutter = {{0x00000000, 0x44b00000} }, /* 2**76 */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ mone = {{0x00000000, 0xbff00000} }, /* -1 */
/**/ two = {{0x00000000, 0x40000000} }, /* 2 */
/**/ two5 = {{0x00000000, 0x40400000} }, /* 2**5 */
/**/ two10 = {{0x00000000, 0x40900000} }, /* 2**10 */
/**/ two18 = {{0x00000000, 0x41100000} }, /* 2**18 */
/**/ two19 = {{0x00000000, 0x41200000} }, /* 2**19 */
/**/ two23 = {{0x00000000, 0x41600000} }, /* 2**23 */
/**/ two52 = {{0x00000000, 0x43300000} }, /* 2**52 */
/**/ two57 = {{0x00000000, 0x43800000} }, /* 2**57 */
/**/ two71 = {{0x00000000, 0x44600000} }, /* 2**71 */
/**/ twom1032 = {{0x00000000, 0x00000400} }; /* 2**-1032 */
#endif
#endif

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
@ -35,36 +35,36 @@
#include "mpa.h"
void mpsqrt(mp_no *, mp_no *, int);
void mpatan(mp_no *x, mp_no *y, int p) {
void mpatan(mp_no *x, mp_no *y, int p) {
#include "mpatan.h"
int i,m,n;
double dx;
mp_no
mpone = {0, 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
mpone = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,},
mptwo = {0, 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}},
mptwo = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,},
mptwoim1 = {0, 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}},
mptwoim1 = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,};
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mps,mpsm,mpt,mpt1,mpt2,mpt3;
/* Choose m and initiate mpone, mptwo & mptwoim1 */
if (EX>0) m=7;
else if (EX<0) m=0;
else {
mp_dbl(x,&dx,p); dx=ABS(dx);
for (m=6; m>0; m--)
{if (dx>xm[m].d) break;}
__mp_dbl(x,&dx,p); dx=ABS(dx);
for (m=6; m>0; m--)
{if (dx>xm[m].d) break;}
}
mpone.e = mptwo.e = mptwoim1.e = 1;
mpone.d[0] = mpone.d[1] = mptwo.d[0] = mptwoim1.d[0] = ONE;
mptwo.d[1] = TWO;
/* Reduce x m times */
mul(x,x,&mpsm,p);
if (m==0) cpy(x,&mps,p);
@ -92,10 +92,10 @@ void mpatan(mp_no *x, mp_no *y, int p) {
}
mul(&mps,&mpt,&mpt1,p);
sub(&mps,&mpt1,&mpt,p);
/* Compute Atan(x) */
mptwoim1.d[1] = twom[m].d;
mul(&mptwoim1,&mpt,y,p);
return;
}

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
@ -30,134 +30,134 @@
#ifdef BIG_ENDI
static const number
xm[8] = { /* x[m] */
/**/ {0x00000000, 0x00000000, }, /* 0.0 */
/**/ {0x3f8930be, 0x00000000, }, /* 0.0123 */
/**/ {0x3f991687, 0x00000000, }, /* 0.0245 */
/**/ {0x3fa923a2, 0x00000000, }, /* 0.0491 */
/**/ {0x3fb930be, 0x00000000, }, /* 0.0984 */
/**/ {0x3fc95810, 0x00000000, }, /* 0.198 */
/**/ {0x3fda7ef9, 0x00000000, }, /* 0.414 */
/**/ {0x3ff00000, 0x00000000, }, /* 1.0 */
/**/ {{0x00000000, 0x00000000} }, /* 0.0 */
/**/ {{0x3f8930be, 0x00000000} }, /* 0.0123 */
/**/ {{0x3f991687, 0x00000000} }, /* 0.0245 */
/**/ {{0x3fa923a2, 0x00000000} }, /* 0.0491 */
/**/ {{0x3fb930be, 0x00000000} }, /* 0.0984 */
/**/ {{0x3fc95810, 0x00000000} }, /* 0.198 */
/**/ {{0x3fda7ef9, 0x00000000} }, /* 0.414 */
/**/ {{0x3ff00000, 0x00000000} }, /* 1.0 */
};
static const number
twonm1[33] = { /* 2n-1 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x40260000, 0x00000000, }, /* 11 */
/**/ {0x402e0000, 0x00000000, }, /* 15 */
/**/ {0x40330000, 0x00000000, }, /* 19 */
/**/ {0x40350000, 0x00000000, }, /* 21 */
/**/ {0x40390000, 0x00000000, }, /* 25 */
/**/ {0x403d0000, 0x00000000, }, /* 29 */
/**/ {0x40408000, 0x00000000, }, /* 33 */
/**/ {0x40428000, 0x00000000, }, /* 37 */
/**/ {0x40448000, 0x00000000, }, /* 41 */
/**/ {0x40468000, 0x00000000, }, /* 45 */
/**/ {0x40488000, 0x00000000, }, /* 49 */
/**/ {0x404a8000, 0x00000000, }, /* 53 */
/**/ {0x404b8000, 0x00000000, }, /* 55 */
/**/ {0x404d8000, 0x00000000, }, /* 59 */
/**/ {0x404f8000, 0x00000000, }, /* 63 */
/**/ {0x4050c000, 0x00000000, }, /* 67 */
/**/ {0x4051c000, 0x00000000, }, /* 71 */
/**/ {0x4052c000, 0x00000000, }, /* 75 */
/**/ {0x4053c000, 0x00000000, }, /* 79 */
/**/ {0x4054c000, 0x00000000, }, /* 83 */
/**/ {0x40554000, 0x00000000, }, /* 85 */
/**/ {0x40564000, 0x00000000, }, /* 89 */
/**/ {0x40574000, 0x00000000, }, /* 93 */
/**/ {0x40584000, 0x00000000, }, /* 97 */
/**/ {0x40594000, 0x00000000, }, /* 101 */
/**/ {0x405a4000, 0x00000000, }, /* 105 */
/**/ {0x405b4000, 0x00000000, }, /* 109 */
/**/ {0x405c4000, 0x00000000, }, /* 113 */
/**/ {0x405d4000, 0x00000000, }, /* 117 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x40260000, 0x00000000} }, /* 11 */
/**/ {{0x402e0000, 0x00000000} }, /* 15 */
/**/ {{0x40330000, 0x00000000} }, /* 19 */
/**/ {{0x40350000, 0x00000000} }, /* 21 */
/**/ {{0x40390000, 0x00000000} }, /* 25 */
/**/ {{0x403d0000, 0x00000000} }, /* 29 */
/**/ {{0x40408000, 0x00000000} }, /* 33 */
/**/ {{0x40428000, 0x00000000} }, /* 37 */
/**/ {{0x40448000, 0x00000000} }, /* 41 */
/**/ {{0x40468000, 0x00000000} }, /* 45 */
/**/ {{0x40488000, 0x00000000} }, /* 49 */
/**/ {{0x404a8000, 0x00000000} }, /* 53 */
/**/ {{0x404b8000, 0x00000000} }, /* 55 */
/**/ {{0x404d8000, 0x00000000} }, /* 59 */
/**/ {{0x404f8000, 0x00000000} }, /* 63 */
/**/ {{0x4050c000, 0x00000000} }, /* 67 */
/**/ {{0x4051c000, 0x00000000} }, /* 71 */
/**/ {{0x4052c000, 0x00000000} }, /* 75 */
/**/ {{0x4053c000, 0x00000000} }, /* 79 */
/**/ {{0x4054c000, 0x00000000} }, /* 83 */
/**/ {{0x40554000, 0x00000000} }, /* 85 */
/**/ {{0x40564000, 0x00000000} }, /* 89 */
/**/ {{0x40574000, 0x00000000} }, /* 93 */
/**/ {{0x40584000, 0x00000000} }, /* 97 */
/**/ {{0x40594000, 0x00000000} }, /* 101 */
/**/ {{0x405a4000, 0x00000000} }, /* 105 */
/**/ {{0x405b4000, 0x00000000} }, /* 109 */
/**/ {{0x405c4000, 0x00000000} }, /* 113 */
/**/ {{0x405d4000, 0x00000000} }, /* 117 */
};
static const number
twom[8] = { /* 2**m */
/**/ {0x3ff00000, 0x00000000, }, /* 1.0 */
/**/ {0x40000000, 0x00000000, }, /* 2.0 */
/**/ {0x40100000, 0x00000000, }, /* 4.0 */
/**/ {0x40200000, 0x00000000, }, /* 8.0 */
/**/ {0x40300000, 0x00000000, }, /* 16.0 */
/**/ {0x40400000, 0x00000000, }, /* 32.0 */
/**/ {0x40500000, 0x00000000, }, /* 64.0 */
/**/ {0x40600000, 0x00000000, }, /* 128.0 */
/**/ {{0x3ff00000, 0x00000000} }, /* 1.0 */
/**/ {{0x40000000, 0x00000000} }, /* 2.0 */
/**/ {{0x40100000, 0x00000000} }, /* 4.0 */
/**/ {{0x40200000, 0x00000000} }, /* 8.0 */
/**/ {{0x40300000, 0x00000000} }, /* 16.0 */
/**/ {{0x40400000, 0x00000000} }, /* 32.0 */
/**/ {{0x40500000, 0x00000000} }, /* 64.0 */
/**/ {{0x40600000, 0x00000000} }, /* 128.0 */
};
static const number
/**/ one = {0x3ff00000, 0x00000000, }, /* 1 */
/**/ two = {0x40000000, 0x00000000, }; /* 2 */
/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ two = {{0x40000000, 0x00000000} }; /* 2 */
#else
#ifdef LITTLE_ENDI
static const number
xm[8] = { /* x[m] */
/**/ {0x00000000, 0x00000000, }, /* 0.0 */
/**/ {0x00000000, 0x3f8930be, }, /* 0.0123 */
/**/ {0x00000000, 0x3f991687, }, /* 0.0245 */
/**/ {0x00000000, 0x3fa923a2, }, /* 0.0491 */
/**/ {0x00000000, 0x3fb930be, }, /* 0.0984 */
/**/ {0x00000000, 0x3fc95810, }, /* 0.198 */
/**/ {0x00000000, 0x3fda7ef9, }, /* 0.414 */
/**/ {0x00000000, 0x3ff00000, }, /* 1.0 */
/**/ {{0x00000000, 0x00000000} }, /* 0.0 */
/**/ {{0x00000000, 0x3f8930be} }, /* 0.0123 */
/**/ {{0x00000000, 0x3f991687} }, /* 0.0245 */
/**/ {{0x00000000, 0x3fa923a2} }, /* 0.0491 */
/**/ {{0x00000000, 0x3fb930be} }, /* 0.0984 */
/**/ {{0x00000000, 0x3fc95810} }, /* 0.198 */
/**/ {{0x00000000, 0x3fda7ef9} }, /* 0.414 */
/**/ {{0x00000000, 0x3ff00000} }, /* 1.0 */
};
static const number
twonm1[33] = { /* 2n-1 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x00000000, 0x40260000, }, /* 11 */
/**/ {0x00000000, 0x402e0000, }, /* 15 */
/**/ {0x00000000, 0x40330000, }, /* 19 */
/**/ {0x00000000, 0x40350000, }, /* 21 */
/**/ {0x00000000, 0x40390000, }, /* 25 */
/**/ {0x00000000, 0x403d0000, }, /* 29 */
/**/ {0x00000000, 0x40408000, }, /* 33 */
/**/ {0x00000000, 0x40428000, }, /* 37 */
/**/ {0x00000000, 0x40448000, }, /* 41 */
/**/ {0x00000000, 0x40468000, }, /* 45 */
/**/ {0x00000000, 0x40488000, }, /* 49 */
/**/ {0x00000000, 0x404a8000, }, /* 53 */
/**/ {0x00000000, 0x404b8000, }, /* 55 */
/**/ {0x00000000, 0x404d8000, }, /* 59 */
/**/ {0x00000000, 0x404f8000, }, /* 63 */
/**/ {0x00000000, 0x4050c000, }, /* 67 */
/**/ {0x00000000, 0x4051c000, }, /* 71 */
/**/ {0x00000000, 0x4052c000, }, /* 75 */
/**/ {0x00000000, 0x4053c000, }, /* 79 */
/**/ {0x00000000, 0x4054c000, }, /* 83 */
/**/ {0x00000000, 0x40554000, }, /* 85 */
/**/ {0x00000000, 0x40564000, }, /* 89 */
/**/ {0x00000000, 0x40574000, }, /* 93 */
/**/ {0x00000000, 0x40584000, }, /* 97 */
/**/ {0x00000000, 0x40594000, }, /* 101 */
/**/ {0x00000000, 0x405a4000, }, /* 105 */
/**/ {0x00000000, 0x405b4000, }, /* 109 */
/**/ {0x00000000, 0x405c4000, }, /* 113 */
/**/ {0x00000000, 0x405d4000, }, /* 117 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x40260000} }, /* 11 */
/**/ {{0x00000000, 0x402e0000} }, /* 15 */
/**/ {{0x00000000, 0x40330000} }, /* 19 */
/**/ {{0x00000000, 0x40350000} }, /* 21 */
/**/ {{0x00000000, 0x40390000} }, /* 25 */
/**/ {{0x00000000, 0x403d0000} }, /* 29 */
/**/ {{0x00000000, 0x40408000} }, /* 33 */
/**/ {{0x00000000, 0x40428000} }, /* 37 */
/**/ {{0x00000000, 0x40448000} }, /* 41 */
/**/ {{0x00000000, 0x40468000} }, /* 45 */
/**/ {{0x00000000, 0x40488000} }, /* 49 */
/**/ {{0x00000000, 0x404a8000} }, /* 53 */
/**/ {{0x00000000, 0x404b8000} }, /* 55 */
/**/ {{0x00000000, 0x404d8000} }, /* 59 */
/**/ {{0x00000000, 0x404f8000} }, /* 63 */
/**/ {{0x00000000, 0x4050c000} }, /* 67 */
/**/ {{0x00000000, 0x4051c000} }, /* 71 */
/**/ {{0x00000000, 0x4052c000} }, /* 75 */
/**/ {{0x00000000, 0x4053c000} }, /* 79 */
/**/ {{0x00000000, 0x4054c000} }, /* 83 */
/**/ {{0x00000000, 0x40554000} }, /* 85 */
/**/ {{0x00000000, 0x40564000} }, /* 89 */
/**/ {{0x00000000, 0x40574000} }, /* 93 */
/**/ {{0x00000000, 0x40584000} }, /* 97 */
/**/ {{0x00000000, 0x40594000} }, /* 101 */
/**/ {{0x00000000, 0x405a4000} }, /* 105 */
/**/ {{0x00000000, 0x405b4000} }, /* 109 */
/**/ {{0x00000000, 0x405c4000} }, /* 113 */
/**/ {{0x00000000, 0x405d4000} }, /* 117 */
};
static const number
twom[8] = { /* 2**m */
/**/ {0x00000000, 0x3ff00000, }, /* 1.0 */
/**/ {0x00000000, 0x40000000, }, /* 2.0 */
/**/ {0x00000000, 0x40100000, }, /* 4.0 */
/**/ {0x00000000, 0x40200000, }, /* 8.0 */
/**/ {0x00000000, 0x40300000, }, /* 16.0 */
/**/ {0x00000000, 0x40400000, }, /* 32.0 */
/**/ {0x00000000, 0x40500000, }, /* 64.0 */
/**/ {0x00000000, 0x40600000, }, /* 128.0 */
/**/ {{0x00000000, 0x3ff00000} }, /* 1.0 */
/**/ {{0x00000000, 0x40000000} }, /* 2.0 */
/**/ {{0x00000000, 0x40100000} }, /* 4.0 */
/**/ {{0x00000000, 0x40200000} }, /* 8.0 */
/**/ {{0x00000000, 0x40300000} }, /* 16.0 */
/**/ {{0x00000000, 0x40400000} }, /* 32.0 */
/**/ {{0x00000000, 0x40500000} }, /* 64.0 */
/**/ {{0x00000000, 0x40600000} }, /* 128.0 */
};
static const number
/**/ one = {0x00000000, 0x3ff00000, }, /* 1 */
/**/ two = {0x00000000, 0x40000000, }; /* 2 */
/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ two = {{0x00000000, 0x40000000} }; /* 2 */
#endif
#endif
@ -168,5 +168,5 @@
static const int
np[33] = { 0, 0, 0, 0, 6, 8,10,11,13,15,17,19,21,23,25,27,28,
30,32,34,36,38,40,42,43,45,47,49,51,53,55,57,59};
#endif

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* MODULE_NAME: mpatan2.c */
@ -46,11 +46,11 @@ void mpatan2(mp_no *y, mp_no *x, mp_no *z, int p) {
static const double ZERO = 0.0, ONE = 1.0;
mp_no mpone = {0, 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
mp_no mpone = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,};
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mpt1,mpt2,mpt3;
if (X[0] <= ZERO) {
mpone.e = 1; mpone.d[0] = mpone.d[1] = ONE;

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*************************************************************************/
/* MODULE_NAME:mpexp.c */
@ -51,12 +51,12 @@ void mpexp(mp_no *x, mp_no *y, int p) {
{ 0, 0, 0, 0, 0, 0,23,28,33,38,42,47,52,57,62,66, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0, 0,27, 0, 0,39,43,47,51,55,59,63},
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,43,47,50,54}};
mp_no mpone = {0, 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
mp_no mpone = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,};
mp_no mpk = {0, 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mpk = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,};
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mps,mpak,mpt1,mpt2;
/* Choose m,n and compute a=2**(-m) */
@ -102,4 +102,3 @@ void mpexp(mp_no *x, mp_no *y, int p) {
else cpy(&mpt2,y,p);
return;
}

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
@ -30,119 +30,119 @@
#ifdef BIG_ENDI
static const number
twomm1[33] = { /* 2**-m1 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x3ee00000, 0x00000000, }, /* 2**-17 */
/**/ {0x3e800000, 0x00000000, }, /* 2**-23 */
/**/ {0x3e800000, 0x00000000, }, /* 2**-23 */
/**/ {0x3e300000, 0x00000000, }, /* 2**-28 */
/**/ {0x3e400000, 0x00000000, }, /* 2**-27 */
/**/ {0x3d900000, 0x00000000, }, /* 2**-38 */
/**/ {0x3d500000, 0x00000000, }, /* 2**-42 */
/**/ {0x3d800000, 0x00000000, }, /* 2**-39 */
/**/ {0x3d400000, 0x00000000, }, /* 2**-43 */
/**/ {0x3d000000, 0x00000000, }, /* 2**-47 */
/**/ {0x3d400000, 0x00000000, }, /* 2**-43 */
/**/ {0x3d000000, 0x00000000, }, /* 2**-47 */
/**/ {0x3cd00000, 0x00000000, }, /* 2**-50 */
/**/ {0x3c900000, 0x00000000, }, /* 2**-54 */
/**/ {0x3c600000, 0x00000000, }, /* 2**-57 */
/**/ {0x3c300000, 0x00000000, }, /* 2**-60 */
/**/ {0x3bf00000, 0x00000000, }, /* 2**-64 */
/**/ {0x3bc00000, 0x00000000, }, /* 2**-67 */
/**/ {0x3b800000, 0x00000000, }, /* 2**-71 */
/**/ {0x3b500000, 0x00000000, }, /* 2**-74 */
/**/ {0x3bb00000, 0x00000000, }, /* 2**-68 */
/**/ {0x3b800000, 0x00000000, }, /* 2**-71 */
/**/ {0x3b500000, 0x00000000, }, /* 2**-74 */
/**/ {0x3b200000, 0x00000000, }, /* 2**-77 */
/**/ {0x3b900000, 0x00000000, }, /* 2**-70 */
/**/ {0x3b600000, 0x00000000, }, /* 2**-73 */
/**/ {0x3b300000, 0x00000000, }, /* 2**-76 */
/**/ {0x3b100000, 0x00000000, }, /* 2**-78 */
/**/ {0x3ae00000, 0x00000000, }, /* 2**-81 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x3ee00000, 0x00000000} }, /* 2**-17 */
/**/ {{0x3e800000, 0x00000000} }, /* 2**-23 */
/**/ {{0x3e800000, 0x00000000} }, /* 2**-23 */
/**/ {{0x3e300000, 0x00000000} }, /* 2**-28 */
/**/ {{0x3e400000, 0x00000000} }, /* 2**-27 */
/**/ {{0x3d900000, 0x00000000} }, /* 2**-38 */
/**/ {{0x3d500000, 0x00000000} }, /* 2**-42 */
/**/ {{0x3d800000, 0x00000000} }, /* 2**-39 */
/**/ {{0x3d400000, 0x00000000} }, /* 2**-43 */
/**/ {{0x3d000000, 0x00000000} }, /* 2**-47 */
/**/ {{0x3d400000, 0x00000000} }, /* 2**-43 */
/**/ {{0x3d000000, 0x00000000} }, /* 2**-47 */
/**/ {{0x3cd00000, 0x00000000} }, /* 2**-50 */
/**/ {{0x3c900000, 0x00000000} }, /* 2**-54 */
/**/ {{0x3c600000, 0x00000000} }, /* 2**-57 */
/**/ {{0x3c300000, 0x00000000} }, /* 2**-60 */
/**/ {{0x3bf00000, 0x00000000} }, /* 2**-64 */
/**/ {{0x3bc00000, 0x00000000} }, /* 2**-67 */
/**/ {{0x3b800000, 0x00000000} }, /* 2**-71 */
/**/ {{0x3b500000, 0x00000000} }, /* 2**-74 */
/**/ {{0x3bb00000, 0x00000000} }, /* 2**-68 */
/**/ {{0x3b800000, 0x00000000} }, /* 2**-71 */
/**/ {{0x3b500000, 0x00000000} }, /* 2**-74 */
/**/ {{0x3b200000, 0x00000000} }, /* 2**-77 */
/**/ {{0x3b900000, 0x00000000} }, /* 2**-70 */
/**/ {{0x3b600000, 0x00000000} }, /* 2**-73 */
/**/ {{0x3b300000, 0x00000000} }, /* 2**-76 */
/**/ {{0x3b100000, 0x00000000} }, /* 2**-78 */
/**/ {{0x3ae00000, 0x00000000} }, /* 2**-81 */
};
static const number
nn[9]={ /* n */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x3ff00000, 0x00000000, }, /* 1 */
/**/ {0x40000000, 0x00000000, }, /* 2 */
/**/ {0x40080000, 0x00000000, }, /* 3 */
/**/ {0x40100000, 0x00000000, }, /* 4 */
/**/ {0x40140000, 0x00000000, }, /* 5 */
/**/ {0x40180000, 0x00000000, }, /* 6 */
/**/ {0x401c0000, 0x00000000, }, /* 7 */
/**/ {0x40200000, 0x00000000, }, /* 8 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ {{0x40000000, 0x00000000} }, /* 2 */
/**/ {{0x40080000, 0x00000000} }, /* 3 */
/**/ {{0x40100000, 0x00000000} }, /* 4 */
/**/ {{0x40140000, 0x00000000} }, /* 5 */
/**/ {{0x40180000, 0x00000000} }, /* 6 */
/**/ {{0x401c0000, 0x00000000} }, /* 7 */
/**/ {{0x40200000, 0x00000000} }, /* 8 */
};
static const number
/**/ radix = {0x41700000, 0x00000000, }, /* 2**24 */
/**/ radixi = {0x3e700000, 0x00000000, }, /* 2**-24 */
/**/ zero = {0x00000000, 0x00000000, }, /* 0 */
/**/ one = {0x3ff00000, 0x00000000, }, /* 1 */
/**/ two = {0x40000000, 0x00000000, }, /* 2 */
/**/ half = {0x3fe00000, 0x00000000, }; /* 1/2 */
/**/ radix = {{0x41700000, 0x00000000} }, /* 2**24 */
/**/ radixi = {{0x3e700000, 0x00000000} }, /* 2**-24 */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ two = {{0x40000000, 0x00000000} }, /* 2 */
/**/ half = {{0x3fe00000, 0x00000000} }; /* 1/2 */
#else
#ifdef LITTLE_ENDI
static const number
twomm1[33] = { /* 2**-m1 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x00000000, 0x3ee00000, }, /* 2**-17 */
/**/ {0x00000000, 0x3e800000, }, /* 2**-23 */
/**/ {0x00000000, 0x3e800000, }, /* 2**-23 */
/**/ {0x00000000, 0x3e300000, }, /* 2**-28 */
/**/ {0x00000000, 0x3e400000, }, /* 2**-27 */
/**/ {0x00000000, 0x3d900000, }, /* 2**-38 */
/**/ {0x00000000, 0x3d500000, }, /* 2**-42 */
/**/ {0x00000000, 0x3d800000, }, /* 2**-39 */
/**/ {0x00000000, 0x3d400000, }, /* 2**-43 */
/**/ {0x00000000, 0x3d000000, }, /* 2**-47 */
/**/ {0x00000000, 0x3d400000, }, /* 2**-43 */
/**/ {0x00000000, 0x3d000000, }, /* 2**-47 */
/**/ {0x00000000, 0x3cd00000, }, /* 2**-50 */
/**/ {0x00000000, 0x3c900000, }, /* 2**-54 */
/**/ {0x00000000, 0x3c600000, }, /* 2**-57 */
/**/ {0x00000000, 0x3c300000, }, /* 2**-60 */
/**/ {0x00000000, 0x3bf00000, }, /* 2**-64 */
/**/ {0x00000000, 0x3bc00000, }, /* 2**-67 */
/**/ {0x00000000, 0x3b800000, }, /* 2**-71 */
/**/ {0x00000000, 0x3b500000, }, /* 2**-74 */
/**/ {0x00000000, 0x3bb00000, }, /* 2**-68 */
/**/ {0x00000000, 0x3b800000, }, /* 2**-71 */
/**/ {0x00000000, 0x3b500000, }, /* 2**-74 */
/**/ {0x00000000, 0x3b200000, }, /* 2**-77 */
/**/ {0x00000000, 0x3b900000, }, /* 2**-70 */
/**/ {0x00000000, 0x3b600000, }, /* 2**-73 */
/**/ {0x00000000, 0x3b300000, }, /* 2**-76 */
/**/ {0x00000000, 0x3b100000, }, /* 2**-78 */
/**/ {0x00000000, 0x3ae00000, }, /* 2**-81 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x3ee00000} }, /* 2**-17 */
/**/ {{0x00000000, 0x3e800000} }, /* 2**-23 */
/**/ {{0x00000000, 0x3e800000} }, /* 2**-23 */
/**/ {{0x00000000, 0x3e300000} }, /* 2**-28 */
/**/ {{0x00000000, 0x3e400000} }, /* 2**-27 */
/**/ {{0x00000000, 0x3d900000} }, /* 2**-38 */
/**/ {{0x00000000, 0x3d500000} }, /* 2**-42 */
/**/ {{0x00000000, 0x3d800000} }, /* 2**-39 */
/**/ {{0x00000000, 0x3d400000} }, /* 2**-43 */
/**/ {{0x00000000, 0x3d000000} }, /* 2**-47 */
/**/ {{0x00000000, 0x3d400000} }, /* 2**-43 */
/**/ {{0x00000000, 0x3d000000} }, /* 2**-47 */
/**/ {{0x00000000, 0x3cd00000} }, /* 2**-50 */
/**/ {{0x00000000, 0x3c900000} }, /* 2**-54 */
/**/ {{0x00000000, 0x3c600000} }, /* 2**-57 */
/**/ {{0x00000000, 0x3c300000} }, /* 2**-60 */
/**/ {{0x00000000, 0x3bf00000} }, /* 2**-64 */
/**/ {{0x00000000, 0x3bc00000} }, /* 2**-67 */
/**/ {{0x00000000, 0x3b800000} }, /* 2**-71 */
/**/ {{0x00000000, 0x3b500000} }, /* 2**-74 */
/**/ {{0x00000000, 0x3bb00000} }, /* 2**-68 */
/**/ {{0x00000000, 0x3b800000} }, /* 2**-71 */
/**/ {{0x00000000, 0x3b500000} }, /* 2**-74 */
/**/ {{0x00000000, 0x3b200000} }, /* 2**-77 */
/**/ {{0x00000000, 0x3b900000} }, /* 2**-70 */
/**/ {{0x00000000, 0x3b600000} }, /* 2**-73 */
/**/ {{0x00000000, 0x3b300000} }, /* 2**-76 */
/**/ {{0x00000000, 0x3b100000} }, /* 2**-78 */
/**/ {{0x00000000, 0x3ae00000} }, /* 2**-81 */
};
static const number
nn[9]={ /* n */
/**/ {0x00000000, 0x00000000, }, /* 0 */
/**/ {0x00000000, 0x3ff00000, }, /* 1 */
/**/ {0x00000000, 0x40000000, }, /* 2 */
/**/ {0x00000000, 0x40080000, }, /* 3 */
/**/ {0x00000000, 0x40100000, }, /* 4 */
/**/ {0x00000000, 0x40140000, }, /* 5 */
/**/ {0x00000000, 0x40180000, }, /* 6 */
/**/ {0x00000000, 0x401c0000, }, /* 7 */
/**/ {0x00000000, 0x40200000, }, /* 8 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ {{0x00000000, 0x40000000} }, /* 2 */
/**/ {{0x00000000, 0x40080000} }, /* 3 */
/**/ {{0x00000000, 0x40100000} }, /* 4 */
/**/ {{0x00000000, 0x40140000} }, /* 5 */
/**/ {{0x00000000, 0x40180000} }, /* 6 */
/**/ {{0x00000000, 0x401c0000} }, /* 7 */
/**/ {{0x00000000, 0x40200000} }, /* 8 */
};
static const number
/**/ radix = {0x00000000, 0x41700000, }, /* 2**24 */
/**/ radixi = {0x00000000, 0x3e700000, }, /* 2**-24 */
/**/ zero = {0x00000000, 0x00000000, }, /* 0 */
/**/ one = {0x00000000, 0x3ff00000, }, /* 1 */
/**/ two = {0x00000000, 0x40000000, }, /* 2 */
/**/ half = {0x00000000, 0x3fe00000, }; /* 1/2 */
/**/ radix = {{0x00000000, 0x41700000} }, /* 2**24 */
/**/ radixi = {{0x00000000, 0x3e700000} }, /* 2**-24 */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ two = {{0x00000000, 0x40000000} }, /* 2 */
/**/ half = {{0x00000000, 0x3fe00000} }; /* 1/2 */
#endif
#endif

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* */
@ -41,13 +41,16 @@ void mpexp(mp_no *, mp_no *, int);
void mplog(mp_no *x, mp_no *y, int p) {
#include "mplog.h"
int i,j,k,m,m1,m2,n;
int i,m;
#if 0
int j,k,m1,m2,n;
double a,b;
#endif
static const int mp[33] = {0,0,0,0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,4,4,4,4};
mp_no mpone = {0, 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
mp_no mpone = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,};
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mpt1,mpt2;
/* Choose m and initiate mpone */

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
@ -29,12 +29,12 @@
#ifdef BIG_ENDI
static const number
/**/ one = {0x3ff00000, 0x00000000, }; /* 1 */
/**/ one = {{0x3ff00000, 0x00000000} }; /* 1 */
#else
#ifdef LITTLE_ENDI
static const number
/**/ one = {0x00000000, 0x3ff00000, }; /* 1 */
/**/ one = {{0x00000000, 0x3ff00000} }; /* 1 */
#endif
#endif

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/****************************************************************************/
/* MODULE_NAME:mpsqrt.c */
@ -48,12 +48,12 @@ void mpsqrt(mp_no *x, mp_no *y, int p) {
int i,m,ex,ey;
double dx,dy;
mp_no
mphalf = {0, 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
mphalf = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,},
mp3halfs = {0, 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}},
mp3halfs = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,};
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mpxn,mpz,mpu,mpt1,mpt2;
/* Prepare multi-precision 1/2 and 3/2 */
@ -61,7 +61,7 @@ void mpsqrt(mp_no *x, mp_no *y, int p) {
mp3halfs.e=1; mp3halfs.d[0]=ONE; mp3halfs.d[1]=ONE; mp3halfs.d[2]=HALFRAD;
ex=EX; ey=EX/2; cpy(x,&mpxn,p); mpxn.e -= (ey+ey);
mp_dbl(&mpxn,&dx,p); dy=fastiroot(dx); dbl_mp(dy,&mpu,p);
__mp_dbl(&mpxn,&dx,p); dy=fastiroot(dx); dbl_mp(dy,&mpu,p);
mul(&mpxn,&mphalf,&mpz,p);
m=mp[p];
@ -86,7 +86,7 @@ double fastiroot(double x) {
double y,z, t;
long n;
static const double c0 = 0.99674, c1 = -0.53380, c2 = 0.45472, c3 = -0.21553;
p.d = x;
p.i[HIGH_HALF] = (p.i[HIGH_HALF] & 0x3FFFFFFF ) | 0x3FE00000 ;
q.d = x;

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
@ -29,14 +29,14 @@
#ifdef BIG_ENDI
static const number
/**/ one = {0x3ff00000, 0x00000000, }, /* 1 */
/**/ halfrad = {0x41600000, 0x00000000, }; /* 2**23 */
/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ halfrad = {{0x41600000, 0x00000000} }; /* 2**23 */
#else
#ifdef LITTLE_ENDI
static const number
/**/ one = {0x00000000, 0x3ff00000, }, /* 1 */
/**/ halfrad = {0x00000000, 0x41600000, }; /* 2**23 */
/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ halfrad = {{0x00000000, 0x41600000} }; /* 2**23 */
#endif
#endif

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************/
/* MODULE_NAME:mptan.c */
@ -38,7 +38,7 @@
#include "mpa.h"
int mpranred(double, mp_no *, int);
void c32(mp_no *, mp_no *, mp_no *, int);
void __c32(mp_no *, mp_no *, mp_no *, int);
void mptan(double x, mp_no *mpy, int p) {
@ -48,7 +48,7 @@ void mptan(double x, mp_no *mpy, int p) {
mp_no mpw, mpc, mps;
n = mpranred(x, &mpw, p) & 0x00000001; /* negative or positive result */
c32(&mpw, &mpc, &mps, p); /* computing sin(x) and cos(x) */
__c32(&mpw, &mpc, &mps, p); /* computing sin(x) and cos(x) */
if (n) /* second or fourth quarter of unit circle */
{ dvd(&mpc,&mps,mpy,p);
mpy->d[0] *= MONE;

View File

@ -51,12 +51,19 @@ double atan(double x) {
double cor,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,u,u2,u3,
v,vv,w,ww,y,yy,y1,y2,z,zz;
int i,ux,dx,p;
v,vv,w,ww,y,yy,z,zz;
#if 0
double y1,y2;
#endif
int i,ux,dx;
#if 0
int p;
#endif
static const int pr[M]={6,8,10,32};
number num;
#if 0
mp_no mpt1,mpx,mpy,mpy1,mpy2,mperr;
#endif
num.d = x; ux = num.i[HIGH_HALF]; dx = num.i[LOW_HALF];
@ -210,7 +217,7 @@ for (i=0; i<M; i++) {
dbl_mp(x,&mpx,p); __mpatan(&mpx,&mpy,p);
dbl_mp(u9[i].d,&mpt1,p); mul(&mpy,&mpt1,&mperr,p);
add(&mpy,&mperr,&mpy1,p); sub(&mpy,&mperr,&mpy2,p);
mp_dbl(&mpy1,&y1,p); mp_dbl(&mpy2,&y2,p);
__mp_dbl(&mpy1,&y1,p); __mp_dbl(&mpy2,&y2,p);
if (y1==y2) return y1;
}
return y1; /*if unpossible to do exact computing */

View File

@ -62,10 +62,10 @@ static const double
void dubsin(double x, double dx, double w[]);
void docos(double x, double dx, double w[]);
double mpsin(double x, double dx);
double mpcos(double x, double dx);
double mpsin1(double x);
double mpcos1(double x);
double __mpsin(double x, double dx);
double __mpcos(double x, double dx);
double __mpsin1(double x);
double __mpcos1(double x);
static double slow(double x);
static double slow1(double x);
static double slow2(double x);
@ -85,9 +85,15 @@ static double csloww2(double x, double dx, double orig, int n);
/* it computes the correctly rounded (to nearest) value of sin(x) */
/*******************************************************************/
double sin(double x){
double xx,res,t,cor,y,w[2],s,c,sn,ssn,cs,ccs,xn,a,da,db,eps,xn1,xn2;
double xx,res,t,cor,y,s,c,sn,ssn,cs,ccs,xn,a,da,db,eps,xn1,xn2;
#if 0
double w[2];
#endif
mynumber u,v;
int4 k,m,n,nn;
int4 k,m,n;
#if 0
int4 nn;
#endif
u.x = x;
m = u.i[HIGH_HALF];
@ -590,7 +596,7 @@ static const double th2_36 = 206158430208.0; /* 1.5*2**37 */
else {
dubsin(ABS(x),0,w);
if (w[0] == w[0]+1.000000001*w[1]) return (x>0)?w[0]:-w[0];
else return (x>0)?mpsin(x,0):-mpsin(-x,0);
else return (x>0)?__mpsin(x,0):-__mpsin(-x,0);
}
}
/*******************************************************************************/
@ -627,7 +633,7 @@ static double slow1(double x) {
else {
dubsin(ABS(x),0,w);
if (w[0] == w[0]+1.000000005*w[1]) return (x>0)?w[0]:-w[0];
else return (x>0)?mpsin(x,0):-mpsin(-x,0);
else return (x>0)?__mpsin(x,0):-__mpsin(-x,0);
}
}
/**************************************************************************/
@ -675,7 +681,7 @@ static double slow2(double x) {
y2=(y-y1)-hp1.x;
docos(y1,y2,w);
if (w[0] == w[0]+1.000000005*w[1]) return (x>0)?w[0]:-w[0];
else return (x>0)?mpsin(x,0):-mpsin(-x,0);
else return (x>0)?__mpsin(x,0):-__mpsin(-x,0);
}
}
/***************************************************************************/
@ -722,7 +728,7 @@ static double sloww(double x,double dx, double orig) {
(a>0)? dubsin(a,da,w) : dubsin(-a,-da,w);
cor = (w[1]>0)? 1.000000001*w[1] + ABS(orig)*1.1e-40 : 1.000000001*w[1] - ABS(orig)*1.1e-40;
if (w[0] == w[0]+cor) return (a>0)?w[0]:-w[0];
else return mpsin1(orig);
else return __mpsin1(orig);
}
}
}
@ -765,7 +771,7 @@ static double sloww1(double x, double dx, double orig) {
dubsin(ABS(x),dx,w);
cor = (w[1]>0)? 1.000000005*w[1]+1.1e-30*ABS(orig) : 1.000000005*w[1]-1.1e-30*ABS(orig);
if (w[0] == w[0]+cor) return (x>0)?w[0]:-w[0];
else return mpsin1(orig);
else return __mpsin1(orig);
}
}
/***************************************************************************/
@ -808,7 +814,7 @@ static double sloww2(double x, double dx, double orig, int n) {
docos(ABS(x),dx,w);
cor = (w[1]>0)? 1.000000005*w[1]+1.1e-30*ABS(orig) : 1.000000005*w[1]-1.1e-30*ABS(orig);
if (w[0] == w[0]+cor) return (n&2)?-w[0]:w[0];
else return mpsin1(orig);
else return __mpsin1(orig);
}
}
/***************************************************************************/
@ -821,8 +827,11 @@ static double sloww2(double x, double dx, double orig, int n) {
static double bsloww(double x,double dx, double orig,int n) {
static const double th2_36 = 206158430208.0; /* 1.5*2**37 */
double y,x1,x2,xx,r,t,res,cor,w[2],a,da,xn;
double y,x1,x2,xx,r,t,res,cor,w[2];
#if 0
double a,da,xn;
union {int4 i[2]; double x;} v;
#endif
x1=(x+th2_36)-th2_36;
y = aa.x*x1*x1*x1;
r=x+y;
@ -838,7 +847,7 @@ static double bsloww(double x,double dx, double orig,int n) {
(x>0)? dubsin(x,dx,w) : dubsin(-x,-dx,w);
cor = (w[1]>0)? 1.000000001*w[1] + 1.1e-24 : 1.000000001*w[1] - 1.1e-24;
if (w[0] == w[0]+cor) return (x>0)?w[0]:-w[0];
else return (n&1)?mpcos1(orig):mpsin1(orig);
else return (n&1)?__mpcos1(orig):__mpsin1(orig);
}
}
@ -881,7 +890,7 @@ mynumber u;
dubsin(ABS(x),dx,w);
cor = (w[1]>0)? 1.000000005*w[1]+1.1e-24: 1.000000005*w[1]-1.1e-24;
if (w[0] == w[0]+cor) return (x>0)?w[0]:-w[0];
else return (n&1)?mpcos1(orig):mpsin1(orig);
else return (n&1)?__mpcos1(orig):__mpsin1(orig);
}
}
@ -925,7 +934,7 @@ mynumber u;
docos(ABS(x),dx,w);
cor = (w[1]>0)? 1.000000005*w[1]+1.1e-24 : 1.000000005*w[1]-1.1e-24;
if (w[0] == w[0]+cor) return (n&2)?-w[0]:w[0];
else return (n&1)?mpsin1(orig):mpcos1(orig);
else return (n&1)?__mpsin1(orig):__mpcos1(orig);
}
}
@ -965,7 +974,7 @@ static double cslow2(double x) {
y=ABS(x);
docos(y,0,w);
if (w[0] == w[0]+1.000000005*w[1]) return w[0];
else return mpcos(x,0);
else return __mpcos(x,0);
}
}
@ -1014,7 +1023,7 @@ static double csloww(double x,double dx, double orig) {
(a>0)? dubsin(a,da,w) : dubsin(-a,-da,w);
cor = (w[1]>0)? 1.000000001*w[1] + ABS(orig)*1.1e-40 : 1.000000001*w[1] - ABS(orig)*1.1e-40;
if (w[0] == w[0]+cor) return (a>0)?w[0]:-w[0];
else return mpcos1(orig);
else return __mpcos1(orig);
}
}
}
@ -1058,7 +1067,7 @@ static double csloww1(double x, double dx, double orig) {
dubsin(ABS(x),dx,w);
cor = (w[1]>0)? 1.000000005*w[1]+1.1e-30*ABS(orig) : 1.000000005*w[1]-1.1e-30*ABS(orig);
if (w[0] == w[0]+cor) return (x>0)?w[0]:-w[0];
else return mpcos1(orig);
else return __mpcos1(orig);
}
}
@ -1103,7 +1112,7 @@ static double csloww2(double x, double dx, double orig, int n) {
docos(ABS(x),dx,w);
cor = (w[1]>0)? 1.000000005*w[1]+1.1e-30*ABS(orig) : 1.000000005*w[1]-1.1e-30*ABS(orig);
if (w[0] == w[0]+cor) return (n)?-w[0]:w[0];
else return mpcos1(orig);
else return __mpcos1(orig);
}
}

View File

@ -48,7 +48,10 @@ double tan(double x) {
t,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,w,x2,xn,xx2,y,ya,yya,z0,z,zz,z2,zz2;
int p;
number num,v;
mp_no mpa,mpy,mpt1,mpt2;
mp_no mpa,mpt1,mpt2;
#if 0
mp_no mpy;
#endif
int branred(double, double *, double *);
int mpranred(double, mp_no *, int);
@ -382,8 +385,8 @@ double tan(double x) {
/* Second stage */
/* Reduction by algorithm iv */
p=10; n = (mpranred(x,&mpa,p)) & 0x00000001;
mp_dbl(&mpa,&a,p); dbl_mp(a,&mpt1,p);
sub(&mpa,&mpt1,&mpt2,p); mp_dbl(&mpt2,&da,p);
__mp_dbl(&mpa,&a,p); dbl_mp(a,&mpt1,p);
sub(&mpa,&mpt1,&mpt2,p); __mp_dbl(&mpt2,&da,p);
MUL2(a,da,a,da,x2,xx2,t1,t2,t3,t4,t5,t6,t7,t8)
c1 = x2*(a15.d+x2*(a17.d+x2*(a19.d+x2*(a21.d+x2*(a23.d+x2*(a25.d+

View File

@ -4,7 +4,7 @@
#ifdef BIG_ENDI
static const union {int4 i[880]; double x[40];}sincos = {
static const union {int4 i[880]; double x[40];}sincos = { .i = {
/**/ 0x00000000, 0x00000000,
/**/ 0x00000000, 0x00000000,
/**/ 0x3FF00000, 0x00000000,
@ -444,10 +444,10 @@ static const union {int4 i[880]; double x[40];}sincos = {
/**/ 0x3FE812ED, 0xE9AE4BA4,
/**/ 0xBC87830A, 0xDF402DDA,
/**/ 0x3FE514F5, 0x7D7BF3DA,
/**/ 0x3C747A10, 0x8073C259 };
/**/ 0x3C747A10, 0x8073C259 } };
#else
#ifdef LITTLE_ENDI
static const union {int4 i[880]; double x[440];} sincos = {
static const union {int4 i[880]; double x[440];} sincos = { .i = {
/**/ 0x00000000, 0x00000000,
/**/ 0x00000000, 0x00000000,
/**/ 0x00000000, 0x3FF00000,
@ -464,54 +464,54 @@ static const union {int4 i[880]; double x[440];} sincos = {
/**/ 0x51527336, 0x3BFEFE2B,
/**/ 0x06BFF7E6, 0x3FEFFDC0,
/**/ 0xE86977BD, 0x3C8AE6DA,
/**/ 0xAEEEE86F, 0x3F9FFEAA,
/**/ 0xFB224AE2, 0xBC3CD406,
/**/ 0x155527D3, 0x3FEFFC00,
/**/ 0x92D89B5B, 0xBC83B544,
/**/ 0xB12D45D5, 0x3FA3FEB2,
/**/ 0x203D1C11, 0x3C34EC54,
/**/ 0x3414A7BA, 0x3FEFF9C0,
/**/ 0xBE6C59BF, 0x3C6991F4,
/**/ 0x1032FBA9, 0x3FA7FDC0,
/**/ 0xF46E997A, 0xBC4599BD,
/**/ 0x6BFDF99F, 0x3FEFF700,
/**/ 0x60648D5F, 0xBC78B3B5,
/**/ 0x78586DAC, 0x3FABFC6D,
/**/ 0x03DBF236, 0x3C18E4FD,
/**/ 0xC8103A31, 0x3FEFF3C0,
/**/ 0xBDDC0E66, 0x3C74856D,
/**/ 0xEEED4EDB, 0x3FAFFAAA,
/**/ 0x32684B69, 0xBC42D16D,
/**/ 0x5549F4D3, 0x3FEFF001,
/**/ 0x7B99426F, 0x3C832838,
/**/ 0x3D808BEF, 0x3FB1FC34,
/**/ 0xE6F3BE4F, 0xBC5F3D32,
/**/ 0x22A8EF9F, 0x3FEFEBC2,
/**/ 0x34F54C77, 0x3C579349,
/**/ 0x12D1755B, 0x3FB3FACB,
/**/ 0x5299468C, 0xBC592191,
/**/ 0x4129EF6F, 0x3FEFE703,
/**/ 0x37C96F97, 0xBC6CBF43,
/**/ 0xFD10B737, 0x3FB5F911,
/**/ 0x02BE9102, 0xBC50184F,
/**/ 0xC3C873EB, 0x3FEFE1C4,
/**/ 0x057C4A02, 0xBC35A9C9,
/**/ 0x032550E4, 0x3FB7F701,
/**/ 0x1800501A, 0x3C3AFC2D,
/**/ 0xBF7E6B9B, 0x3FEFDC06,
/**/ 0xB535F8DB, 0x3C831902,
/**/ 0x2D55D1F9, 0x3FB9F490,
/**/ 0x7EAC1DC1, 0x3C52696D,
/**/ 0x4B43E000, 0x3FEFD5C9,
/**/ 0xCB4F92F9, 0xBC62E768,
/**/ 0x8568391D, 0x3FBBF1B7,
/**/ 0x1DEA4CC8, 0x3C5E9184,
/**/ 0x800E99B1, 0x3FEFCF0C,
/**/ 0x86D186AC, 0x3C6EA3D7,
/**/ 0x16C1CCE6, 0x3FBDEE6F,
/**/ 0x2FB71673, 0xBC450F8E,
/**/ 0x78D1BC88, 0x3FEFC7D0,
/**/ 0x447DB685, 0x3C8075D2,
/**/ 0xAEEEE86F, 0x3F9FFEAA,
/**/ 0xFB224AE2, 0xBC3CD406,
/**/ 0x155527D3, 0x3FEFFC00,
/**/ 0x92D89B5B, 0xBC83B544,
/**/ 0xB12D45D5, 0x3FA3FEB2,
/**/ 0x203D1C11, 0x3C34EC54,
/**/ 0x3414A7BA, 0x3FEFF9C0,
/**/ 0xBE6C59BF, 0x3C6991F4,
/**/ 0x1032FBA9, 0x3FA7FDC0,
/**/ 0xF46E997A, 0xBC4599BD,
/**/ 0x6BFDF99F, 0x3FEFF700,
/**/ 0x60648D5F, 0xBC78B3B5,
/**/ 0x78586DAC, 0x3FABFC6D,
/**/ 0x03DBF236, 0x3C18E4FD,
/**/ 0xC8103A31, 0x3FEFF3C0,
/**/ 0xBDDC0E66, 0x3C74856D,
/**/ 0xEEED4EDB, 0x3FAFFAAA,
/**/ 0x32684B69, 0xBC42D16D,
/**/ 0x5549F4D3, 0x3FEFF001,
/**/ 0x7B99426F, 0x3C832838,
/**/ 0x3D808BEF, 0x3FB1FC34,
/**/ 0xE6F3BE4F, 0xBC5F3D32,
/**/ 0x22A8EF9F, 0x3FEFEBC2,
/**/ 0x34F54C77, 0x3C579349,
/**/ 0x12D1755B, 0x3FB3FACB,
/**/ 0x5299468C, 0xBC592191,
/**/ 0x4129EF6F, 0x3FEFE703,
/**/ 0x37C96F97, 0xBC6CBF43,
/**/ 0xFD10B737, 0x3FB5F911,
/**/ 0x02BE9102, 0xBC50184F,
/**/ 0xC3C873EB, 0x3FEFE1C4,
/**/ 0x057C4A02, 0xBC35A9C9,
/**/ 0x032550E4, 0x3FB7F701,
/**/ 0x1800501A, 0x3C3AFC2D,
/**/ 0xBF7E6B9B, 0x3FEFDC06,
/**/ 0xB535F8DB, 0x3C831902,
/**/ 0x2D55D1F9, 0x3FB9F490,
/**/ 0x7EAC1DC1, 0x3C52696D,
/**/ 0x4B43E000, 0x3FEFD5C9,
/**/ 0xCB4F92F9, 0xBC62E768,
/**/ 0x8568391D, 0x3FBBF1B7,
/**/ 0x1DEA4CC8, 0x3C5E9184,
/**/ 0x800E99B1, 0x3FEFCF0C,
/**/ 0x86D186AC, 0x3C6EA3D7,
/**/ 0x16C1CCE6, 0x3FBDEE6F,
/**/ 0x2FB71673, 0xBC450F8E,
/**/ 0x78D1BC88, 0x3FEFC7D0,
/**/ 0x447DB685, 0x3C8075D2,
/**/ 0xEE86EE36, 0x3FBFEAAE,
/**/ 0xBCC6F03B, 0xBC4AFCB2,
/**/ 0x527D5BD3, 0x3FEFC015,
@ -887,6 +887,6 @@ static const union {int4 i[880]; double x[440];} sincos = {
/**/ 0xE9AE4BA4, 0x3FE812ED,
/**/ 0xDF402DDA, 0xBC87830A,
/**/ 0x7D7BF3DA, 0x3FE514F5,
/**/ 0x8073C259, 0x3C747A10 };
/**/ 0x8073C259, 0x3C747A10 } };
#endif
#endif

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/****************************************************************/
/* MODULE_NAME: sincos32.c */
@ -48,11 +48,17 @@
/* Compute Multi-Precision sin() function for given p. Receive */
/* Multi Precision number x and result stored at y */
/****************************************************************/
void ss32(mp_no *x, mp_no *y, int p) {
static void ss32(mp_no *x, mp_no *y, int p) {
int i;
double a,b;
static const mp_no mpone = {1,1.0,1.0};
mp_no mpt1,mpt2,x2,gor,sum ,mpk={1,1.0};
double a;
#if 0
double b;
static const mp_no mpone = {1,{1.0,1.0}};
#endif
mp_no mpt1,x2,gor,sum ,mpk={1,{1.0}};
#if 0
mp_no mpt2;
#endif
for (i=1;i<=p;i++) mpk.d[i]=0;
mul(x,x,&x2,p);
@ -72,11 +78,17 @@ void ss32(mp_no *x, mp_no *y, int p) {
/* Compute Multi-Precision cos() function for given p. Receive Multi */
/* Precision number x and result stored at y */
/**********************************************************************/
void cc32(mp_no *x, mp_no *y, int p) {
static void cc32(mp_no *x, mp_no *y, int p) {
int i;
double a,b;
static const mp_no mpone = {1,1.0,1.0};
mp_no mpt1,mpt2,x2,gor,sum ,mpk={1,1.0};
double a;
#if 0
double b;
static const mp_no mpone = {1,{1.0,1.0}};
#endif
mp_no mpt1,x2,gor,sum ,mpk={1,{1.0}};
#if 0
mp_no mpt2;
#endif
for (i=1;i<=p;i++) mpk.d[i]=0;
mul(x,x,&x2,p);
@ -96,8 +108,8 @@ void cc32(mp_no *x, mp_no *y, int p) {
/***************************************************************************/
/* c32() computes both sin(x), cos(x) as Multi precision numbers */
/***************************************************************************/
void c32(mp_no *x, mp_no *y, mp_no *z, int p) {
static const mp_no mpt={1,1.0,2.0}, one={1,1.0,1.0};
void __c32(mp_no *x, mp_no *y, mp_no *z, int p) {
static const mp_no mpt={1,{1.0,2.0}}, one={1,{1.0,1.0}};
mp_no u,t,t1,t2,c,s;
int i;
cpy(x,&u,p);
@ -121,7 +133,7 @@ void c32(mp_no *x, mp_no *y, mp_no *z, int p) {
/*result which is more accurate */
/*Computing sin(x) with multi precision routine c32 */
/************************************************************************/
double sin32(double x, double res, double res1) {
double __sin32(double x, double res, double res1) {
int p;
mp_no a,b,c;
p=32;
@ -130,11 +142,11 @@ double sin32(double x, double res, double res1) {
add(&a,&b,&c,p);
if (x>0.8)
{ sub(&hp,&c,&a,p);
c32(&a,&b,&c,p);
__c32(&a,&b,&c,p);
}
else c32(&c,&a,&b,p); /* b=sin(0.5*(res+res1)) */
else __c32(&c,&a,&b,p); /* b=sin(0.5*(res+res1)) */
dbl_mp(x,&c,p); /* c = x */
sub(&b,&c,&a,p);
sub(&b,&c,&a,p);
/* if a>0 return min(res,res1), otherwise return max(res,res1) */
if (a.d[0]>0) return (res<res1)?res:res1;
else return (res>res1)?res:res1;
@ -145,7 +157,7 @@ double sin32(double x, double res, double res1) {
/*result which is more accurate */
/*Computing cos(x) with multi precision routine c32 */
/************************************************************************/
double cos32(double x, double res, double res1) {
double __cos32(double x, double res, double res1) {
int p;
mp_no a,b,c;
p=32;
@ -154,14 +166,14 @@ double cos32(double x, double res, double res1) {
add(&a,&b,&c,p);
if (x>2.4)
{ sub(&pi,&c,&a,p);
c32(&a,&b,&c,p);
__c32(&a,&b,&c,p);
b.d[0]=-b.d[0];
}
else if (x>0.8)
else if (x>0.8)
{ sub(&hp,&c,&a,p);
c32(&a,&c,&b,p);
__c32(&a,&c,&b,p);
}
else c32(&c,&b,&a,p); /* b=cos(0.5*(res+res1)) */
else __c32(&c,&b,&a,p); /* b=cos(0.5*(res+res1)) */
dbl_mp(x,&c,p); /* c = x */
sub(&b,&c,&a,p);
/* if a>0 return max(res,res1), otherwise return min(res,res1) */
@ -173,7 +185,7 @@ double cos32(double x, double res, double res1) {
/*Compute sin(x+dx) as Multi Precision number and return result as */
/* double */
/*******************************************************************/
double mpsin(double x, double dx) {
double __mpsin(double x, double dx) {
int p;
double y;
mp_no a,b,c;
@ -181,9 +193,9 @@ double mpsin(double x, double dx) {
dbl_mp(x,&a,p);
dbl_mp(dx,&b,p);
add(&a,&b,&c,p);
if (x>0.8) { sub(&hp,&c,&a,p); c32(&a,&b,&c,p); }
else c32(&c,&a,&b,p); /* b = sin(x+dx) */
mp_dbl(&b,&y,p);
if (x>0.8) { sub(&hp,&c,&a,p); __c32(&a,&b,&c,p); }
else __c32(&c,&a,&b,p); /* b = sin(x+dx) */
__mp_dbl(&b,&y,p);
return y;
}
@ -191,7 +203,7 @@ double mpsin(double x, double dx) {
/* Compute cos()of double-length number (x+dx) as Multi Precision */
/* number and return result as double */
/*******************************************************************/
double mpcos(double x, double dx) {
double __mpcos(double x, double dx) {
int p;
double y;
mp_no a,b,c;
@ -199,12 +211,12 @@ double mpcos(double x, double dx) {
dbl_mp(x,&a,p);
dbl_mp(dx,&b,p);
add(&a,&b,&c,p);
if (x>0.8)
if (x>0.8)
{ sub(&hp,&c,&b,p);
c32(&b,&a,&c,p);
__c32(&b,&a,&c,p);
}
else c32(&c,&a,&b,p); /* a = cos(x+dx) */
mp_dbl(&a,&y,p);
else __c32(&c,&a,&b,p); /* a = cos(x+dx) */
__mp_dbl(&a,&y,p);
return y;
}
@ -219,9 +231,9 @@ int mpranred(double x, mp_no *y, int p)
number v;
double t,xn;
int i,k,n;
static const mp_no one = {1,1.0,1.0};
static const mp_no one = {1,{1.0,1.0}};
mp_no a,b,c;
if (ABS(x) < 2.8e14) {
t = (x*hpinv.d + toint.d);
xn = t - toint.d;
@ -246,7 +258,7 @@ int mpranred(double x, mp_no *y, int p)
for (i=1;i<=p-c.e;i++) c.d[i]=c.d[i+c.e];
for (i=p+1-c.e;i<=p;i++) c.d[i]=0;
c.e=0;
if (c.d[1] >= 8388608.0)
if (c.d[1] >= 8388608.0)
{ t +=1.0;
sub(&c,&one,&b,p);
mul(&b,&hp,y,p);
@ -270,28 +282,28 @@ double mpsin1(double x)
double y;
p=32;
n=mpranred(x,&u,p); /* n is 0, 1, 2 or 3 */
c32(&u,&c,&s,p);
__c32(&u,&c,&s,p);
switch (n) { /* in which quarter of unit circle y is*/
case 0:
mp_dbl(&s,&y,p);
__mp_dbl(&s,&y,p);
return y;
break;
case 2:
mp_dbl(&s,&y,p);
__mp_dbl(&s,&y,p);
return -y;
break;
case 1:
mp_dbl(&c,&y,p);
__mp_dbl(&c,&y,p);
return y;
break;
case 3:
mp_dbl(&c,&y,p);
__mp_dbl(&c,&y,p);
return -y;
break;
}
return 0; /* unreachable, to make the compiler happy */
}
@ -307,32 +319,32 @@ double mpcos1(double x)
int n;
mp_no u,s,c;
double y;
p=32;
n=mpranred(x,&u,p); /* n is 0, 1, 2 or 3 */
c32(&u,&c,&s,p);
__c32(&u,&c,&s,p);
switch (n) { /* in what quarter of unit circle y is*/
case 0:
mp_dbl(&c,&y,p);
__mp_dbl(&c,&y,p);
return y;
break;
case 2:
mp_dbl(&c,&y,p);
__mp_dbl(&c,&y,p);
return -y;
break;
case 1:
mp_dbl(&s,&y,p);
__mp_dbl(&s,&y,p);
return -y;
break;
case 3:
mp_dbl(&s,&y,p);
__mp_dbl(&s,&y,p);
return y;
break;
}
return 0; /* unreachable, to make the compiler happy */
}

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
@ -29,37 +29,37 @@
#ifdef BIG_ENDI
static const number
/**/ hpinv = {0x3FE45F30, 0x6DC9C883 }, /* 0.63661977236758138 */
/**/ toint = {0x43380000, 0x00000000 }; /* 6755399441055744 */
/**/ hpinv = {{0x3FE45F30, 0x6DC9C883}}, /* 0.63661977236758138 */
/**/ toint = {{0x43380000, 0x00000000}}; /* 6755399441055744 */
#else
#ifdef LITTLE_ENDI
static const number
/**/ hpinv = {0x6DC9C883, 0x3FE45F30 }, /* 0.63661977236758138 */
/**/ toint = {0x00000000, 0x43380000 }; /* 6755399441055744 */
/**/ hpinv = {{0x6DC9C883, 0x3FE45F30}}, /* 0.63661977236758138 */
/**/ toint = {{0x00000000, 0x43380000}}; /* 6755399441055744 */
#endif
#endif
static const mp_no
oofac27 = {-3, 1.0,7.0,4631664.0,12006312.0,13118056.0,6538613.0,646354.0,
oofac27 = {-3,{1.0,7.0,4631664.0,12006312.0,13118056.0,6538613.0,646354.0,
8508025.0,9131256.0,7548776.0,2529842.0,8864927.0,660489.0,15595125.0,12777885.0,
11618489.0,13348664.0,5486686.0,514518.0,11275535.0,4727621.0,3575562.0,
13579710.0,5829745.0,7531862.0,9507898.0,6915060.0,4079264.0,1907586.0,
6078398.0,13789314.0,5504104.0,14136.0},
pi = {1,1.0,3.0,
6078398.0,13789314.0,5504104.0,14136.0}},
pi = {1,{1.0,3.0,
2375530.0,8947107.0,578323.0,1673774.0,225395.0,4498441.0,3678761.0,
10432976.0,536314.0,10021966.0,7113029.0,2630118.0,3723283.0,7847508.0,
6737716.0,15273068.0,12626985.0,12044668.0,5299519.0,8705461.0,11880201.0,
1544726.0,14014857.0,7994139.0,13709579.0,10918111.0,11906095.0,16610011.0,
13638367.0,12040417.0,11529578.0,2522774.0},
hp = {1, 1.0, 1.0,
13638367.0,12040417.0,11529578.0,2522774.0}},
hp = {1,{1.0, 1.0,
9576373.0,4473553.0,8677769.0,9225495.0,112697.0,10637828.0,
10227988.0,13605096.0,268157.0,5010983.0,3556514.0,9703667.0,
1861641.0,12312362.0,3368858.0,7636534.0,6313492.0,14410942.0,
2649759.0,12741338.0,14328708.0,9160971.0,7007428.0,12385677.0,
15243397.0,13847663.0,14341655.0,16693613.0,15207791.0,14408816.0,
14153397.0,1261387.0,6110792.0,2291862.0,4181138.0,5295267.0};
14153397.0,1261387.0,6110792.0,2291862.0,4181138.0,5295267.0}};
static const double toverp[75] = {
10680707.0, 7228996.0, 1387004.0, 2578385.0, 16069853.0,

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,12 +15,12 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**************************************************************************/
/* MODULE_NAME:slowexp.c */
/* */
/* FUNCTION:slowexp */
/* FUNCTION:slowexp */
/* */
/* FILES NEEDED:mpa.h */
/* mpa.c mpexp.c */
@ -34,10 +34,16 @@ void mpexp(mp_no *x, mp_no *y, int p);
/*Converting from double precision to Multi-precision and calculating e^x */
double slowexp(double x) {
double y,w,z,res,eps=3.0e-26;
int orig,i,p;
double w,z,res,eps=3.0e-26;
#if 0
double y;
#endif
int p;
#if 0
int orig,i;
#endif
mp_no mpx, mpy, mpz,mpw,mpeps,mpcor;
p=6;
dbl_mp(x,&mpx,p); /* Convert a double precision number x */
/* into a multiple precision number mpx with prec. p. */
@ -46,15 +52,14 @@ double slowexp(double x) {
mul(&mpeps,&mpy,&mpcor,p);
add(&mpy,&mpcor,&mpw,p);
sub(&mpy,&mpcor,&mpz,p);
mp_dbl(&mpw, &w, p);
mp_dbl(&mpz, &z, p);
__mp_dbl(&mpw, &w, p);
__mp_dbl(&mpz, &z, p);
if (w == z) return w;
else { /* if calculating is not exactly */
p = 32;
dbl_mp(x,&mpx,p);
mpexp(&mpx, &mpy, p);
mp_dbl(&mpy, &res, p);
__mp_dbl(&mpy, &res, p);
return res;
}
}

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,14 +15,14 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*************************************************************************/
/* MODULE_NAME:slowpow.c */
/* */
/* FUNCTION:slowpow */
/* */
/*FILES NEEDED:mpa.h */
/*FILES NEEDED:mpa.h */
/* mpa.c mpexp.c mplog.c halfulp.c */
/* */
/* Given two IEEE double machine numbers y,x , routine computes the */
@ -42,23 +42,23 @@ double halfulp(double x,double y);
double slowpow(double x, double y, double z) {
double res,res1;
mp_no mpx, mpy, mpz,mpw,mpp,mpr,mpr1;
static const mp_no eps = {-3,1.0,4.0};
static const mp_no eps = {-3,{1.0,4.0}};
int p;
res = halfulp(x,y); /* halfulp() returns -10 or x^y */
if (res >= 0) return res; /* if result was really computed by halfulp */
/* else, if result was not really computed by halfulp */
/* else, if result was not really computed by halfulp */
p = 10; /* p=precision */
dbl_mp(x,&mpx,p);
dbl_mp(x,&mpx,p);
dbl_mp(y,&mpy,p);
dbl_mp(z,&mpz,p);
mplog(&mpx, &mpz, p); /* log(x) = z */
mplog(&mpx, &mpz, p); /* log(x) = z */
mul(&mpy,&mpz,&mpw,p); /* y * z =w */
mpexp(&mpw, &mpp, p); /* e^w =pp */
add(&mpp,&eps,&mpr,p); /* pp+eps =r */
mp_dbl(&mpr, &res, p);
mpexp(&mpw, &mpp, p); /* e^w =pp */
add(&mpp,&eps,&mpr,p); /* pp+eps =r */
__mp_dbl(&mpr, &res, p);
sub(&mpp,&eps,&mpr1,p); /* pp -eps =r1 */
mp_dbl(&mpr1, &res1, p); /* converting into double precision */
__mp_dbl(&mpr1, &res1, p); /* converting into double precision */
if (res == res1) return res;
p = 32; /* if we get here result wasn't calculated exactly, continue */
@ -68,6 +68,6 @@ double slowpow(double x, double y, double z) {
mplog(&mpx, &mpz, p); /* log(c)=z */
mul(&mpy,&mpz,&mpw,p); /* y*z =w */
mpexp(&mpw, &mpp, p); /* e^w=pp */
mp_dbl(&mpp, &res, p); /* converting into double precision */
__mp_dbl(&mpp, &res, p); /* converting into double precision */
return res;
}

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
@ -29,18 +29,18 @@
#ifdef BIG_ENDI
static const mynumber
/**/ a1 = {0x3FC55580, 0x00000000 }, /* 0.1666717529296875 */
/**/ a2 = {0xBED55555, 0x55552330 }, /* -5.0862630208224597e-06 */
/**/ hp0 = {0x3FF921FB, 0x54442D18 }, /* 1.5707963267948966 */
/**/ hp1 = {0x3C91A626, 0x33145C07 }; /* 6.123233995736766e-17 */
/**/ a1 = {{0x3FC55580, 0x00000000 }}, /* 0.1666717529296875 */
/**/ a2 = {{0xBED55555, 0x55552330 }}, /* -5.0862630208224597e-06 */
/**/ hp0 = {{0x3FF921FB, 0x54442D18 }}, /* 1.5707963267948966 */
/**/ hp1 = {{0x3C91A626, 0x33145C07 }}; /* 6.123233995736766e-17 */
#else
#ifdef LITTLE_ENDI
static const mynumber
/**/ a1 = {0x00000000, 0x3FC55580 }, /* 0.1666717529296875 */
/**/ a2 = {0x55552330, 0xBED55555 }, /* -5.0862630208224597e-06 */
/**/ hp0 = {0x54442D18, 0x3FF921FB }, /* 1.5707963267948966 */
/**/ hp1 = {0x33145C07, 0x3C91A626 }; /* 6.123233995736766e-17 */
/**/ a1 = {{0x00000000, 0x3FC55580 }}, /* 0.1666717529296875 */
/**/ a2 = {{0x55552330, 0xBED55555 }}, /* -5.0862630208224597e-06 */
/**/ hp0 = {{0x54442D18, 0x3FF921FB }}, /* 1.5707963267948966 */
/**/ hp1 = {{0x33145C07, 0x3C91A626 }}; /* 6.123233995736766e-17 */
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
@ -29,40 +29,40 @@
#include "mydefs.h"
const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300,
const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300,
err_0 = 1.000014, err_1 = 0.000016;
const static int4 bigint = 0x40862002,
badint = 0x40876000,smallint = 0x3C8fffff;
const static int4 hugeint = 0x7FFFFFFF, infint = 0x7ff00000;
#ifdef BIG_ENDI
const static mynumber inf = {0x7FF00000, 0}; /* inf */
const static mynumber t256 = {0x4ff00000, 0}; /* 2^256 */
const static mynumber inf = {{0x7FF00000, 0}}; /* inf */
const static mynumber t256 = {{0x4ff00000, 0}}; /* 2^256 */
const static mynumber ln_two1 = { 0x3FE62E42, 0xFEFA3800 };/*0.69314718055989033 */
const static mynumber ln_two2 = { 0x3D2EF357, 0x93C76730 };/*5.4979230187083712e-14*/
const static mynumber log2e = { 0x3FF71547, 0x652B82FE };/* 1.4426950408889634 */
const static mynumber ln_two1 = {{0x3FE62E42, 0xFEFA3800}};/*0.69314718055989033 */
const static mynumber ln_two2 = {{0x3D2EF357, 0x93C76730}};/*5.4979230187083712e-14*/
const static mynumber log2e = {{0x3FF71547, 0x652B82FE}};/* 1.4426950408889634 */
const static mynumber p2 = { 0x3FE00000, 0x000004DC };/* 0.50000000000013811 */
const static mynumber p3 = { 0x3FC55555, 0x55555A0F };/* 0.16666666666670024 */
const static mynumber p2 = {{0x3FE00000, 0x000004DC}};/* 0.50000000000013811 */
const static mynumber p3 = {{0x3FC55555, 0x55555A0F}};/* 0.16666666666670024 */
const static mynumber three33 = { 0x42180000, 0 }; /* 25769803776 */
const static mynumber three51 = { 0x43380000, 0 }; /* 6755399441055744 */
const static mynumber three33 = {{0x42180000, 0}}; /* 25769803776 */
const static mynumber three51 = {{0x43380000, 0}}; /* 6755399441055744 */
#else
#ifdef LITTLE_ENDI
const static mynumber inf = {0, 0x7FF00000}; /* inf */
const static mynumber t256 = {0, 0x4ff00000}; /* 2^256 */
const static mynumber inf = {{0, 0x7FF00000}}; /* inf */
const static mynumber t256 = {{0, 0x4ff00000}}; /* 2^256 */
const static mynumber ln_two1 = { 0xFEFA3800, 0x3FE62E42 };/*0.69314718055989033 */
const static mynumber ln_two2 = { 0x93C76730, 0x3D2EF357 };/*5.4979230187083712e-14*/
const static mynumber log2e = { 0x652B82FE, 0x3FF71547 };/* 1.4426950408889634 */
const static mynumber ln_two1 = {{0xFEFA3800, 0x3FE62E42}};/*0.69314718055989033 */
const static mynumber ln_two2 = {{0x93C76730, 0x3D2EF357}};/*5.4979230187083712e-14*/
const static mynumber log2e = {{0x652B82FE, 0x3FF71547}};/* 1.4426950408889634 */
const static mynumber p2 = { 0x000004DC, 0x3FE00000 };/* 0.50000000000013811 */
const static mynumber p3 = { 0x55555A0F, 0x3FC55555 };/* 0.16666666666670024 */
const static mynumber p2 = {{0x000004DC, 0x3FE00000}};/* 0.50000000000013811 */
const static mynumber p3 = {{0x55555A0F, 0x3FC55555}};/* 0.16666666666670024 */
const static mynumber three33 = { 0, 0x42180000 }; /* 25769803776 */
const static mynumber three51 = { 0, 0x43380000 }; /* 6755399441055744 */
const static mynumber three33 = {{0, 0x42180000}}; /* 25769803776 */
const static mynumber three51 = {{0, 0x43380000}}; /* 6755399441055744 */
#endif
#endif

View File

@ -7,7 +7,7 @@
static const union {
int i[1424];
double x[712];
} coar = {
} coar = { .i = {
0x3FE69A59, 0xC8000000, 0x3DF22D4D, 0x6079C9F7,
0x3FE6A5A9, 0xC8000000, 0x3E19882D, 0x25AF6823,
0x3FE6B0FF, 0x74000000, 0xBE221476, 0x31DABF59,
@ -363,12 +363,12 @@ static const union {
0x3FF679C4, 0x28000000, 0xBDE4B6C1, 0x8DF63D6E,
0x3FF68503, 0xD8000000, 0x3E3BA122, 0xE6A239CF,
0x3FF69049, 0x2C000000, 0x3E27F286, 0x59FB5F30,
0x3FF69B94, 0x24000000, 0xBE044041, 0x971D3970 };
0x3FF69B94, 0x24000000, 0xBE044041, 0x971D3970 } };
static const union {
int4 i[2048];
double x[1024];
} fine = {
} fine = { .i = {
0x3FF00000, 0x00000000, 0x00000000, 0x00000000,
0x3FF00004, 0x00000000, 0x3DA00001, 0x55556AAB,
0x3FF00008, 0x00000000, 0x3DC00002, 0xAAAB0000,
@ -880,7 +880,7 @@ static const union {
0x3FF007F1, 0xF8000000, 0x3E16D8EA, 0x81547225,
0x3FF007F5, 0xFC000000, 0xBE3A79DF, 0xF8750E3B,
0x3FF007F9, 0xFC000000, 0x3E159835, 0x92EC7DE3,
0x3FF007FE, 0x00000000, 0xBE3AA9FD, 0x44185C5D };
0x3FF007FE, 0x00000000, 0xBE3AA9FD, 0x44185C5D } };
#else
#ifdef LITTLE_ENDI
@ -888,7 +888,7 @@ static const union {
static const union {
int i[1424];
double x[712];
} coar = {
} coar = { .i = {
0xC8000000, 0x3FE69A59, 0x6079C9F7, 0x3DF22D4D,
0xC8000000, 0x3FE6A5A9, 0x25AF6823, 0x3E19882D,
0x74000000, 0x3FE6B0FF, 0x31DABF59, 0xBE221476,
@ -1244,12 +1244,12 @@ static const union {
0x28000000, 0x3FF679C4, 0x8DF63D6E, 0xBDE4B6C1,
0xD8000000, 0x3FF68503, 0xE6A239CF, 0x3E3BA122,
0x2C000000, 0x3FF69049, 0x59FB5F30, 0x3E27F286,
0x24000000, 0x3FF69B94, 0x971D3970, 0xBE044041 };
0x24000000, 0x3FF69B94, 0x971D3970, 0xBE044041 } };
static const union {
int4 i[2048];
double x[1024];
} fine = {
} fine = { .i = {
0x00000000, 0x3FF00000, 0x00000000, 0x00000000,
0x00000000, 0x3FF00004, 0x55556AAB, 0x3DA00001,
0x00000000, 0x3FF00008, 0xAAAB0000, 0x3DC00002,
@ -1761,7 +1761,7 @@ static const union {
0xF8000000, 0x3FF007F1, 0x81547225, 0x3E16D8EA,
0xFC000000, 0x3FF007F5, 0xF8750E3B, 0xBE3A79DF,
0xFC000000, 0x3FF007F9, 0x92EC7DE3, 0x3E159835,
0x00000000, 0x3FF007FE, 0x44185C5D, 0xBE3AA9FD };
0x00000000, 0x3FF007FE, 0x44185C5D, 0xBE3AA9FD } };
#endif
#endif

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
@ -30,149 +30,153 @@
#ifdef BIG_ENDI
static const number
/* polynomial I */
/**/ a2 = {0xbfe00000, 0x0001aa8f, }, /* -0.500... */
/**/ a3 = {0x3fd55555, 0x55588d2e, }, /* 0.333... */
/**/ a2 = {{0xbfe00000, 0x0001aa8f} }, /* -0.500... */
/**/ a3 = {{0x3fd55555, 0x55588d2e} }, /* 0.333... */
/* polynomial II */
/**/ b0 = {0x3fd55555, 0x55555555, }, /* 0.333... */
/**/ b1 = {0xbfcfffff, 0xffffffbb, }, /* -0.249... */
/**/ b2 = {0x3fc99999, 0x9999992f, }, /* 0.199... */
/**/ b3 = {0xbfc55555, 0x556503fd, }, /* -0.166... */
/**/ b4 = {0x3fc24924, 0x925b3d62, }, /* 0.142... */
/**/ b5 = {0xbfbffffe, 0x160472fc, }, /* -0.124... */
/**/ b6 = {0x3fbc71c5, 0x25db58ac, }, /* 0.111... */
/**/ b7 = {0xbfb9a4ac, 0x11a2a61c, }, /* -0.100... */
/**/ b8 = {0x3fb75077, 0x0df2b591, }, /* 0.091... */
/**/ b0 = {{0x3fd55555, 0x55555555} }, /* 0.333... */
/**/ b1 = {{0xbfcfffff, 0xffffffbb} }, /* -0.249... */
/**/ b2 = {{0x3fc99999, 0x9999992f} }, /* 0.199... */
/**/ b3 = {{0xbfc55555, 0x556503fd} }, /* -0.166... */
/**/ b4 = {{0x3fc24924, 0x925b3d62} }, /* 0.142... */
/**/ b5 = {{0xbfbffffe, 0x160472fc} }, /* -0.124... */
/**/ b6 = {{0x3fbc71c5, 0x25db58ac} }, /* 0.111... */
/**/ b7 = {{0xbfb9a4ac, 0x11a2a61c} }, /* -0.100... */
/**/ b8 = {{0x3fb75077, 0x0df2b591} }, /* 0.091... */
/* polynomial III */
/**/ c1 = {0x3ff00000, 0x00000000, }, /* 1 */
/**/ c2 = {0xbfe00000, 0x00000000, }, /* -1/2 */
/**/ c3 = {0x3fd55555, 0x55555555, }, /* 1/3 */
/**/ c4 = {0xbfd00000, 0x00000000, }, /* -1/4 */
/**/ c5 = {0x3fc99999, 0x9999999a, }, /* 1/5 */
#if 0
/**/ c1 = {{0x3ff00000, 0x00000000} }, /* 1 */
#endif
/**/ c2 = {{0xbfe00000, 0x00000000} }, /* -1/2 */
/**/ c3 = {{0x3fd55555, 0x55555555} }, /* 1/3 */
/**/ c4 = {{0xbfd00000, 0x00000000} }, /* -1/4 */
/**/ c5 = {{0x3fc99999, 0x9999999a} }, /* 1/5 */
/* polynomial IV */
/**/ d2 = {0xbfe00000, 0x00000000, }, /* -1/2 */
/**/ dd2 = {0x00000000, 0x00000000, }, /* -1/2-d2 */
/**/ d3 = {0x3fd55555, 0x55555555, }, /* 1/3 */
/**/ dd3 = {0x3c755555, 0x55555555, }, /* 1/3-d3 */
/**/ d4 = {0xbfd00000, 0x00000000, }, /* -1/4 */
/**/ dd4 = {0x00000000, 0x00000000, }, /* -1/4-d4 */
/**/ d5 = {0x3fc99999, 0x9999999a, }, /* 1/5 */
/**/ dd5 = {0xbc699999, 0x9999999a, }, /* 1/5-d5 */
/**/ d6 = {0xbfc55555, 0x55555555, }, /* -1/6 */
/**/ dd6 = {0xbc655555, 0x55555555, }, /* -1/6-d6 */
/**/ d7 = {0x3fc24924, 0x92492492, }, /* 1/7 */
/**/ dd7 = {0x3c624924, 0x92492492, }, /* 1/7-d7 */
/**/ d8 = {0xbfc00000, 0x00000000, }, /* -1/8 */
/**/ dd8 = {0x00000000, 0x00000000, }, /* -1/8-d8 */
/**/ d9 = {0x3fbc71c7, 0x1c71c71c, }, /* 1/9 */
/**/ dd9 = {0x3c5c71c7, 0x1c71c71c, }, /* 1/9-d9 */
/**/ d10 = {0xbfb99999, 0x9999999a, }, /* -1/10 */
/**/ dd10 = {0x3c599999, 0x9999999a, }, /* -1/10-d10 */
/**/ d11 = {0x3fb745d1, 0x745d1746, }, /* 1/11 */
/**/ d12 = {0xbfb55555, 0x55555555, }, /* -1/12 */
/**/ d13 = {0x3fb3b13b, 0x13b13b14, }, /* 1/13 */
/**/ d14 = {0xbfb24924, 0x92492492, }, /* -1/14 */
/**/ d15 = {0x3fb11111, 0x11111111, }, /* 1/15 */
/**/ d16 = {0xbfb00000, 0x00000000, }, /* -1/16 */
/**/ d17 = {0x3fae1e1e, 0x1e1e1e1e, }, /* 1/17 */
/**/ d18 = {0xbfac71c7, 0x1c71c71c, }, /* -1/18 */
/**/ d19 = {0x3faaf286, 0xbca1af28, }, /* 1/19 */
/**/ d20 = {0xbfa99999, 0x9999999a, }, /* -1/20 */
/**/ d2 = {{0xbfe00000, 0x00000000} }, /* -1/2 */
/**/ dd2 = {{0x00000000, 0x00000000} }, /* -1/2-d2 */
/**/ d3 = {{0x3fd55555, 0x55555555} }, /* 1/3 */
/**/ dd3 = {{0x3c755555, 0x55555555} }, /* 1/3-d3 */
/**/ d4 = {{0xbfd00000, 0x00000000} }, /* -1/4 */
/**/ dd4 = {{0x00000000, 0x00000000} }, /* -1/4-d4 */
/**/ d5 = {{0x3fc99999, 0x9999999a} }, /* 1/5 */
/**/ dd5 = {{0xbc699999, 0x9999999a} }, /* 1/5-d5 */
/**/ d6 = {{0xbfc55555, 0x55555555} }, /* -1/6 */
/**/ dd6 = {{0xbc655555, 0x55555555} }, /* -1/6-d6 */
/**/ d7 = {{0x3fc24924, 0x92492492} }, /* 1/7 */
/**/ dd7 = {{0x3c624924, 0x92492492} }, /* 1/7-d7 */
/**/ d8 = {{0xbfc00000, 0x00000000} }, /* -1/8 */
/**/ dd8 = {{0x00000000, 0x00000000} }, /* -1/8-d8 */
/**/ d9 = {{0x3fbc71c7, 0x1c71c71c} }, /* 1/9 */
/**/ dd9 = {{0x3c5c71c7, 0x1c71c71c} }, /* 1/9-d9 */
/**/ d10 = {{0xbfb99999, 0x9999999a} }, /* -1/10 */
/**/ dd10 = {{0x3c599999, 0x9999999a} }, /* -1/10-d10 */
/**/ d11 = {{0x3fb745d1, 0x745d1746} }, /* 1/11 */
/**/ d12 = {{0xbfb55555, 0x55555555} }, /* -1/12 */
/**/ d13 = {{0x3fb3b13b, 0x13b13b14} }, /* 1/13 */
/**/ d14 = {{0xbfb24924, 0x92492492} }, /* -1/14 */
/**/ d15 = {{0x3fb11111, 0x11111111} }, /* 1/15 */
/**/ d16 = {{0xbfb00000, 0x00000000} }, /* -1/16 */
/**/ d17 = {{0x3fae1e1e, 0x1e1e1e1e} }, /* 1/17 */
/**/ d18 = {{0xbfac71c7, 0x1c71c71c} }, /* -1/18 */
/**/ d19 = {{0x3faaf286, 0xbca1af28} }, /* 1/19 */
/**/ d20 = {{0xbfa99999, 0x9999999a} }, /* -1/20 */
/* constants */
/**/ zero = {0x00000000, 0x00000000, }, /* 0 */
/**/ one = {0x3ff00000, 0x00000000, }, /* 1 */
/**/ half = {0x3fe00000, 0x00000000, }, /* 1/2 */
/**/ mhalf = {0xbfe00000, 0x00000000, }, /* -1/2 */
/**/ sqrt_2 = {0x3ff6a09e, 0x667f3bcc, }, /* sqrt(2) */
/**/ h1 = {0x3fd2e000, 0x00000000, }, /* 151/2**9 */
/**/ h2 = {0x3f669000, 0x00000000, }, /* 361/2**17 */
/**/ delu = {0x3f700000, 0x00000000, }, /* 1/2**8 */
/**/ delv = {0x3ef00000, 0x00000000, }, /* 1/2**16 */
/**/ ln2a = {0x3fe62e42, 0xfefa3800, }, /* ln(2) 43 bits */
/**/ ln2b = {0x3d2ef357, 0x93c76730, }, /* ln(2)-ln2a */
/**/ e1 = {0x3bbcc868, 0x00000000, }, /* 6.095e-21 */
/**/ e2 = {0x3c1138ce, 0x00000000, }, /* 2.334e-19 */
/**/ e3 = {0x3aa1565d, 0x00000000, }, /* 2.801e-26 */
/**/ e4 = {0x39809d88, 0x00000000, }, /* 1.024e-31 */
/**/ e[M] ={{0x37da223a, 0x00000000, }, /* 1.2e-39 */
/**/ {0x35c851c4, 0x00000000, }, /* 1.3e-49 */
/**/ {0x2ab85e51, 0x00000000, }, /* 6.8e-103 */
/**/ {0x17383827, 0x00000000, }},/* 8.1e-197 */
/**/ two54 = {0x43500000, 0x00000000, }, /* 2**54 */
/**/ u03 = {0x3f9eb851, 0xeb851eb8, }; /* 0.03 */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ half = {{0x3fe00000, 0x00000000} }, /* 1/2 */
/**/ mhalf = {{0xbfe00000, 0x00000000} }, /* -1/2 */
/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc} }, /* sqrt(2) */
/**/ h1 = {{0x3fd2e000, 0x00000000} }, /* 151/2**9 */
/**/ h2 = {{0x3f669000, 0x00000000} }, /* 361/2**17 */
/**/ delu = {{0x3f700000, 0x00000000} }, /* 1/2**8 */
/**/ delv = {{0x3ef00000, 0x00000000} }, /* 1/2**16 */
/**/ ln2a = {{0x3fe62e42, 0xfefa3800} }, /* ln(2) 43 bits */
/**/ ln2b = {{0x3d2ef357, 0x93c76730} }, /* ln(2)-ln2a */
/**/ e1 = {{0x3bbcc868, 0x00000000} }, /* 6.095e-21 */
/**/ e2 = {{0x3c1138ce, 0x00000000} }, /* 2.334e-19 */
/**/ e3 = {{0x3aa1565d, 0x00000000} }, /* 2.801e-26 */
/**/ e4 = {{0x39809d88, 0x00000000} }, /* 1.024e-31 */
/**/ e[M] ={{{0x37da223a, 0x00000000} }, /* 1.2e-39 */
/**/ {{0x35c851c4, 0x00000000} }, /* 1.3e-49 */
/**/ {{0x2ab85e51, 0x00000000} }, /* 6.8e-103 */
/**/ {{0x17383827, 0x00000000} }},/* 8.1e-197 */
/**/ two54 = {{0x43500000, 0x00000000} }, /* 2**54 */
/**/ u03 = {{0x3f9eb851, 0xeb851eb8} }; /* 0.03 */
#else
#ifdef LITTLE_ENDI
static const number
/* polynomial I */
/**/ a2 = {0x0001aa8f, 0xbfe00000, }, /* -0.500... */
/**/ a3 = {0x55588d2e, 0x3fd55555, }, /* 0.333... */
/**/ a2 = {{0x0001aa8f, 0xbfe00000} }, /* -0.500... */
/**/ a3 = {{0x55588d2e, 0x3fd55555} }, /* 0.333... */
/* polynomial II */
/**/ b0 = {0x55555555, 0x3fd55555, }, /* 0.333... */
/**/ b1 = {0xffffffbb, 0xbfcfffff, }, /* -0.249... */
/**/ b2 = {0x9999992f, 0x3fc99999, }, /* 0.199... */
/**/ b3 = {0x556503fd, 0xbfc55555, }, /* -0.166... */
/**/ b4 = {0x925b3d62, 0x3fc24924, }, /* 0.142... */
/**/ b5 = {0x160472fc, 0xbfbffffe, }, /* -0.124... */
/**/ b6 = {0x25db58ac, 0x3fbc71c5, }, /* 0.111... */
/**/ b7 = {0x11a2a61c, 0xbfb9a4ac, }, /* -0.100... */
/**/ b8 = {0x0df2b591, 0x3fb75077, }, /* 0.091... */
/**/ b0 = {{0x55555555, 0x3fd55555} }, /* 0.333... */
/**/ b1 = {{0xffffffbb, 0xbfcfffff} }, /* -0.249... */
/**/ b2 = {{0x9999992f, 0x3fc99999} }, /* 0.199... */
/**/ b3 = {{0x556503fd, 0xbfc55555} }, /* -0.166... */
/**/ b4 = {{0x925b3d62, 0x3fc24924} }, /* 0.142... */
/**/ b5 = {{0x160472fc, 0xbfbffffe} }, /* -0.124... */
/**/ b6 = {{0x25db58ac, 0x3fbc71c5} }, /* 0.111... */
/**/ b7 = {{0x11a2a61c, 0xbfb9a4ac} }, /* -0.100... */
/**/ b8 = {{0x0df2b591, 0x3fb75077} }, /* 0.091... */
/* polynomial III */
/**/ c1 = {0x00000000, 0x3ff00000, }, /* 1 */
/**/ c2 = {0x00000000, 0xbfe00000, }, /* -1/2 */
/**/ c3 = {0x55555555, 0x3fd55555, }, /* 1/3 */
/**/ c4 = {0x00000000, 0xbfd00000, }, /* -1/4 */
/**/ c5 = {0x9999999a, 0x3fc99999, }, /* 1/5 */
#if 0
/**/ c1 = {{0x00000000, 0x3ff00000} }, /* 1 */
#endif
/**/ c2 = {{0x00000000, 0xbfe00000} }, /* -1/2 */
/**/ c3 = {{0x55555555, 0x3fd55555} }, /* 1/3 */
/**/ c4 = {{0x00000000, 0xbfd00000} }, /* -1/4 */
/**/ c5 = {{0x9999999a, 0x3fc99999} }, /* 1/5 */
/* polynomial IV */
/**/ d2 = {0x00000000, 0xbfe00000, }, /* -1/2 */
/**/ dd2 = {0x00000000, 0x00000000, }, /* -1/2-d2 */
/**/ d3 = {0x55555555, 0x3fd55555, }, /* 1/3 */
/**/ dd3 = {0x55555555, 0x3c755555, }, /* 1/3-d3 */
/**/ d4 = {0x00000000, 0xbfd00000, }, /* -1/4 */
/**/ dd4 = {0x00000000, 0x00000000, }, /* -1/4-d4 */
/**/ d5 = {0x9999999a, 0x3fc99999, }, /* 1/5 */
/**/ dd5 = {0x9999999a, 0xbc699999, }, /* 1/5-d5 */
/**/ d6 = {0x55555555, 0xbfc55555, }, /* -1/6 */
/**/ dd6 = {0x55555555, 0xbc655555, }, /* -1/6-d6 */
/**/ d7 = {0x92492492, 0x3fc24924, }, /* 1/7 */
/**/ dd7 = {0x92492492, 0x3c624924, }, /* 1/7-d7 */
/**/ d8 = {0x00000000, 0xbfc00000, }, /* -1/8 */
/**/ dd8 = {0x00000000, 0x00000000, }, /* -1/8-d8 */
/**/ d9 = {0x1c71c71c, 0x3fbc71c7, }, /* 1/9 */
/**/ dd9 = {0x1c71c71c, 0x3c5c71c7, }, /* 1/9-d9 */
/**/ d10 = {0x9999999a, 0xbfb99999, }, /* -1/10 */
/**/ dd10 = {0x9999999a, 0x3c599999, }, /* -1/10-d10 */
/**/ d11 = {0x745d1746, 0x3fb745d1, }, /* 1/11 */
/**/ d12 = {0x55555555, 0xbfb55555, }, /* -1/12 */
/**/ d13 = {0x13b13b14, 0x3fb3b13b, }, /* 1/13 */
/**/ d14 = {0x92492492, 0xbfb24924, }, /* -1/14 */
/**/ d15 = {0x11111111, 0x3fb11111, }, /* 1/15 */
/**/ d16 = {0x00000000, 0xbfb00000, }, /* -1/16 */
/**/ d17 = {0x1e1e1e1e, 0x3fae1e1e, }, /* 1/17 */
/**/ d18 = {0x1c71c71c, 0xbfac71c7, }, /* -1/18 */
/**/ d19 = {0xbca1af28, 0x3faaf286, }, /* 1/19 */
/**/ d20 = {0x9999999a, 0xbfa99999, }, /* -1/20 */
/**/ d2 = {{0x00000000, 0xbfe00000} }, /* -1/2 */
/**/ dd2 = {{0x00000000, 0x00000000} }, /* -1/2-d2 */
/**/ d3 = {{0x55555555, 0x3fd55555} }, /* 1/3 */
/**/ dd3 = {{0x55555555, 0x3c755555} }, /* 1/3-d3 */
/**/ d4 = {{0x00000000, 0xbfd00000} }, /* -1/4 */
/**/ dd4 = {{0x00000000, 0x00000000} }, /* -1/4-d4 */
/**/ d5 = {{0x9999999a, 0x3fc99999} }, /* 1/5 */
/**/ dd5 = {{0x9999999a, 0xbc699999} }, /* 1/5-d5 */
/**/ d6 = {{0x55555555, 0xbfc55555} }, /* -1/6 */
/**/ dd6 = {{0x55555555, 0xbc655555} }, /* -1/6-d6 */
/**/ d7 = {{0x92492492, 0x3fc24924} }, /* 1/7 */
/**/ dd7 = {{0x92492492, 0x3c624924} }, /* 1/7-d7 */
/**/ d8 = {{0x00000000, 0xbfc00000} }, /* -1/8 */
/**/ dd8 = {{0x00000000, 0x00000000} }, /* -1/8-d8 */
/**/ d9 = {{0x1c71c71c, 0x3fbc71c7} }, /* 1/9 */
/**/ dd9 = {{0x1c71c71c, 0x3c5c71c7} }, /* 1/9-d9 */
/**/ d10 = {{0x9999999a, 0xbfb99999} }, /* -1/10 */
/**/ dd10 = {{0x9999999a, 0x3c599999} }, /* -1/10-d10 */
/**/ d11 = {{0x745d1746, 0x3fb745d1} }, /* 1/11 */
/**/ d12 = {{0x55555555, 0xbfb55555} }, /* -1/12 */
/**/ d13 = {{0x13b13b14, 0x3fb3b13b} }, /* 1/13 */
/**/ d14 = {{0x92492492, 0xbfb24924} }, /* -1/14 */
/**/ d15 = {{0x11111111, 0x3fb11111} }, /* 1/15 */
/**/ d16 = {{0x00000000, 0xbfb00000} }, /* -1/16 */
/**/ d17 = {{0x1e1e1e1e, 0x3fae1e1e} }, /* 1/17 */
/**/ d18 = {{0x1c71c71c, 0xbfac71c7} }, /* -1/18 */
/**/ d19 = {{0xbca1af28, 0x3faaf286} }, /* 1/19 */
/**/ d20 = {{0x9999999a, 0xbfa99999} }, /* -1/20 */
/* constants */
/**/ zero = {0x00000000, 0x00000000, }, /* 0 */
/**/ one = {0x00000000, 0x3ff00000, }, /* 1 */
/**/ half = {0x00000000, 0x3fe00000, }, /* 1/2 */
/**/ mhalf = {0x00000000, 0xbfe00000, }, /* -1/2 */
/**/ sqrt_2 = {0x667f3bcc, 0x3ff6a09e, }, /* sqrt(2) */
/**/ h1 = {0x00000000, 0x3fd2e000, }, /* 151/2**9 */
/**/ h2 = {0x00000000, 0x3f669000, }, /* 361/2**17 */
/**/ delu = {0x00000000, 0x3f700000, }, /* 1/2**8 */
/**/ delv = {0x00000000, 0x3ef00000, }, /* 1/2**16 */
/**/ ln2a = {0xfefa3800, 0x3fe62e42, }, /* ln(2) 43 bits */
/**/ ln2b = {0x93c76730, 0x3d2ef357, }, /* ln(2)-ln2a */
/**/ e1 = {0x00000000, 0x3bbcc868, }, /* 6.095e-21 */
/**/ e2 = {0x00000000, 0x3c1138ce, }, /* 2.334e-19 */
/**/ e3 = {0x00000000, 0x3aa1565d, }, /* 2.801e-26 */
/**/ e4 = {0x00000000, 0x39809d88, }, /* 1.024e-31 */
/**/ e[M] ={{0x00000000, 0x37da223a, }, /* 1.2e-39 */
/**/ {0x00000000, 0x35c851c4, }, /* 1.3e-49 */
/**/ {0x00000000, 0x2ab85e51, }, /* 6.8e-103 */
/**/ {0x00000000, 0x17383827, }},/* 8.1e-197 */
/**/ two54 = {0x00000000, 0x43500000, }, /* 2**54 */
/**/ u03 = {0xeb851eb8, 0x3f9eb851, }; /* 0.03 */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ half = {{0x00000000, 0x3fe00000} }, /* 1/2 */
/**/ mhalf = {{0x00000000, 0xbfe00000} }, /* -1/2 */
/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e} }, /* sqrt(2) */
/**/ h1 = {{0x00000000, 0x3fd2e000} }, /* 151/2**9 */
/**/ h2 = {{0x00000000, 0x3f669000} }, /* 361/2**17 */
/**/ delu = {{0x00000000, 0x3f700000} }, /* 1/2**8 */
/**/ delv = {{0x00000000, 0x3ef00000} }, /* 1/2**16 */
/**/ ln2a = {{0xfefa3800, 0x3fe62e42} }, /* ln(2) 43 bits */
/**/ ln2b = {{0x93c76730, 0x3d2ef357} }, /* ln(2)-ln2a */
/**/ e1 = {{0x00000000, 0x3bbcc868} }, /* 6.095e-21 */
/**/ e2 = {{0x00000000, 0x3c1138ce} }, /* 2.334e-19 */
/**/ e3 = {{0x00000000, 0x3aa1565d} }, /* 2.801e-26 */
/**/ e4 = {{0x00000000, 0x39809d88} }, /* 1.024e-31 */
/**/ e[M] ={{{0x00000000, 0x37da223a} }, /* 1.2e-39 */
/**/ {{0x00000000, 0x35c851c4} }, /* 1.3e-49 */
/**/ {{0x00000000, 0x2ab85e51} }, /* 6.8e-103 */
/**/ {{0x00000000, 0x17383827} }},/* 8.1e-197 */
/**/ two54 = {{0x00000000, 0x43500000} }, /* 2**54 */
/**/ u03 = {{0xeb851eb8, 0x3f9eb851} }; /* 0.03 */
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
@ -31,34 +31,34 @@
#ifdef BIG_ENDI
const static mynumber
/**/ INF = {0x7ff00000, 0x00000000 }, /* INF */
/**/ NaNQ = {0x7ff80000, 0x00000000 }, /* NaNQ */
/**/ sqrt_2 = {0x3ff6a09e, 0x667f3bcc }, /* sqrt(2) */
/**/ ln2a = {0x3fe62e42, 0xfefa3800 }, /* ln(2) 43 bits */
/**/ ln2b = {0x3d2ef357, 0x93c76730 }, /* ln(2)-ln2a */
/**/ bigu = {0x4297ffff, 0xfffffd2c }, /* 1.5*2**42 -724*2**-10 */
/**/ bigv = {0x4207ffff, 0xfff8016a }, /* 1.5*2**33-1+362*2**-19 */
/**/ t52 = {0x43300000, 0x00000000 }, /* 2**52 */
/**/ two52e = {0x43300000, 0x000003ff }; /* 2**52' */
/**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */
/**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */
/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */
/**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */
/**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */
/**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */
/**/ bigv = {{0x4207ffff, 0xfff8016a}}, /* 1.5*2**33-1+362*2**-19 */
/**/ t52 = {{0x43300000, 0x00000000}}, /* 2**52 */
/**/ two52e = {{0x43300000, 0x000003ff}}; /* 2**52' */
mynumber
/**/ two52 = {0x43300000, 0x00000000 }; /* 2**52 */
/**/ two52 = {{0x43300000, 0x00000000}}; /* 2**52 */
#else
#ifdef LITTLE_ENDI
const static mynumber
/**/ INF = {0x00000000, 0x7ff00000 }, /* INF */
/**/ NaNQ = {0x00000000, 0x7ff80000 }, /* NaNQ */
/**/ sqrt_2 = {0x667f3bcc, 0x3ff6a09e }, /* sqrt(2) */
/**/ ln2a = {0xfefa3800, 0x3fe62e42 }, /* ln(2) 43 bits */
/**/ ln2b = {0x93c76730, 0x3d2ef357 }, /* ln(2)-ln2a */
/**/ bigu = {0xfffffd2c, 0x4297ffff }, /* 1.5*2**42 -724*2**-10 */
/**/ bigv = {0xfff8016a, 0x4207ffff }, /* 1.5*2**33-1+362*2**-19 */
/**/ t52 = {0x00000000, 0x43300000 }, /* 2**52 */
/**/ two52e = {0x000003ff, 0x43300000 }; /* 2**52' */
/**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */
/**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */
/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */
/**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */
/**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */
/**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */
/**/ bigv = {{0xfff8016a, 0x4207ffff}}, /* 1.5*2**33-1+362*2**-19 */
/**/ t52 = {{0x00000000, 0x43300000}}, /* 2**52 */
/**/ two52e = {{0x000003ff, 0x43300000}}; /* 2**52' */
mynumber
/**/ two52 = {0x00000000, 0x43300000 }; /* 2**52 */
/**/ two52 = {{0x00000000, 0x43300000}}; /* 2**52 */
#endif
#endif

View File

@ -5,7 +5,7 @@
#ifdef BIG_ENDI
static const union {int4 i[5800]; double x[2900];} ui = {
static const union {int4 i[5800]; double x[2900];} ui = { .i = {
/**/ 0x3FF6A000, 0x00000000,
/**/ 0x3F33CD15, 0x3729043E,
/**/ 0xBFD63003, 0x0B3AB000,
@ -2905,9 +2905,9 @@ static const union {int4 i[5800]; double x[2900];} ui = {
/**/ 0x3FE6A000, 0x00000000,
/**/ 0x3F23CD15, 0x3729043E,
/**/ 0x3FD62C82, 0xF2B9C000,
/**/ 0x3D3E54BD, 0xBD7C8A98 };
/**/ 0x3D3E54BD, 0xBD7C8A98 } };
static const union {int4 i[4350]; double x[2175]; } vj = {
static const union {int4 i[4350]; double x[2175]; } vj = { .i = {
/**/ 0x3F46A400, 0x7D161C28,
/**/ 0xBF46A200, 0x20600000,
/**/ 0x3D27DC4E, 0xAA7623D9,
@ -5082,11 +5082,11 @@ static const union {int4 i[4350]; double x[2175]; } vj = {
/**/ 0x3D350532, 0xEA560DA0,
/**/ 0xBF469C00, 0xECD62326,
/**/ 0x3F469E00, 0x58400000,
/**/ 0x3D341557, 0xE7B63DE2 };
/**/ 0x3D341557, 0xE7B63DE2 } };
#else
#ifdef LITTLE_ENDI
static const union {int4 i[5800]; double x[2900];} ui = {
static const union {int4 i[5800]; double x[2900];} ui = { .i = {
/**/ 0x00000000, 0x3FF6A000,
/**/ 0x3729043E, 0x3F33CD15,
/**/ 0x0B3AB000, 0xBFD63003,
@ -7986,9 +7986,9 @@ static const union {int4 i[5800]; double x[2900];} ui = {
/**/ 0x00000000, 0x3FE6A000,
/**/ 0x3729043E, 0x3F23CD15,
/**/ 0xF2B9C000, 0x3FD62C82,
/**/ 0xBD7C8A98, 0x3D3E54BD };
/**/ 0xBD7C8A98, 0x3D3E54BD } };
static const union {int4 i[4350]; double x[2175]; } vj = {
static const union {int4 i[4350]; double x[2175]; } vj = { .i = {
/**/ 0x7D161C28, 0x3F46A400,
/**/ 0x20600000, 0xBF46A200,
/**/ 0xAA7623D9, 0x3D27DC4E,
@ -10163,7 +10163,7 @@ static const union {int4 i[4350]; double x[2175]; } vj = {
/**/ 0xEA560DA0, 0x3D350532,
/**/ 0xECD62326, 0xBF469C00,
/**/ 0x58400000, 0x3F469E00,
/**/ 0xE7B63DE2, 0x3D341557 };
/**/ 0xE7B63DE2, 0x3D341557 } };
#endif
#endif

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: urem.h */
@ -26,24 +26,24 @@
#ifndef UREM_H
#define UREM_H
#ifdef BIG_ENDI
static const mynumber big = {0x43380000, 0}, /* 6755399441055744 */
t128 = {0x47f00000, 0}, /* 2^ 128 */
tm128 = {0x37f00000, 0}, /* 2^-128 */
ZERO = {0, 0}, /* 0.0 */
nZERO = {0x80000000, 0}, /* -0.0 */
NAN = {0x7ff80000, 0}, /* NaN */
nNAN = {0xfff80000, 0}; /* -NaN */
static const mynumber big = {{0x43380000, 0}}, /* 6755399441055744 */
t128 = {{0x47f00000, 0}}, /* 2^ 128 */
tm128 = {{0x37f00000, 0}}, /* 2^-128 */
ZERO = {{0, 0}}, /* 0.0 */
nZERO = {{0x80000000, 0}}, /* -0.0 */
NAN = {{0x7ff80000, 0}}, /* NaN */
nNAN = {{0xfff80000, 0}}; /* -NaN */
#else
#ifdef LITTLE_ENDI
static const mynumber big = {0, 0x43380000}, /* 6755399441055744 */
t128 = {0, 0x47f00000}, /* 2^ 128 */
tm128 = {0, 0x37f00000}, /* 2^-128 */
ZERO = {0, 0}, /* 0.0 */
nZERO = {0, 0x80000000}, /* -0.0 */
NAN = {0, 0x7ff80000}, /* NaN */
nNAN = {0, 0xfff80000}; /* -NaN */
static const mynumber big = {{0, 0x43380000}}, /* 6755399441055744 */
t128 = {{0, 0x47f00000}}, /* 2^ 128 */
tm128 = {{0, 0x37f00000}}, /* 2^-128 */
ZERO = {{0, 0}}, /* 0.0 */
nZERO = {{0, 0x80000000}}, /* -0.0 */
NAN = {{0, 0x7ff80000}}, /* NaN */
nNAN = {{0, 0xfff80000}}; /* -NaN */
#endif
#endif

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: dosincos.h */
@ -30,47 +30,47 @@
#ifdef BIG_ENDI
static const mynumber
/**/ NAN = {0x7ff80000, 0x00000000 }, /* NaN */
/**/ s1 = {0xBFC55555, 0x55555555 }, /* -0.16666666666666666 */
/**/ s2 = {0x3F811111, 0x11110ECE }, /* 0.0083333333333323288 */
/**/ s3 = {0xBF2A01A0, 0x19DB08B8 }, /* -0.00019841269834414642 */
/**/ s4 = {0x3EC71DE2, 0x7B9A7ED9 }, /* 2.755729806860771e-06 */
/**/ s5 = {0xBE5ADDFF, 0xC2FCDF59 }, /* -2.5022014848318398e-08 */
/**/ aa = {0xBFC55580, 0x00000000 }, /* -0.1666717529296875 */
/**/ bb = {0x3ED55555, 0x55556E24 }, /* 5.0862630208387126e-06 */
/**/ big = {0x42c80000, 0x00000000 }, /* 52776558133248 */
/**/ hp0 = {0x3FF921FB, 0x54442D18 }, /* 1.5707963267948966 */
/**/ hp1 = {0x3C91A626, 0x33145C07 }, /* 6.123233995736766e-17 */
/**/ mp1 = {0x3FF921FB, 0x58000000 }, /* 1.5707963407039642 */
/**/ mp2 = {0xBE4DDE97, 0x3C000000 }, /* -1.3909067564377153e-08 */
/**/ mp3 = {0xBC8CB3B3, 0x99D747F2 }, /* -4.9789962505147994e-17 */
/**/ pp3 = {0xBC8CB3B3, 0x98000000 }, /* -4.9789962314799099e-17 */
/**/ pp4 = {0xbacd747f, 0x23e32ed7 }, /* -1.9034889620193266e-25 */
/**/ hpinv = {0x3FE45F30, 0x6DC9C883 }, /* 0.63661977236758138 */
/**/ toint = {0x43380000, 0x00000000 }; /* 6755399441055744 */
/**/ NAN = {{0x7ff80000, 0x00000000 }}, /* NaN */
/**/ s1 = {{0xBFC55555, 0x55555555 }}, /* -0.16666666666666666 */
/**/ s2 = {{0x3F811111, 0x11110ECE }}, /* 0.0083333333333323288 */
/**/ s3 = {{0xBF2A01A0, 0x19DB08B8 }}, /* -0.00019841269834414642 */
/**/ s4 = {{0x3EC71DE2, 0x7B9A7ED9 }}, /* 2.755729806860771e-06 */
/**/ s5 = {{0xBE5ADDFF, 0xC2FCDF59 }}, /* -2.5022014848318398e-08 */
/**/ aa = {{0xBFC55580, 0x00000000 }}, /* -0.1666717529296875 */
/**/ bb = {{0x3ED55555, 0x55556E24 }}, /* 5.0862630208387126e-06 */
/**/ big = {{0x42c80000, 0x00000000 }}, /* 52776558133248 */
/**/ hp0 = {{0x3FF921FB, 0x54442D18 }}, /* 1.5707963267948966 */
/**/ hp1 = {{0x3C91A626, 0x33145C07 }}, /* 6.123233995736766e-17 */
/**/ mp1 = {{0x3FF921FB, 0x58000000 }}, /* 1.5707963407039642 */
/**/ mp2 = {{0xBE4DDE97, 0x3C000000 }}, /* -1.3909067564377153e-08 */
/**/ mp3 = {{0xBC8CB3B3, 0x99D747F2 }}, /* -4.9789962505147994e-17 */
/**/ pp3 = {{0xBC8CB3B3, 0x98000000 }}, /* -4.9789962314799099e-17 */
/**/ pp4 = {{0xbacd747f, 0x23e32ed7 }}, /* -1.9034889620193266e-25 */
/**/ hpinv = {{0x3FE45F30, 0x6DC9C883 }}, /* 0.63661977236758138 */
/**/ toint = {{0x43380000, 0x00000000 }}; /* 6755399441055744 */
#else
#ifdef LITTLE_ENDI
static const mynumber
/**/ NAN = {0x00000000, 0x7ff80000 },/* NaN */
/**/ s1 = {0x55555555, 0xBFC55555 },/* -0.16666666666666666 */
/**/ s2 = {0x11110ECE, 0x3F811111 },/* 0.0083333333333323288 */
/**/ s3 = {0x19DB08B8, 0xBF2A01A0 },/* -0.00019841269834414642 */
/**/ s4 = {0x7B9A7ED9, 0x3EC71DE2 },/* 2.755729806860771e-06 */
/**/ s5 = {0xC2FCDF59, 0xBE5ADDFF },/* -2.5022014848318398e-08 */
/**/ aa = {0x00000000, 0xBFC55580 },/* -0.1666717529296875 */
/**/ bb = {0x55556E24, 0x3ED55555 },/* 5.0862630208387126e-06 */
/**/ big = {0x00000000, 0x42c80000 },/* 52776558133248 */
/**/ hp0 = {0x54442D18, 0x3FF921FB },/* 1.5707963267948966 */
/**/ hp1 = {0x33145C07, 0x3C91A626 },/* 6.123233995736766e-17 */
/**/ mp1 = {0x58000000, 0x3FF921FB },/* 1.5707963407039642 */
/**/ mp2 = {0x3C000000, 0xBE4DDE97 },/* -1.3909067564377153e-08 */
/**/ mp3 = {0x99D747F2, 0xBC8CB3B3 },/* -4.9789962505147994e-17 */
/**/ pp3 = {0x98000000, 0xBC8CB3B3 },/* -4.9789962314799099e-17 */
/**/ pp4 = {0x23e32ed7, 0xbacd747f },/* -1.9034889620193266e-25 */
/**/ hpinv = {0x6DC9C883, 0x3FE45F30 },/* 0.63661977236758138 */
/**/ toint = {0x00000000, 0x43380000 };/* 6755399441055744 */
/**/ NAN = {{0x00000000, 0x7ff80000 }},/* NaN */
/**/ s1 = {{0x55555555, 0xBFC55555 }},/* -0.16666666666666666 */
/**/ s2 = {{0x11110ECE, 0x3F811111 }},/* 0.0083333333333323288 */
/**/ s3 = {{0x19DB08B8, 0xBF2A01A0 }},/* -0.00019841269834414642 */
/**/ s4 = {{0x7B9A7ED9, 0x3EC71DE2 }},/* 2.755729806860771e-06 */
/**/ s5 = {{0xC2FCDF59, 0xBE5ADDFF }},/* -2.5022014848318398e-08 */
/**/ aa = {{0x00000000, 0xBFC55580 }},/* -0.1666717529296875 */
/**/ bb = {{0x55556E24, 0x3ED55555 }},/* 5.0862630208387126e-06 */
/**/ big = {{0x00000000, 0x42c80000 }},/* 52776558133248 */
/**/ hp0 = {{0x54442D18, 0x3FF921FB }},/* 1.5707963267948966 */
/**/ hp1 = {{0x33145C07, 0x3C91A626 }},/* 6.123233995736766e-17 */
/**/ mp1 = {{0x58000000, 0x3FF921FB }},/* 1.5707963407039642 */
/**/ mp2 = {{0x3C000000, 0xBE4DDE97 }},/* -1.3909067564377153e-08 */
/**/ mp3 = {{0x99D747F2, 0xBC8CB3B3 }},/* -4.9789962505147994e-17 */
/**/ pp3 = {{0x98000000, 0xBC8CB3B3 }},/* -4.9789962314799099e-17 */
/**/ pp4 = {{0x23e32ed7, 0xbacd747f }},/* -1.9034889620193266e-25 */
/**/ hpinv = {{0x6DC9C883, 0x3FE45F30 }},/* 0.63661977236758138 */
/**/ toint = {{0x00000000, 0x43380000 }};/* 6755399441055744 */
#endif

View File

@ -5,9 +5,9 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
@ -30,214 +30,242 @@
#ifdef BIG_ENDI
static const number
/* polynomial I */
/**/ d3 = {0x3FD55555, 0x55555555, }, /* 0.333... */
/**/ d5 = {0x3FC11111, 0x111107C6, }, /* 0.133... */
/**/ d7 = {0x3FABA1BA, 0x1CDB8745, }, /* . */
/**/ d9 = {0x3F9664ED, 0x49CFC666, }, /* . */
/**/ d11 = {0x3F82385A, 0x3CF2E4EA, }, /* . */
/**/ d3 = {{0x3FD55555, 0x55555555} }, /* 0.333... */
/**/ d5 = {{0x3FC11111, 0x111107C6} }, /* 0.133... */
/**/ d7 = {{0x3FABA1BA, 0x1CDB8745} }, /* . */
/**/ d9 = {{0x3F9664ED, 0x49CFC666} }, /* . */
/**/ d11 = {{0x3F82385A, 0x3CF2E4EA} }, /* . */
/* polynomial II */
/**/ a3 = {0x3fd55555, 0x55555555, }, /* 1/3 */
/**/ aa3 = {0x3c755555, 0x55555555, }, /* 1/3-a3 */
/**/ a5 = {0x3fc11111, 0x11111111, }, /* 2/15 */
/**/ aa5 = {0x3c411111, 0x11111111, }, /* 2/15-a5 */
/**/ a7 = {0x3faba1ba, 0x1ba1ba1c, }, /* 17/315 */
/**/ aa7 = {0xbc479179, 0x17917918, }, /* ()-a7 */
/**/ a9 = {0x3f9664f4, 0x882c10fa, }, /* 62/2835 */
/**/ aa9 = {0xbc09a528, 0x8b6c44fd, }, /* ()-a9 */
/**/ a11 = {0x3f8226e3, 0x55e6c23d, }, /* . */
/**/ aa11 = {0xbc2c292b, 0x8f1a2c13, }, /* . */
/**/ a13 = {0x3f6d6d3d, 0x0e157de0, }, /* . */
/**/ aa13 = {0xbc0280cf, 0xc968d971, }, /* . */
/**/ a15 = {0x3f57da36, 0x452b75e3, }, /* . */
/**/ aa15 = {0xbbf25789, 0xb285d2ed, }, /* . */
/**/ a17 = {0x3f435582, 0x48036744, }, /* . */
/**/ aa17 = {0x3be488d9, 0x563f1f23, }, /* . */
/**/ a19 = {0x3f2f57d7, 0x734d1664, }, /* . */
/**/ aa19 = {0x3bb0d55a, 0x913ccb50, }, /* . */
/**/ a21 = {0x3f1967e1, 0x8afcafad, }, /* . */
/**/ aa21 = {0xbbbd7614, 0xa42d44e6, }, /* . */
/**/ a23 = {0x3f0497d8, 0xeea25259, }, /* . */
/**/ aa23 = {0x3b99f2d0, 0x2e4d2863, }, /* . */
/**/ a25 = {0x3ef0b132, 0xd39a6050, }, /* . */
/**/ aa25 = {0x3b93b274, 0xc2c19614, }, /* . */
/**/ a27 = {0x3edb0f72, 0xd3ee24e9, }, /* . */
/**/ aa27 = {0x3b61688d, 0xdd595609, }, /* . */
/**/ a3 = {{0x3fd55555, 0x55555555} }, /* 1/3 */
/**/ aa3 = {{0x3c755555, 0x55555555} }, /* 1/3-a3 */
/**/ a5 = {{0x3fc11111, 0x11111111} }, /* 2/15 */
/**/ aa5 = {{0x3c411111, 0x11111111} }, /* 2/15-a5 */
/**/ a7 = {{0x3faba1ba, 0x1ba1ba1c} }, /* 17/315 */
/**/ aa7 = {{0xbc479179, 0x17917918} }, /* ()-a7 */
/**/ a9 = {{0x3f9664f4, 0x882c10fa} }, /* 62/2835 */
/**/ aa9 = {{0xbc09a528, 0x8b6c44fd} }, /* ()-a9 */
/**/ a11 = {{0x3f8226e3, 0x55e6c23d} }, /* . */
/**/ aa11 = {{0xbc2c292b, 0x8f1a2c13} }, /* . */
/**/ a13 = {{0x3f6d6d3d, 0x0e157de0} }, /* . */
/**/ aa13 = {{0xbc0280cf, 0xc968d971} }, /* . */
/**/ a15 = {{0x3f57da36, 0x452b75e3} }, /* . */
#if 0
/**/ aa15 = {{0xbbf25789, 0xb285d2ed} }, /* . */
#endif
/**/ a17 = {{0x3f435582, 0x48036744} }, /* . */
#if 0
/**/ aa17 = {{0x3be488d9, 0x563f1f23} }, /* . */
#endif
/**/ a19 = {{0x3f2f57d7, 0x734d1664} }, /* . */
#if 0
/**/ aa19 = {{0x3bb0d55a, 0x913ccb50} }, /* . */
#endif
/**/ a21 = {{0x3f1967e1, 0x8afcafad} }, /* . */
#if 0
/**/ aa21 = {{0xbbbd7614, 0xa42d44e6} }, /* . */
#endif
/**/ a23 = {{0x3f0497d8, 0xeea25259} }, /* . */
#if 0
/**/ aa23 = {{0x3b99f2d0, 0x2e4d2863} }, /* . */
#endif
/**/ a25 = {{0x3ef0b132, 0xd39a6050} }, /* . */
#if 0
/**/ aa25 = {{0x3b93b274, 0xc2c19614} }, /* . */
#endif
/**/ a27 = {{0x3edb0f72, 0xd3ee24e9} }, /* . */
#if 0
/**/ aa27 = {{0x3b61688d, 0xdd595609} }, /* . */
#endif
/* polynomial III */
/**/ e0 = {0x3FD55555, 0x55554DBD, }, /* . */
/**/ e1 = {0x3FC11112, 0xE0A6B45F, }, /* . */
/**/ e0 = {{0x3FD55555, 0x55554DBD} }, /* . */
/**/ e1 = {{0x3FC11112, 0xE0A6B45F} }, /* . */
/* constants */
/**/ zero = {0x00000000, 0x00000000, }, /* 0 */
/**/ one = {0x3ff00000, 0x00000000, }, /* 1 */
/**/ mone = {0xbff00000, 0x00000000, }, /*-1 */
/**/ mfftnhf = {0xc02f0000, 0x00000000, }, /*-15.5 */
/**/ two8 = {0x40700000, 0x00000000, }, /* 256 */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ mone = {{0xbff00000, 0x00000000} }, /*-1 */
/**/ mfftnhf = {{0xc02f0000, 0x00000000} }, /*-15.5 */
/**/ two8 = {{0x40700000, 0x00000000} }, /* 256 */
/**/ g1 = {0x3e4b096c, 0x00000000, }, /* 1.259e-8 */
/**/ g2 = {0x3faf212d, 0x00000000, }, /* 0.0608 */
/**/ g3 = {0x3fe92f1a, 0x00000000, }, /* 0.787 */
/**/ g4 = {0x40390000, 0x00000000, }, /* 25.0 */
/**/ g5 = {0x4197d784, 0x00000000, }, /* 1e8 */
/**/ gy1 = {0x3e7ad7f2, 0x9abcaf48, }, /* 1e-7 */
/**/ gy2 = {0x3faf212d, 0x00000000, }, /* 0.0608 */
/**/ g1 = {{0x3e4b096c, 0x00000000} }, /* 1.259e-8 */
/**/ g2 = {{0x3faf212d, 0x00000000} }, /* 0.0608 */
/**/ g3 = {{0x3fe92f1a, 0x00000000} }, /* 0.787 */
/**/ g4 = {{0x40390000, 0x00000000} }, /* 25.0 */
/**/ g5 = {{0x4197d784, 0x00000000} }, /* 1e8 */
/**/ gy1 = {{0x3e7ad7f2, 0x9abcaf48} }, /* 1e-7 */
/**/ gy2 = {{0x3faf212d, 0x00000000} }, /* 0.0608 */
/**/ u1 = {0x3cc8c33a, 0x00000000, }, /* 6.873e-16 */
/**/ u2 = {0x3983dc4d, 0x00000000, }, /* 1.224e-31 */
/**/ u3 = {0x3c78e14b, 0x00000000, }, /* 2.158e-17 */
/**/ ua3 = {0x3bfd8b58, 0x00000000, }, /* 1.001e-19 */
/**/ ub3 = {0x3cc81898, 0x00000000, }, /* 6.688e-16 */
/**/ u4 = {0x399856c2, 0x00000000, }, /* 3e-31 */
/**/ u5 = {0x3c39d80a, 0x00000000, }, /* 1.401e-18 */
/**/ u6 = {0x3c374c5a, 0x00000000, }, /* 1.263e-18 */
/**/ u7 = {0x39903beb, 0x00000000, }, /* 2.001e-31 */
/**/ u8 = {0x399c56ae, 0x00000000, }, /* 3.493e-31 */
/**/ u9 = {0x3c7d0ac7, 0x00000000, }, /* 2.519e-17 */
/**/ ua9 = {0x3bfd8b58, 0x00000000, }, /* 1.001e-19 */
/**/ ub9 = {0x3ccc2375, 0x00000000, }, /* 7.810e-16 */
/**/ u10 = {0x3c7e40af, 0x00000000, }, /* 2.624e-17 */
/**/ ua10 = {0x3bfd8b58, 0x00000000, }, /* 1.001e-19 */
/**/ ub10 = {0x3ccc6405, 0x00000000, }, /* 7.880e-16 */
/**/ u11 = {0x39e509b6, 0x00000000, }, /* 8.298e-30 */
/**/ u12 = {0x39e509b6, 0x00000000, }, /* 8.298e-30 */
/**/ u13 = {0x3c39d80a, 0x00000000, }, /* 1.401e-18 */
/**/ u14 = {0x3c374c5a, 0x00000000, }, /* 1.263e-18 */
/**/ u15 = {0x3ab5767a, 0x00000000, }, /* 6.935e-26 */
/**/ u16 = {0x3ab57744, 0x00000000, }, /* 6.936e-26 */
/**/ u17 = {0x3c7d0ac7, 0x00000000, }, /* 2.519e-17 */
/**/ ua17 = {0x3bfdb11f, 0x00000000, }, /* 1.006e-19 */
/**/ ub17 = {0x3ccc2375, 0x00000000, }, /* 7.810e-16 */
/**/ u18 = {0x3c7e40af, 0x00000000, }, /* 2.624e-17 */
/**/ ua18 = {0x3bfdb11f, 0x00000000, }, /* 1.006e-19 */
/**/ ub18 = {0x3ccc6405, 0x00000000, }, /* 7.880e-16 */
/**/ u19 = {0x39a13b61, 0x00000000, }, /* 4.248e-31 */
/**/ u20 = {0x39a13b61, 0x00000000, }, /* 4.248e-31 */
/**/ u21 = {0x3c3bb9b8, 0x00000000, }, /* 1.503e-18 */
/**/ u22 = {0x3c392e08, 0x00000000, }, /* 1.365e-18 */
/**/ u23 = {0x3a0ce706, 0x00000000, }, /* 4.560e-29 */
/**/ u24 = {0x3a0cff5d, 0x00000000, }, /* 4.575e-29 */
/**/ u25 = {0x3c7d0ac7, 0x00000000, }, /* 2.519e-17 */
/**/ ua25 = {0x3bfd8b58, 0x00000000, }, /* 1.001e-19 */
/**/ ub25 = {0x3ccc2375, 0x00000000, }, /* 7.810e-16 */
/**/ u26 = {0x3c7e40af, 0x00000000, }, /* 2.624e-17 */
/**/ ua26 = {0x3bfd8b58, 0x00000000, }, /* 1.001e-19 */
/**/ ub26 = {0x3ccc6405, 0x00000000, }, /* 7.880e-16 */
/**/ u27 = {0x3ad421cb, 0x00000000, }, /* 2.602e-25 */
/**/ u28 = {0x3ad421cb, 0x00000000, }, /* 2.602e-25 */
/**/ u1 = {{0x3cc8c33a, 0x00000000} }, /* 6.873e-16 */
/**/ u2 = {{0x3983dc4d, 0x00000000} }, /* 1.224e-31 */
/**/ u3 = {{0x3c78e14b, 0x00000000} }, /* 2.158e-17 */
/**/ ua3 = {{0x3bfd8b58, 0x00000000} }, /* 1.001e-19 */
/**/ ub3 = {{0x3cc81898, 0x00000000} }, /* 6.688e-16 */
/**/ u4 = {{0x399856c2, 0x00000000} }, /* 3e-31 */
/**/ u5 = {{0x3c39d80a, 0x00000000} }, /* 1.401e-18 */
/**/ u6 = {{0x3c374c5a, 0x00000000} }, /* 1.263e-18 */
/**/ u7 = {{0x39903beb, 0x00000000} }, /* 2.001e-31 */
/**/ u8 = {{0x399c56ae, 0x00000000} }, /* 3.493e-31 */
/**/ u9 = {{0x3c7d0ac7, 0x00000000} }, /* 2.519e-17 */
/**/ ua9 = {{0x3bfd8b58, 0x00000000} }, /* 1.001e-19 */
/**/ ub9 = {{0x3ccc2375, 0x00000000} }, /* 7.810e-16 */
/**/ u10 = {{0x3c7e40af, 0x00000000} }, /* 2.624e-17 */
/**/ ua10 = {{0x3bfd8b58, 0x00000000} }, /* 1.001e-19 */
/**/ ub10 = {{0x3ccc6405, 0x00000000} }, /* 7.880e-16 */
/**/ u11 = {{0x39e509b6, 0x00000000} }, /* 8.298e-30 */
/**/ u12 = {{0x39e509b6, 0x00000000} }, /* 8.298e-30 */
/**/ u13 = {{0x3c39d80a, 0x00000000} }, /* 1.401e-18 */
/**/ u14 = {{0x3c374c5a, 0x00000000} }, /* 1.263e-18 */
/**/ u15 = {{0x3ab5767a, 0x00000000} }, /* 6.935e-26 */
/**/ u16 = {{0x3ab57744, 0x00000000} }, /* 6.936e-26 */
/**/ u17 = {{0x3c7d0ac7, 0x00000000} }, /* 2.519e-17 */
/**/ ua17 = {{0x3bfdb11f, 0x00000000} }, /* 1.006e-19 */
/**/ ub17 = {{0x3ccc2375, 0x00000000} }, /* 7.810e-16 */
/**/ u18 = {{0x3c7e40af, 0x00000000} }, /* 2.624e-17 */
/**/ ua18 = {{0x3bfdb11f, 0x00000000} }, /* 1.006e-19 */
/**/ ub18 = {{0x3ccc6405, 0x00000000} }, /* 7.880e-16 */
/**/ u19 = {{0x39a13b61, 0x00000000} }, /* 4.248e-31 */
/**/ u20 = {{0x39a13b61, 0x00000000} }, /* 4.248e-31 */
/**/ u21 = {{0x3c3bb9b8, 0x00000000} }, /* 1.503e-18 */
/**/ u22 = {{0x3c392e08, 0x00000000} }, /* 1.365e-18 */
/**/ u23 = {{0x3a0ce706, 0x00000000} }, /* 4.560e-29 */
/**/ u24 = {{0x3a0cff5d, 0x00000000} }, /* 4.575e-29 */
/**/ u25 = {{0x3c7d0ac7, 0x00000000} }, /* 2.519e-17 */
/**/ ua25 = {{0x3bfd8b58, 0x00000000} }, /* 1.001e-19 */
/**/ ub25 = {{0x3ccc2375, 0x00000000} }, /* 7.810e-16 */
/**/ u26 = {{0x3c7e40af, 0x00000000} }, /* 2.624e-17 */
/**/ ua26 = {{0x3bfd8b58, 0x00000000} }, /* 1.001e-19 */
/**/ ub26 = {{0x3ccc6405, 0x00000000} }, /* 7.880e-16 */
/**/ u27 = {{0x3ad421cb, 0x00000000} }, /* 2.602e-25 */
/**/ u28 = {{0x3ad421cb, 0x00000000} }, /* 2.602e-25 */
/**/ mp1 = {0x3FF921FB, 0x58000000, },
/**/ mp2 = {0xBE4DDE97, 0x3C000000, },
/**/ mp3 = {0xBC8CB3B3, 0x99D747F2, },
/**/ pp3 = {0xBC8CB3B3, 0x98000000, },
/**/ pp4 = {0xbacd747f, 0x23e32ed7, },
/**/ hpinv = {0x3FE45F30, 0x6DC9C883, },
/**/ toint = {0x43380000, 0x00000000, };
/**/ mp1 = {{0x3FF921FB, 0x58000000} },
/**/ mp2 = {{0xBE4DDE97, 0x3C000000} },
/**/ mp3 = {{0xBC8CB3B3, 0x99D747F2} },
/**/ pp3 = {{0xBC8CB3B3, 0x98000000} },
/**/ pp4 = {{0xbacd747f, 0x23e32ed7} },
/**/ hpinv = {{0x3FE45F30, 0x6DC9C883} },
/**/ toint = {{0x43380000, 0x00000000} };
#else
#ifdef LITTLE_ENDI
static const number
/* polynomial I */
/**/ d3 = {0x55555555, 0x3FD55555, }, /* 0.333... */
/**/ d5 = {0x111107C6, 0x3FC11111, }, /* 0.133... */
/**/ d7 = {0x1CDB8745, 0x3FABA1BA, }, /* . */
/**/ d9 = {0x49CFC666, 0x3F9664ED, }, /* . */
/**/ d11 = {0x3CF2E4EA, 0x3F82385A, }, /* . */
/**/ d3 = {{0x55555555, 0x3FD55555} }, /* 0.333... */
/**/ d5 = {{0x111107C6, 0x3FC11111} }, /* 0.133... */
/**/ d7 = {{0x1CDB8745, 0x3FABA1BA} }, /* . */
/**/ d9 = {{0x49CFC666, 0x3F9664ED} }, /* . */
/**/ d11 = {{0x3CF2E4EA, 0x3F82385A} }, /* . */
/* polynomial II */
/**/ a3 = {0x55555555, 0x3fd55555, }, /* 1/3 */
/**/ aa3 = {0x55555555, 0x3c755555, }, /* 1/3-a3 */
/**/ a5 = {0x11111111, 0x3fc11111, }, /* 2/15 */
/**/ aa5 = {0x11111111, 0x3c411111, }, /* 2/15-a5 */
/**/ a7 = {0x1ba1ba1c, 0x3faba1ba, }, /* 17/315 */
/**/ aa7 = {0x17917918, 0xbc479179, }, /* ()-a7 */
/**/ a9 = {0x882c10fa, 0x3f9664f4, }, /* 62/2835 */
/**/ aa9 = {0x8b6c44fd, 0xbc09a528, }, /* ()-a9 */
/**/ a11 = {0x55e6c23d, 0x3f8226e3, }, /* . */
/**/ aa11 = {0x8f1a2c13, 0xbc2c292b, }, /* . */
/**/ a13 = {0x0e157de0, 0x3f6d6d3d, }, /* . */
/**/ aa13 = {0xc968d971, 0xbc0280cf, }, /* . */
/**/ a15 = {0x452b75e3, 0x3f57da36, }, /* . */
/**/ aa15 = {0xb285d2ed, 0xbbf25789, }, /* . */
/**/ a17 = {0x48036744, 0x3f435582, }, /* . */
/**/ aa17 = {0x563f1f23, 0x3be488d9, }, /* . */
/**/ a19 = {0x734d1664, 0x3f2f57d7, }, /* . */
/**/ aa19 = {0x913ccb50, 0x3bb0d55a, }, /* . */
/**/ a21 = {0x8afcafad, 0x3f1967e1, }, /* . */
/**/ aa21 = {0xa42d44e6, 0xbbbd7614, }, /* . */
/**/ a23 = {0xeea25259, 0x3f0497d8, }, /* . */
/**/ aa23 = {0x2e4d2863, 0x3b99f2d0, }, /* . */
/**/ a25 = {0xd39a6050, 0x3ef0b132, }, /* . */
/**/ aa25 = {0xc2c19614, 0x3b93b274, }, /* . */
/**/ a27 = {0xd3ee24e9, 0x3edb0f72, }, /* . */
/**/ aa27 = {0xdd595609, 0x3b61688d, }, /* . */
/**/ a3 = {{0x55555555, 0x3fd55555} }, /* 1/3 */
/**/ aa3 = {{0x55555555, 0x3c755555} }, /* 1/3-a3 */
/**/ a5 = {{0x11111111, 0x3fc11111} }, /* 2/15 */
/**/ aa5 = {{0x11111111, 0x3c411111} }, /* 2/15-a5 */
/**/ a7 = {{0x1ba1ba1c, 0x3faba1ba} }, /* 17/315 */
/**/ aa7 = {{0x17917918, 0xbc479179} }, /* ()-a7 */
/**/ a9 = {{0x882c10fa, 0x3f9664f4} }, /* 62/2835 */
/**/ aa9 = {{0x8b6c44fd, 0xbc09a528} }, /* ()-a9 */
/**/ a11 = {{0x55e6c23d, 0x3f8226e3} }, /* . */
/**/ aa11 = {{0x8f1a2c13, 0xbc2c292b} }, /* . */
/**/ a13 = {{0x0e157de0, 0x3f6d6d3d} }, /* . */
/**/ aa13 = {{0xc968d971, 0xbc0280cf} }, /* . */
/**/ a15 = {{0x452b75e3, 0x3f57da36} }, /* . */
#if 0
/**/ aa15 = {{0xb285d2ed, 0xbbf25789} }, /* . */
#endif
/**/ a17 = {{0x48036744, 0x3f435582} }, /* . */
#if 0
/**/ aa17 = {{0x563f1f23, 0x3be488d9} }, /* . */
#endif
/**/ a19 = {{0x734d1664, 0x3f2f57d7} }, /* . */
#if 0
/**/ aa19 = {{0x913ccb50, 0x3bb0d55a} }, /* . */
#endif
/**/ a21 = {{0x8afcafad, 0x3f1967e1} }, /* . */
#if 0
/**/ aa21 = {{0xa42d44e6, 0xbbbd7614} }, /* . */
#endif
/**/ a23 = {{0xeea25259, 0x3f0497d8} }, /* . */
#if 0
/**/ aa23 = {{0x2e4d2863, 0x3b99f2d0} }, /* . */
#endif
/**/ a25 = {{0xd39a6050, 0x3ef0b132} }, /* . */
#if 0
/**/ aa25 = {{0xc2c19614, 0x3b93b274} }, /* . */
#endif
/**/ a27 = {{0xd3ee24e9, 0x3edb0f72} }, /* . */
#if 0
/**/ aa27 = {{0xdd595609, 0x3b61688d} }, /* . */
#endif
/* polynomial III */
/**/ e0 = {0x55554DBD, 0x3FD55555, }, /* . */
/**/ e1 = {0xE0A6B45F, 0x3FC11112, }, /* . */
/**/ e0 = {{0x55554DBD, 0x3FD55555} }, /* . */
/**/ e1 = {{0xE0A6B45F, 0x3FC11112} }, /* . */
/* constants */
/**/ zero = {0x00000000, 0x00000000, }, /* 0 */
/**/ one = {0x00000000, 0x3ff00000, }, /* 1 */
/**/ mone = {0x00000000, 0xbff00000, }, /*-1 */
/**/ mfftnhf = {0x00000000, 0xc02f0000, }, /*-15.5 */
/**/ two8 = {0x00000000, 0x40700000, }, /* 256 */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ mone = {{0x00000000, 0xbff00000} }, /*-1 */
/**/ mfftnhf = {{0x00000000, 0xc02f0000} }, /*-15.5 */
/**/ two8 = {{0x00000000, 0x40700000} }, /* 256 */
/**/ g1 = {0x00000000, 0x3e4b096c, }, /* 1.259e-8 */
/**/ g2 = {0x00000000, 0x3faf212d, }, /* 0.0608 */
/**/ g3 = {0x00000000, 0x3fe92f1a, }, /* 0.787 */
/**/ g4 = {0x00000000, 0x40390000, }, /* 25.0 */
/**/ g5 = {0x00000000, 0x4197d784, }, /* 1e8 */
/**/ gy1 = {0x9abcaf48, 0x3e7ad7f2, }, /* 1e-7 */
/**/ gy2 = {0x00000000, 0x3faf212d, }, /* 0.0608 */
/**/ g1 = {{0x00000000, 0x3e4b096c} }, /* 1.259e-8 */
/**/ g2 = {{0x00000000, 0x3faf212d} }, /* 0.0608 */
/**/ g3 = {{0x00000000, 0x3fe92f1a} }, /* 0.787 */
/**/ g4 = {{0x00000000, 0x40390000} }, /* 25.0 */
/**/ g5 = {{0x00000000, 0x4197d784} }, /* 1e8 */
/**/ gy1 = {{0x9abcaf48, 0x3e7ad7f2} }, /* 1e-7 */
/**/ gy2 = {{0x00000000, 0x3faf212d} }, /* 0.0608 */
/**/ u1 = {0x00000000, 0x3cc8c33a, }, /* 6.873e-16 */
/**/ u2 = {0x00000000, 0x3983dc4d, }, /* 1.224e-31 */
/**/ u3 = {0x00000000, 0x3c78e14b, }, /* 2.158e-17 */
/**/ ua3 = {0x00000000, 0x3bfd8b58, }, /* 1.001e-19 */
/**/ ub3 = {0x00000000, 0x3cc81898, }, /* 6.688e-16 */
/**/ u4 = {0x00000000, 0x399856c2, }, /* 3e-31 */
/**/ u5 = {0x00000000, 0x3c39d80a, }, /* 1.401e-18 */
/**/ u6 = {0x00000000, 0x3c374c5a, }, /* 1.263e-18 */
/**/ u7 = {0x00000000, 0x39903beb, }, /* 2.001e-31 */
/**/ u8 = {0x00000000, 0x399c56ae, }, /* 3.493e-31 */
/**/ u9 = {0x00000000, 0x3c7d0ac7, }, /* 2.519e-17 */
/**/ ua9 = {0x00000000, 0x3bfd8b58, }, /* 1.001e-19 */
/**/ ub9 = {0x00000000, 0x3ccc2375, }, /* 7.810e-16 */
/**/ u10 = {0x00000000, 0x3c7e40af, }, /* 2.624e-17 */
/**/ ua10 = {0x00000000, 0x3bfd8b58, }, /* 1.001e-19 */
/**/ ub10 = {0x00000000, 0x3ccc6405, }, /* 7.880e-16 */
/**/ u11 = {0x00000000, 0x39e509b6, }, /* 8.298e-30 */
/**/ u12 = {0x00000000, 0x39e509b6, }, /* 8.298e-30 */
/**/ u13 = {0x00000000, 0x3c39d80a, }, /* 1.401e-18 */
/**/ u14 = {0x00000000, 0x3c374c5a, }, /* 1.263e-18 */
/**/ u15 = {0x00000000, 0x3ab5767a, }, /* 6.935e-26 */
/**/ u16 = {0x00000000, 0x3ab57744, }, /* 6.936e-26 */
/**/ u17 = {0x00000000, 0x3c7d0ac7, }, /* 2.519e-17 */
/**/ ua17 = {0x00000000, 0x3bfdb11f, }, /* 1.006e-19 */
/**/ ub17 = {0x00000000, 0x3ccc2375, }, /* 7.810e-16 */
/**/ u18 = {0x00000000, 0x3c7e40af, }, /* 2.624e-17 */
/**/ ua18 = {0x00000000, 0x3bfdb11f, }, /* 1.006e-19 */
/**/ ub18 = {0x00000000, 0x3ccc6405, }, /* 7.880e-16 */
/**/ u19 = {0x00000000, 0x39a13b61, }, /* 4.248e-31 */
/**/ u20 = {0x00000000, 0x39a13b61, }, /* 4.248e-31 */
/**/ u21 = {0x00000000, 0x3c3bb9b8, }, /* 1.503e-18 */
/**/ u22 = {0x00000000, 0x3c392e08, }, /* 1.365e-18 */
/**/ u23 = {0x00000000, 0x3a0ce706, }, /* 4.560e-29 */
/**/ u24 = {0x00000000, 0x3a0cff5d, }, /* 4.575e-29 */
/**/ u25 = {0x00000000, 0x3c7d0ac7, }, /* 2.519e-17 */
/**/ ua25 = {0x00000000, 0x3bfd8b58, }, /* 1.001e-19 */
/**/ ub25 = {0x00000000, 0x3ccc2375, }, /* 7.810e-16 */
/**/ u26 = {0x00000000, 0x3c7e40af, }, /* 2.624e-17 */
/**/ ua26 = {0x00000000, 0x3bfd8b58, }, /* 1.001e-19 */
/**/ ub26 = {0x00000000, 0x3ccc6405, }, /* 7.880e-16 */
/**/ u27 = {0x00000000, 0x3ad421cb, }, /* 2.602e-25 */
/**/ u28 = {0x00000000, 0x3ad421cb, }, /* 2.602e-25 */
/**/ u1 = {{0x00000000, 0x3cc8c33a} }, /* 6.873e-16 */
/**/ u2 = {{0x00000000, 0x3983dc4d} }, /* 1.224e-31 */
/**/ u3 = {{0x00000000, 0x3c78e14b} }, /* 2.158e-17 */
/**/ ua3 = {{0x00000000, 0x3bfd8b58} }, /* 1.001e-19 */
/**/ ub3 = {{0x00000000, 0x3cc81898} }, /* 6.688e-16 */
/**/ u4 = {{0x00000000, 0x399856c2} }, /* 3e-31 */
/**/ u5 = {{0x00000000, 0x3c39d80a} }, /* 1.401e-18 */
/**/ u6 = {{0x00000000, 0x3c374c5a} }, /* 1.263e-18 */
/**/ u7 = {{0x00000000, 0x39903beb} }, /* 2.001e-31 */
/**/ u8 = {{0x00000000, 0x399c56ae} }, /* 3.493e-31 */
/**/ u9 = {{0x00000000, 0x3c7d0ac7} }, /* 2.519e-17 */
/**/ ua9 = {{0x00000000, 0x3bfd8b58} }, /* 1.001e-19 */
/**/ ub9 = {{0x00000000, 0x3ccc2375} }, /* 7.810e-16 */
/**/ u10 = {{0x00000000, 0x3c7e40af} }, /* 2.624e-17 */
/**/ ua10 = {{0x00000000, 0x3bfd8b58} }, /* 1.001e-19 */
/**/ ub10 = {{0x00000000, 0x3ccc6405} }, /* 7.880e-16 */
/**/ u11 = {{0x00000000, 0x39e509b6} }, /* 8.298e-30 */
/**/ u12 = {{0x00000000, 0x39e509b6} }, /* 8.298e-30 */
/**/ u13 = {{0x00000000, 0x3c39d80a} }, /* 1.401e-18 */
/**/ u14 = {{0x00000000, 0x3c374c5a} }, /* 1.263e-18 */
/**/ u15 = {{0x00000000, 0x3ab5767a} }, /* 6.935e-26 */
/**/ u16 = {{0x00000000, 0x3ab57744} }, /* 6.936e-26 */
/**/ u17 = {{0x00000000, 0x3c7d0ac7} }, /* 2.519e-17 */
/**/ ua17 = {{0x00000000, 0x3bfdb11f} }, /* 1.006e-19 */
/**/ ub17 = {{0x00000000, 0x3ccc2375} }, /* 7.810e-16 */
/**/ u18 = {{0x00000000, 0x3c7e40af} }, /* 2.624e-17 */
/**/ ua18 = {{0x00000000, 0x3bfdb11f} }, /* 1.006e-19 */
/**/ ub18 = {{0x00000000, 0x3ccc6405} }, /* 7.880e-16 */
/**/ u19 = {{0x00000000, 0x39a13b61} }, /* 4.248e-31 */
/**/ u20 = {{0x00000000, 0x39a13b61} }, /* 4.248e-31 */
/**/ u21 = {{0x00000000, 0x3c3bb9b8} }, /* 1.503e-18 */
/**/ u22 = {{0x00000000, 0x3c392e08} }, /* 1.365e-18 */
/**/ u23 = {{0x00000000, 0x3a0ce706} }, /* 4.560e-29 */
/**/ u24 = {{0x00000000, 0x3a0cff5d} }, /* 4.575e-29 */
/**/ u25 = {{0x00000000, 0x3c7d0ac7} }, /* 2.519e-17 */
/**/ ua25 = {{0x00000000, 0x3bfd8b58} }, /* 1.001e-19 */
/**/ ub25 = {{0x00000000, 0x3ccc2375} }, /* 7.810e-16 */
/**/ u26 = {{0x00000000, 0x3c7e40af} }, /* 2.624e-17 */
/**/ ua26 = {{0x00000000, 0x3bfd8b58} }, /* 1.001e-19 */
/**/ ub26 = {{0x00000000, 0x3ccc6405} }, /* 7.880e-16 */
/**/ u27 = {{0x00000000, 0x3ad421cb} }, /* 2.602e-25 */
/**/ u28 = {{0x00000000, 0x3ad421cb} }, /* 2.602e-25 */
/**/ mp1 = {0x58000000, 0x3FF921FB, },
/**/ mp2 = {0x3C000000, 0xBE4DDE97, },
/**/ mp3 = {0x99D747F2, 0xBC8CB3B3, },
/**/ pp3 = {0x98000000, 0xBC8CB3B3, },
/**/ pp4 = {0x23e32ed7, 0xbacd747f, },
/**/ hpinv = {0x6DC9C883, 0x3FE45F30, },
/**/ toint = {0x00000000, 0x43380000, };
/**/ mp1 = {{0x58000000, 0x3FF921FB} },
/**/ mp2 = {{0x3C000000, 0xBE4DDE97} },
/**/ mp3 = {{0x99D747F2, 0xBC8CB3B3} },
/**/ pp3 = {{0x98000000, 0xBC8CB3B3} },
/**/ pp4 = {{0x23e32ed7, 0xbacd747f} },
/**/ hpinv = {{0x6DC9C883, 0x3FE45F30} },
/**/ toint = {{0x00000000, 0x43380000} };
#endif
#endif

File diff suppressed because it is too large Load Diff