self.ftest('atan(0)', math.atan(0), 0)
self.ftest('atan(1)', math.atan(1), math.pi/4)
self.ftest('atan(inf)', math.atan(INF), math.pi/2)
- self.ftest('atan(-inf)', math.atan(-INF), -math.pi/2)
+ self.ftest('atan(-inf)', math.atan(NINF), -math.pi/2)
self.assert_(math.isnan(math.atan(NAN)))
def testAtanh(self):
self.assert_(math.isnan(math.pow(2, NAN)))
self.assert_(math.isnan(math.pow(0, NAN)))
self.assertEqual(math.pow(1, NAN), 1)
- self.assertEqual(1**NAN, 1)
- self.assertEqual(1**INF, 1)
- self.assertEqual(1**NINF, 1)
- self.assertEqual(1**0, 1)
- self.assertEqual(1.**NAN, 1)
- self.assertEqual(1.**INF, 1)
- self.assertEqual(1.**NINF, 1)
- self.assertEqual(1.**0, 1)
+
+ # pow(0., x)
+ self.assertEqual(math.pow(0., INF), 0.)
+ self.assertEqual(math.pow(0., 3.), 0.)
+ self.assertEqual(math.pow(0., 2.3), 0.)
+ self.assertEqual(math.pow(0., 2.), 0.)
+ self.assertEqual(math.pow(0., 0.), 1.)
+ self.assertEqual(math.pow(0., -0.), 1.)
+ self.assertRaises(ValueError, math.pow, 0., -2.)
+ self.assertRaises(ValueError, math.pow, 0., -2.3)
+ self.assertRaises(ValueError, math.pow, 0., -3.)
+ self.assertRaises(ValueError, math.pow, 0., NINF)
+ self.assert_(math.isnan(math.pow(0., NAN)))
+
+ # pow(INF, x)
+ self.assertEqual(math.pow(INF, INF), INF)
+ self.assertEqual(math.pow(INF, 3.), INF)
+ self.assertEqual(math.pow(INF, 2.3), INF)
+ self.assertEqual(math.pow(INF, 2.), INF)
+ self.assertEqual(math.pow(INF, 0.), 1.)
+ self.assertEqual(math.pow(INF, -0.), 1.)
+ self.assertEqual(math.pow(INF, -2.), 0.)
+ self.assertEqual(math.pow(INF, -2.3), 0.)
+ self.assertEqual(math.pow(INF, -3.), 0.)
+ self.assertEqual(math.pow(INF, NINF), 0.)
+ self.assert_(math.isnan(math.pow(INF, NAN)))
+
+ # pow(-0., x)
+ self.assertEqual(math.pow(-0., INF), 0.)
+ self.assertEqual(math.pow(-0., 3.), -0.)
+ self.assertEqual(math.pow(-0., 2.3), 0.)
+ self.assertEqual(math.pow(-0., 2.), 0.)
+ self.assertEqual(math.pow(-0., 0.), 1.)
+ self.assertEqual(math.pow(-0., -0.), 1.)
+ self.assertRaises(ValueError, math.pow, -0., -2.)
+ self.assertRaises(ValueError, math.pow, -0., -2.3)
+ self.assertRaises(ValueError, math.pow, -0., -3.)
+ self.assertRaises(ValueError, math.pow, -0., NINF)
+ self.assert_(math.isnan(math.pow(-0., NAN)))
+
+ # pow(NINF, x)
+ self.assertEqual(math.pow(NINF, INF), INF)
+ self.assertEqual(math.pow(NINF, 3.), NINF)
+ self.assertEqual(math.pow(NINF, 2.3), INF)
+ self.assertEqual(math.pow(NINF, 2.), INF)
+ self.assertEqual(math.pow(NINF, 0.), 1.)
+ self.assertEqual(math.pow(NINF, -0.), 1.)
+ self.assertEqual(math.pow(NINF, -2.), 0.)
+ self.assertEqual(math.pow(NINF, -2.3), 0.)
+ self.assertEqual(math.pow(NINF, -3.), -0.)
+ self.assertEqual(math.pow(NINF, NINF), 0.)
+ self.assert_(math.isnan(math.pow(NINF, NAN)))
+
+ # pow(-1, x)
+ self.assertEqual(math.pow(-1., INF), 1.)
+ self.assertEqual(math.pow(-1., 3.), -1.)
+ self.assertRaises(ValueError, math.pow, -1., 2.3)
+ self.assertEqual(math.pow(-1., 2.), 1.)
+ self.assertEqual(math.pow(-1., 0.), 1.)
+ self.assertEqual(math.pow(-1., -0.), 1.)
+ self.assertEqual(math.pow(-1., -2.), 1.)
+ self.assertRaises(ValueError, math.pow, -1., -2.3)
+ self.assertEqual(math.pow(-1., -3.), -1.)
+ self.assertEqual(math.pow(-1., NINF), 1.)
+ self.assert_(math.isnan(math.pow(-1., NAN)))
+
+ # pow(1, x)
+ self.assertEqual(math.pow(1., INF), 1.)
+ self.assertEqual(math.pow(1., 3.), 1.)
+ self.assertEqual(math.pow(1., 2.3), 1.)
+ self.assertEqual(math.pow(1., 2.), 1.)
+ self.assertEqual(math.pow(1., 0.), 1.)
+ self.assertEqual(math.pow(1., -0.), 1.)
+ self.assertEqual(math.pow(1., -2.), 1.)
+ self.assertEqual(math.pow(1., -2.3), 1.)
+ self.assertEqual(math.pow(1., -3.), 1.)
+ self.assertEqual(math.pow(1., NINF), 1.)
+ self.assertEqual(math.pow(1., NAN), 1.)
+
+ # pow(x, 0) should be 1 for any x
+ self.assertEqual(math.pow(2.3, 0.), 1.)
+ self.assertEqual(math.pow(-2.3, 0.), 1.)
+ self.assertEqual(math.pow(NAN, 0.), 1.)
+ self.assertEqual(math.pow(2.3, -0.), 1.)
+ self.assertEqual(math.pow(-2.3, -0.), 1.)
+ self.assertEqual(math.pow(NAN, -0.), 1.)
+
+ # pow(x, y) is invalid if x is negative and y is not integral
+ self.assertRaises(ValueError, math.pow, -1., 2.3)
+ self.assertRaises(ValueError, math.pow, -15., -3.1)
+
+ # pow(x, NINF)
+ self.assertEqual(math.pow(1.9, NINF), 0.)
+ self.assertEqual(math.pow(1.1, NINF), 0.)
+ self.assertEqual(math.pow(0.9, NINF), INF)
+ self.assertEqual(math.pow(0.1, NINF), INF)
+ self.assertEqual(math.pow(-0.1, NINF), INF)
+ self.assertEqual(math.pow(-0.9, NINF), INF)
+ self.assertEqual(math.pow(-1.1, NINF), 0.)
+ self.assertEqual(math.pow(-1.9, NINF), 0.)
+
+ # pow(x, INF)
+ self.assertEqual(math.pow(1.9, INF), INF)
+ self.assertEqual(math.pow(1.1, INF), INF)
+ self.assertEqual(math.pow(0.9, INF), 0.)
+ self.assertEqual(math.pow(0.1, INF), 0.)
+ self.assertEqual(math.pow(-0.1, INF), 0.)
+ self.assertEqual(math.pow(-0.9, INF), 0.)
+ self.assertEqual(math.pow(-1.1, INF), INF)
+ self.assertEqual(math.pow(-1.9, INF), INF)
+
+ # pow(x, y) should work for x negative, y an integer
+ self.ftest('(-2.)**3.', math.pow(-2.0, 3.0), -8.0)
+ self.ftest('(-2.)**2.', math.pow(-2.0, 2.0), 4.0)
+ self.ftest('(-2.)**1.', math.pow(-2.0, 1.0), -2.0)
+ self.ftest('(-2.)**0.', math.pow(-2.0, 0.0), 1.0)
+ self.ftest('(-2.)**-0.', math.pow(-2.0, -0.0), 1.0)
+ self.ftest('(-2.)**-1.', math.pow(-2.0, -1.0), -0.5)
+ self.ftest('(-2.)**-2.', math.pow(-2.0, -2.0), 0.25)
+ self.ftest('(-2.)**-3.', math.pow(-2.0, -3.0), -0.125)
+ self.assertRaises(ValueError, math.pow, -2.0, -0.5)
+ self.assertRaises(ValueError, math.pow, -2.0, 0.5)
+
+ # the following tests have been commented out since they don't
+ # really belong here: the implementation of ** for floats is
+ # independent of the implemention of math.pow
+ #self.assertEqual(1**NAN, 1)
+ #self.assertEqual(1**INF, 1)
+ #self.assertEqual(1**NINF, 1)
+ #self.assertEqual(1**0, 1)
+ #self.assertEqual(1.**NAN, 1)
+ #self.assertEqual(1.**INF, 1)
+ #self.assertEqual(1.**NINF, 1)
+ #self.assertEqual(1.**0, 1)
def testRadians(self):
self.assertRaises(TypeError, math.radians)
self.ftest('sinh(1)**2-cosh(1)**2', math.sinh(1)**2-math.cosh(1)**2, -1)
self.ftest('sinh(1)+sinh(-1)', math.sinh(1)+math.sinh(-1), 0)
self.assertEquals(math.sinh(INF), INF)
- self.assertEquals(math.sinh(-INF), -INF)
+ self.assertEquals(math.sinh(NINF), NINF)
self.assert_(math.isnan(math.sinh(NAN)))
def testSqrt(self):
# no real versions of rect, polar
continue
func = getattr(math, fn)
- result = func(ar)
+ try:
+ result = func(ar)
+ except ValueError:
+ message = ("Unexpected ValueError in " +
+ "test %s:%s(%r)\n" % (id, fn, ar))
+ self.fail(message)
self.ftest("%s:%s(%r)" % (id, fn, ar), result, er)
def test_main():
#define P14 0.25*Py_MATH_PI
#define P12 0.5*Py_MATH_PI
#define P34 0.75*Py_MATH_PI
-#ifdef MS_WINDOWS
-/* On Windows HUGE_VAL is an extern variable and not a constant. Since the
- special value arrays need a constant we have to roll our own infinity
- and nan. */
-# define INF (DBL_MAX*DBL_MAX)
-# define N (INF*0.)
-#else
-# define INF Py_HUGE_VAL
-# define N Py_NAN
-#endif /* MS_WINDOWS */
+#define INF Py_HUGE_VAL
+#define N Py_NAN
#define U -9.5426319407711027e33 /* unlikely value, used as placeholder */
/* First, the C functions that do the real work. Each of the c_*
raised.
*/
-static Py_complex acos_special_values[7][7] = {
- {{P34,INF},{P,INF}, {P,INF}, {P,-INF}, {P,-INF}, {P34,-INF},{N,INF}},
- {{P12,INF},{U,U}, {U,U}, {U,U}, {U,U}, {P12,-INF},{N,N}},
- {{P12,INF},{U,U}, {P12,0.},{P12,-0.},{U,U}, {P12,-INF},{P12,N}},
- {{P12,INF},{U,U}, {P12,0.},{P12,-0.},{U,U}, {P12,-INF},{P12,N}},
- {{P12,INF},{U,U}, {U,U}, {U,U}, {U,U}, {P12,-INF},{N,N}},
- {{P14,INF},{0.,INF},{0.,INF},{0.,-INF},{0.,-INF},{P14,-INF},{N,INF}},
- {{N,INF}, {N,N}, {N,N}, {N,N}, {N,N}, {N,-INF}, {N,N}}
-};
+static Py_complex acos_special_values[7][7];
static Py_complex
c_acos(Py_complex z)
"Return the arc cosine of x.");
-static Py_complex acosh_special_values[7][7] = {
- {{INF,-P34},{INF,-P}, {INF,-P}, {INF,P}, {INF,P}, {INF,P34},{INF,N}},
- {{INF,-P12},{U,U}, {U,U}, {U,U}, {U,U}, {INF,P12},{N,N}},
- {{INF,-P12},{U,U}, {0.,-P12},{0.,P12},{U,U}, {INF,P12},{N,N}},
- {{INF,-P12},{U,U}, {0.,-P12},{0.,P12},{U,U}, {INF,P12},{N,N}},
- {{INF,-P12},{U,U}, {U,U}, {U,U}, {U,U}, {INF,P12},{N,N}},
- {{INF,-P14},{INF,-0.},{INF,-0.},{INF,0.},{INF,0.},{INF,P14},{INF,N}},
- {{INF,N}, {N,N}, {N,N}, {N,N}, {N,N}, {INF,N}, {N,N}}
-};
+static Py_complex acosh_special_values[7][7];
static Py_complex
c_acosh(Py_complex z)
"Return the arc sine of x.");
-static Py_complex asinh_special_values[7][7] = {
- {{-INF,-P14},{-INF,-0.},{-INF,-0.},{-INF,0.},{-INF,0.},{-INF,P14},{-INF,N}},
- {{-INF,-P12},{U,U}, {U,U}, {U,U}, {U,U}, {-INF,P12},{N,N}},
- {{-INF,-P12},{U,U}, {-0.,-0.}, {-0.,0.}, {U,U}, {-INF,P12},{N,N}},
- {{INF,-P12}, {U,U}, {0.,-0.}, {0.,0.}, {U,U}, {INF,P12}, {N,N}},
- {{INF,-P12}, {U,U}, {U,U}, {U,U}, {U,U}, {INF,P12}, {N,N}},
- {{INF,-P14}, {INF,-0.}, {INF,-0.}, {INF,0.}, {INF,0.}, {INF,P14}, {INF,N}},
- {{INF,N}, {N,N}, {N,-0.}, {N,0.}, {N,N}, {INF,N}, {N,N}}
-};
+static Py_complex asinh_special_values[7][7];
static Py_complex
c_asinh(Py_complex z)
"Return the arc tangent of x.");
-static Py_complex atanh_special_values[7][7] = {
- {{-0.,-P12},{-0.,-P12},{-0.,-P12},{-0.,P12},{-0.,P12},{-0.,P12},{-0.,N}},
- {{-0.,-P12},{U,U}, {U,U}, {U,U}, {U,U}, {-0.,P12},{N,N}},
- {{-0.,-P12},{U,U}, {-0.,-0.}, {-0.,0.}, {U,U}, {-0.,P12},{-0.,N}},
- {{0.,-P12}, {U,U}, {0.,-0.}, {0.,0.}, {U,U}, {0.,P12}, {0.,N}},
- {{0.,-P12}, {U,U}, {U,U}, {U,U}, {U,U}, {0.,P12}, {N,N}},
- {{0.,-P12}, {0.,-P12}, {0.,-P12}, {0.,P12}, {0.,P12}, {0.,P12}, {0.,N}},
- {{0.,-P12}, {N,N}, {N,N}, {N,N}, {N,N}, {0.,P12}, {N,N}}
-};
+static Py_complex atanh_special_values[7][7];
static Py_complex
c_atanh(Py_complex z)
/* cosh(infinity + i*y) needs to be dealt with specially */
-static Py_complex cosh_special_values[7][7] = {
- {{INF,N},{U,U},{INF,0.}, {INF,-0.},{U,U},{INF,N},{INF,N}},
- {{N,N}, {U,U},{U,U}, {U,U}, {U,U},{N,N}, {N,N}},
- {{N,0.}, {U,U},{1.,0.}, {1.,-0.}, {U,U},{N,0.}, {N,0.}},
- {{N,0.}, {U,U},{1.,-0.}, {1.,0.}, {U,U},{N,0.}, {N,0.}},
- {{N,N}, {U,U},{U,U}, {U,U}, {U,U},{N,N}, {N,N}},
- {{INF,N},{U,U},{INF,-0.},{INF,0.}, {U,U},{INF,N},{INF,N}},
- {{N,N}, {N,N},{N,0.}, {N,0.}, {N,N},{N,N}, {N,N}}
-};
+static Py_complex cosh_special_values[7][7];
static Py_complex
c_cosh(Py_complex z)
/* exp(infinity + i*y) and exp(-infinity + i*y) need special treatment for
finite y */
-static Py_complex exp_special_values[7][7] = {
- {{0.,0.},{U,U},{0.,-0.}, {0.,0.}, {U,U},{0.,0.},{0.,0.}},
- {{N,N}, {U,U},{U,U}, {U,U}, {U,U},{N,N}, {N,N}},
- {{N,N}, {U,U},{1.,-0.}, {1.,0.}, {U,U},{N,N}, {N,N}},
- {{N,N}, {U,U},{1.,-0.}, {1.,0.}, {U,U},{N,N}, {N,N}},
- {{N,N}, {U,U},{U,U}, {U,U}, {U,U},{N,N}, {N,N}},
- {{INF,N},{U,U},{INF,-0.},{INF,0.},{U,U},{INF,N},{INF,N}},
- {{N,N}, {N,N},{N,-0.}, {N,0.}, {N,N},{N,N}, {N,N}}
-};
+static Py_complex exp_special_values[7][7];
static Py_complex
c_exp(Py_complex z)
"Return the exponential value e**x.");
-static Py_complex log_special_values[7][7] = {
- {{INF,-P34},{INF,-P}, {INF,-P}, {INF,P}, {INF,P}, {INF,P34}, {INF,N}},
- {{INF,-P12},{U,U}, {U,U}, {U,U}, {U,U}, {INF,P12}, {N,N}},
- {{INF,-P12},{U,U}, {-INF,-P}, {-INF,P}, {U,U}, {INF,P12}, {N,N}},
- {{INF,-P12},{U,U}, {-INF,-0.},{-INF,0.},{U,U}, {INF,P12}, {N,N}},
- {{INF,-P12},{U,U}, {U,U}, {U,U}, {U,U}, {INF,P12}, {N,N}},
- {{INF,-P14},{INF,-0.},{INF,-0.}, {INF,0.}, {INF,0.},{INF,P14}, {INF,N}},
- {{INF,N}, {N,N}, {N,N}, {N,N}, {N,N}, {INF,N}, {N,N}}
-};
+static Py_complex log_special_values[7][7];
static Py_complex
c_log(Py_complex z)
/* sinh(infinity + i*y) needs to be dealt with specially */
-static Py_complex sinh_special_values[7][7] = {
- {{INF,N},{U,U},{-INF,-0.},{-INF,0.},{U,U},{INF,N},{INF,N}},
- {{N,N}, {U,U},{U,U}, {U,U}, {U,U},{N,N}, {N,N}},
- {{0.,N}, {U,U},{-0.,-0.}, {-0.,0.}, {U,U},{0.,N}, {0.,N}},
- {{0.,N}, {U,U},{0.,-0.}, {0.,0.}, {U,U},{0.,N}, {0.,N}},
- {{N,N}, {U,U},{U,U}, {U,U}, {U,U},{N,N}, {N,N}},
- {{INF,N},{U,U},{INF,-0.}, {INF,0.}, {U,U},{INF,N},{INF,N}},
- {{N,N}, {N,N},{N,-0.}, {N,0.}, {N,N},{N,N}, {N,N}}
-};
+static Py_complex sinh_special_values[7][7];
static Py_complex
c_sinh(Py_complex z)
"Return the hyperbolic sine of x.");
-static Py_complex sqrt_special_values[7][7] = {
- {{INF,-INF},{0.,-INF},{0.,-INF},{0.,INF},{0.,INF},{INF,INF},{N,INF}},
- {{INF,-INF},{U,U}, {U,U}, {U,U}, {U,U}, {INF,INF},{N,N}},
- {{INF,-INF},{U,U}, {0.,-0.}, {0.,0.}, {U,U}, {INF,INF},{N,N}},
- {{INF,-INF},{U,U}, {0.,-0.}, {0.,0.}, {U,U}, {INF,INF},{N,N}},
- {{INF,-INF},{U,U}, {U,U}, {U,U}, {U,U}, {INF,INF},{N,N}},
- {{INF,-INF},{INF,-0.},{INF,-0.},{INF,0.},{INF,0.},{INF,INF},{INF,N}},
- {{INF,-INF},{N,N}, {N,N}, {N,N}, {N,N}, {INF,INF},{N,N}}
-};
+static Py_complex sqrt_special_values[7][7];
static Py_complex
c_sqrt(Py_complex z)
/* tanh(infinity + i*y) needs to be dealt with specially */
-static Py_complex tanh_special_values[7][7] = {
- {{-1.,0.},{U,U},{-1.,-0.},{-1.,0.},{U,U},{-1.,0.},{-1.,0.}},
- {{N,N}, {U,U},{U,U}, {U,U}, {U,U},{N,N}, {N,N}},
- {{N,N}, {U,U},{-0.,-0.},{-0.,0.},{U,U},{N,N}, {N,N}},
- {{N,N}, {U,U},{0.,-0.}, {0.,0.}, {U,U},{N,N}, {N,N}},
- {{N,N}, {U,U},{U,U}, {U,U}, {U,U},{N,N}, {N,N}},
- {{1.,0.}, {U,U},{1.,-0.}, {1.,0.}, {U,U},{1.,0.}, {1.,0.}},
- {{N,N}, {N,N},{N,-0.}, {N,0.}, {N,N},{N,N}, {N,N}}
-};
+static Py_complex tanh_special_values[7][7];
static Py_complex
c_tanh(Py_complex z)
*/
-static Py_complex rect_special_values[7][7] = {
- {{INF,N},{U,U},{-INF,0.},{-INF,-0.},{U,U},{INF,N},{INF,N}},
- {{N,N}, {U,U},{U,U}, {U,U}, {U,U},{N,N}, {N,N}},
- {{0.,0.},{U,U},{-0.,0.}, {-0.,-0.}, {U,U},{0.,0.},{0.,0.}},
- {{0.,0.},{U,U},{0.,-0.}, {0.,0.}, {U,U},{0.,0.},{0.,0.}},
- {{N,N}, {U,U},{U,U}, {U,U}, {U,U},{N,N}, {N,N}},
- {{INF,N},{U,U},{INF,-0.},{INF,0.}, {U,U},{INF,N},{INF,N}},
- {{N,N}, {N,N},{N,0.}, {N,0.}, {N,N},{N,N}, {N,N}}
-};
+static Py_complex rect_special_values[7][7];
static PyObject *
cmath_rect(PyObject *self, PyObject *args)
PyModule_AddObject(m, "pi",
PyFloat_FromDouble(Py_MATH_PI));
PyModule_AddObject(m, "e", PyFloat_FromDouble(Py_MATH_E));
+
+ /* initialize special value tables */
+
+#define INIT_SPECIAL_VALUES(NAME, BODY) { Py_complex* p = (Py_complex*)NAME; BODY }
+#define C(REAL, IMAG) p->real = REAL; p->imag = IMAG; ++p;
+
+ INIT_SPECIAL_VALUES(acos_special_values, {
+ C(P34,INF) C(P,INF) C(P,INF) C(P,-INF) C(P,-INF) C(P34,-INF) C(N,INF)
+ C(P12,INF) C(U,U) C(U,U) C(U,U) C(U,U) C(P12,-INF) C(N,N)
+ C(P12,INF) C(U,U) C(P12,0.) C(P12,-0.) C(U,U) C(P12,-INF) C(P12,N)
+ C(P12,INF) C(U,U) C(P12,0.) C(P12,-0.) C(U,U) C(P12,-INF) C(P12,N)
+ C(P12,INF) C(U,U) C(U,U) C(U,U) C(U,U) C(P12,-INF) C(N,N)
+ C(P14,INF) C(0.,INF) C(0.,INF) C(0.,-INF) C(0.,-INF) C(P14,-INF) C(N,INF)
+ C(N,INF) C(N,N) C(N,N) C(N,N) C(N,N) C(N,-INF) C(N,N)
+ })
+
+ INIT_SPECIAL_VALUES(acosh_special_values, {
+ C(INF,-P34) C(INF,-P) C(INF,-P) C(INF,P) C(INF,P) C(INF,P34) C(INF,N)
+ C(INF,-P12) C(U,U) C(U,U) C(U,U) C(U,U) C(INF,P12) C(N,N)
+ C(INF,-P12) C(U,U) C(0.,-P12) C(0.,P12) C(U,U) C(INF,P12) C(N,N)
+ C(INF,-P12) C(U,U) C(0.,-P12) C(0.,P12) C(U,U) C(INF,P12) C(N,N)
+ C(INF,-P12) C(U,U) C(U,U) C(U,U) C(U,U) C(INF,P12) C(N,N)
+ C(INF,-P14) C(INF,-0.) C(INF,-0.) C(INF,0.) C(INF,0.) C(INF,P14) C(INF,N)
+ C(INF,N) C(N,N) C(N,N) C(N,N) C(N,N) C(INF,N) C(N,N)
+ })
+
+ INIT_SPECIAL_VALUES(asinh_special_values, {
+ C(-INF,-P14) C(-INF,-0.) C(-INF,-0.) C(-INF,0.) C(-INF,0.) C(-INF,P14) C(-INF,N)
+ C(-INF,-P12) C(U,U) C(U,U) C(U,U) C(U,U) C(-INF,P12) C(N,N)
+ C(-INF,-P12) C(U,U) C(-0.,-0.) C(-0.,0.) C(U,U) C(-INF,P12) C(N,N)
+ C(INF,-P12) C(U,U) C(0.,-0.) C(0.,0.) C(U,U) C(INF,P12) C(N,N)
+ C(INF,-P12) C(U,U) C(U,U) C(U,U) C(U,U) C(INF,P12) C(N,N)
+ C(INF,-P14) C(INF,-0.) C(INF,-0.) C(INF,0.) C(INF,0.) C(INF,P14) C(INF,N)
+ C(INF,N) C(N,N) C(N,-0.) C(N,0.) C(N,N) C(INF,N) C(N,N)
+ })
+
+ INIT_SPECIAL_VALUES(atanh_special_values, {
+ C(-0.,-P12) C(-0.,-P12) C(-0.,-P12) C(-0.,P12) C(-0.,P12) C(-0.,P12) C(-0.,N)
+ C(-0.,-P12) C(U,U) C(U,U) C(U,U) C(U,U) C(-0.,P12) C(N,N)
+ C(-0.,-P12) C(U,U) C(-0.,-0.) C(-0.,0.) C(U,U) C(-0.,P12) C(-0.,N)
+ C(0.,-P12) C(U,U) C(0.,-0.) C(0.,0.) C(U,U) C(0.,P12) C(0.,N)
+ C(0.,-P12) C(U,U) C(U,U) C(U,U) C(U,U) C(0.,P12) C(N,N)
+ C(0.,-P12) C(0.,-P12) C(0.,-P12) C(0.,P12) C(0.,P12) C(0.,P12) C(0.,N)
+ C(0.,-P12) C(N,N) C(N,N) C(N,N) C(N,N) C(0.,P12) C(N,N)
+ })
+
+ INIT_SPECIAL_VALUES(cosh_special_values, {
+ C(INF,N) C(U,U) C(INF,0.) C(INF,-0.) C(U,U) C(INF,N) C(INF,N)
+ C(N,N) C(U,U) C(U,U) C(U,U) C(U,U) C(N,N) C(N,N)
+ C(N,0.) C(U,U) C(1.,0.) C(1.,-0.) C(U,U) C(N,0.) C(N,0.)
+ C(N,0.) C(U,U) C(1.,-0.) C(1.,0.) C(U,U) C(N,0.) C(N,0.)
+ C(N,N) C(U,U) C(U,U) C(U,U) C(U,U) C(N,N) C(N,N)
+ C(INF,N) C(U,U) C(INF,-0.) C(INF,0.) C(U,U) C(INF,N) C(INF,N)
+ C(N,N) C(N,N) C(N,0.) C(N,0.) C(N,N) C(N,N) C(N,N)
+ })
+
+ INIT_SPECIAL_VALUES(exp_special_values, {
+ C(0.,0.) C(U,U) C(0.,-0.) C(0.,0.) C(U,U) C(0.,0.) C(0.,0.)
+ C(N,N) C(U,U) C(U,U) C(U,U) C(U,U) C(N,N) C(N,N)
+ C(N,N) C(U,U) C(1.,-0.) C(1.,0.) C(U,U) C(N,N) C(N,N)
+ C(N,N) C(U,U) C(1.,-0.) C(1.,0.) C(U,U) C(N,N) C(N,N)
+ C(N,N) C(U,U) C(U,U) C(U,U) C(U,U) C(N,N) C(N,N)
+ C(INF,N) C(U,U) C(INF,-0.) C(INF,0.) C(U,U) C(INF,N) C(INF,N)
+ C(N,N) C(N,N) C(N,-0.) C(N,0.) C(N,N) C(N,N) C(N,N)
+ })
+
+ INIT_SPECIAL_VALUES(log_special_values, {
+ C(INF,-P34) C(INF,-P) C(INF,-P) C(INF,P) C(INF,P) C(INF,P34) C(INF,N)
+ C(INF,-P12) C(U,U) C(U,U) C(U,U) C(U,U) C(INF,P12) C(N,N)
+ C(INF,-P12) C(U,U) C(-INF,-P) C(-INF,P) C(U,U) C(INF,P12) C(N,N)
+ C(INF,-P12) C(U,U) C(-INF,-0.) C(-INF,0.) C(U,U) C(INF,P12) C(N,N)
+ C(INF,-P12) C(U,U) C(U,U) C(U,U) C(U,U) C(INF,P12) C(N,N)
+ C(INF,-P14) C(INF,-0.) C(INF,-0.) C(INF,0.) C(INF,0.) C(INF,P14) C(INF,N)
+ C(INF,N) C(N,N) C(N,N) C(N,N) C(N,N) C(INF,N) C(N,N)
+ })
+
+ INIT_SPECIAL_VALUES(sinh_special_values, {
+ C(INF,N) C(U,U) C(-INF,-0.) C(-INF,0.) C(U,U) C(INF,N) C(INF,N)
+ C(N,N) C(U,U) C(U,U) C(U,U) C(U,U) C(N,N) C(N,N)
+ C(0.,N) C(U,U) C(-0.,-0.) C(-0.,0.) C(U,U) C(0.,N) C(0.,N)
+ C(0.,N) C(U,U) C(0.,-0.) C(0.,0.) C(U,U) C(0.,N) C(0.,N)
+ C(N,N) C(U,U) C(U,U) C(U,U) C(U,U) C(N,N) C(N,N)
+ C(INF,N) C(U,U) C(INF,-0.) C(INF,0.) C(U,U) C(INF,N) C(INF,N)
+ C(N,N) C(N,N) C(N,-0.) C(N,0.) C(N,N) C(N,N) C(N,N)
+ })
+
+ INIT_SPECIAL_VALUES(sqrt_special_values, {
+ C(INF,-INF) C(0.,-INF) C(0.,-INF) C(0.,INF) C(0.,INF) C(INF,INF) C(N,INF)
+ C(INF,-INF) C(U,U) C(U,U) C(U,U) C(U,U) C(INF,INF) C(N,N)
+ C(INF,-INF) C(U,U) C(0.,-0.) C(0.,0.) C(U,U) C(INF,INF) C(N,N)
+ C(INF,-INF) C(U,U) C(0.,-0.) C(0.,0.) C(U,U) C(INF,INF) C(N,N)
+ C(INF,-INF) C(U,U) C(U,U) C(U,U) C(U,U) C(INF,INF) C(N,N)
+ C(INF,-INF) C(INF,-0.) C(INF,-0.) C(INF,0.) C(INF,0.) C(INF,INF) C(INF,N)
+ C(INF,-INF) C(N,N) C(N,N) C(N,N) C(N,N) C(INF,INF) C(N,N)
+ })
+
+ INIT_SPECIAL_VALUES(tanh_special_values, {
+ C(-1.,0.) C(U,U) C(-1.,-0.) C(-1.,0.) C(U,U) C(-1.,0.) C(-1.,0.)
+ C(N,N) C(U,U) C(U,U) C(U,U) C(U,U) C(N,N) C(N,N)
+ C(N,N) C(U,U) C(-0.,-0.) C(-0.,0.) C(U,U) C(N,N) C(N,N)
+ C(N,N) C(U,U) C(0.,-0.) C(0.,0.) C(U,U) C(N,N) C(N,N)
+ C(N,N) C(U,U) C(U,U) C(U,U) C(U,U) C(N,N) C(N,N)
+ C(1.,0.) C(U,U) C(1.,-0.) C(1.,0.) C(U,U) C(1.,0.) C(1.,0.)
+ C(N,N) C(N,N) C(N,-0.) C(N,0.) C(N,N) C(N,N) C(N,N)
+ })
+
+ INIT_SPECIAL_VALUES(rect_special_values, {
+ C(INF,N) C(U,U) C(-INF,0.) C(-INF,-0.) C(U,U) C(INF,N) C(INF,N)
+ C(N,N) C(U,U) C(U,U) C(U,U) C(U,U) C(N,N) C(N,N)
+ C(0.,0.) C(U,U) C(-0.,0.) C(-0.,-0.) C(U,U) C(0.,0.) C(0.,0.)
+ C(0.,0.) C(U,U) C(0.,-0.) C(0.,0.) C(U,U) C(0.,0.) C(0.,0.)
+ C(N,N) C(U,U) C(U,U) C(U,U) C(U,U) C(N,N) C(N,N)
+ C(INF,N) C(U,U) C(INF,-0.) C(INF,0.) C(U,U) C(INF,N) C(INF,N)
+ C(N,N) C(N,N) C(N,0.) C(N,0.) C(N,N) C(N,N) C(N,N)
+ })
}