[pypy-commit] pypy kill-someobject: merged default in

alex_gaynor noreply at buildbot.pypy.org
Mon Oct 8 14:31:11 CEST 2012


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: kill-someobject
Changeset: r57922:f7ae88167498
Date: 2012-10-08 14:30 +0200
http://bitbucket.org/pypy/pypy/changeset/f7ae88167498/

Log:	merged default in

diff too long, truncating to 2000 out of 10524 lines

diff --git a/lib_pypy/dbm.py b/lib_pypy/dbm.py
--- a/lib_pypy/dbm.py
+++ b/lib_pypy/dbm.py
@@ -126,8 +126,11 @@
     libpath = ctypes.util.find_library('db')
     if not libpath:
         # XXX this is hopeless...
-        libpath = ctypes.util.find_library('db-4.5')
-        if not libpath:
+        for c in '56789':
+            libpath = ctypes.util.find_library('db-4.%s' % c)
+            if libpath:
+                break
+        else:
             raise ImportError("Cannot find dbm library")
     lib = CDLL(libpath) # Linux
     _platform = 'bdb'
diff --git a/pypy/doc/whatsnew-head.rst b/pypy/doc/whatsnew-head.rst
--- a/pypy/doc/whatsnew-head.rst
+++ b/pypy/doc/whatsnew-head.rst
@@ -36,6 +36,10 @@
 .. branch: stdlib-2.7.3
 The stdlib was updated to version 2.7.3
 
+.. branch: numpypy-complex2
+Complex dtype support for numpy
+
+
 
 .. "uninteresting" branches that we should just ignore for the whatsnew:
 .. branch: slightly-shorter-c
diff --git a/pypy/module/cmath/interp_cmath.py b/pypy/module/cmath/interp_cmath.py
--- a/pypy/module/cmath/interp_cmath.py
+++ b/pypy/module/cmath/interp_cmath.py
@@ -1,28 +1,10 @@
 import math
-from math import fabs
 from pypy.rlib.objectmodel import specialize
-from pypy.rlib.rfloat import copysign, asinh, log1p, isinf, isnan
 from pypy.tool.sourcetools import func_with_new_name
 from pypy.interpreter.error import OperationError
 from pypy.interpreter.gateway import NoneNotWrapped
 from pypy.module.cmath import names_and_docstrings
-from pypy.module.cmath.constant import DBL_MIN, CM_SCALE_UP, CM_SCALE_DOWN
-from pypy.module.cmath.constant import CM_LARGE_DOUBLE, DBL_MANT_DIG
-from pypy.module.cmath.constant import M_LN2, M_LN10
-from pypy.module.cmath.constant import CM_SQRT_LARGE_DOUBLE, CM_SQRT_DBL_MIN
-from pypy.module.cmath.constant import CM_LOG_LARGE_DOUBLE
-from pypy.module.cmath.special_value import isfinite, special_type, INF, NAN
-from pypy.module.cmath.special_value import sqrt_special_values
-from pypy.module.cmath.special_value import acos_special_values
-from pypy.module.cmath.special_value import acosh_special_values
-from pypy.module.cmath.special_value import asinh_special_values
-from pypy.module.cmath.special_value import atanh_special_values
-from pypy.module.cmath.special_value import log_special_values
-from pypy.module.cmath.special_value import exp_special_values
-from pypy.module.cmath.special_value import cosh_special_values
-from pypy.module.cmath.special_value import sinh_special_values
-from pypy.module.cmath.special_value import tanh_special_values
-from pypy.module.cmath.special_value import rect_special_values
+from pypy.rlib import rcomplex
 
 pi = math.pi
 e  = math.e
@@ -56,235 +38,40 @@
 
 
 def c_neg(x, y):
-    return (-x, -y)
+    return rcomplex.c_neg(x,y)
 
 
 @unaryfn
 def c_sqrt(x, y):
-    # Method: use symmetries to reduce to the case when x = z.real and y
-    # = z.imag are nonnegative.  Then the real part of the result is
-    # given by
-    #
-    #   s = sqrt((x + hypot(x, y))/2)
-    #
-    # and the imaginary part is
-    #
-    #   d = (y/2)/s
-    #
-    # If either x or y is very large then there's a risk of overflow in
-    # computation of the expression x + hypot(x, y).  We can avoid this
-    # by rewriting the formula for s as:
-    #
-    #   s = 2*sqrt(x/8 + hypot(x/8, y/8))
-    #
-    # This costs us two extra multiplications/divisions, but avoids the
-    # overhead of checking for x and y large.
-    #
-    # If both x and y are subnormal then hypot(x, y) may also be
-    # subnormal, so will lack full precision.  We solve this by rescaling
-    # x and y by a sufficiently large power of 2 to ensure that x and y
-    # are normal.
-
-    if not isfinite(x) or not isfinite(y):
-        return sqrt_special_values[special_type(x)][special_type(y)]
-
-    if x == 0. and y == 0.:
-        return (0., y)
-
-    ax = fabs(x)
-    ay = fabs(y)
-
-    if ax < DBL_MIN and ay < DBL_MIN and (ax > 0. or ay > 0.):
-        # here we catch cases where hypot(ax, ay) is subnormal
-        ax = math.ldexp(ax, CM_SCALE_UP)
-        ay1= math.ldexp(ay, CM_SCALE_UP)
-        s = math.ldexp(math.sqrt(ax + math.hypot(ax, ay1)),
-                       CM_SCALE_DOWN)
-    else:
-        ax /= 8.
-        s = 2.*math.sqrt(ax + math.hypot(ax, ay/8.))
-
-    d = ay/(2.*s)
-
-    if x >= 0.:
-        return (s, copysign(d, y))
-    else:
-        return (d, copysign(s, y))
-
+    return rcomplex.c_sqrt(x,y)
 
 @unaryfn
 def c_acos(x, y):
-    if not isfinite(x) or not isfinite(y):
-        return acos_special_values[special_type(x)][special_type(y)]
-
-    if fabs(x) > CM_LARGE_DOUBLE or fabs(y) > CM_LARGE_DOUBLE:
-        # avoid unnecessary overflow for large arguments
-        real = math.atan2(fabs(y), x)
-        # split into cases to make sure that the branch cut has the
-        # correct continuity on systems with unsigned zeros
-        if x < 0.:
-            imag = -copysign(math.log(math.hypot(x/2., y/2.)) +
-                             M_LN2*2., y)
-        else:
-            imag = copysign(math.log(math.hypot(x/2., y/2.)) +
-                            M_LN2*2., -y)
-    else:
-        s1x, s1y = c_sqrt(1.-x, -y)
-        s2x, s2y = c_sqrt(1.+x, y)
-        real = 2.*math.atan2(s1x, s2x)
-        imag = asinh(s2x*s1y - s2y*s1x)
-    return (real, imag)
-
+    return rcomplex.c_acos(x,y)
 
 @unaryfn
 def c_acosh(x, y):
-    # XXX the following two lines seem unnecessary at least on Linux;
-    # the tests pass fine without them
-    if not isfinite(x) or not isfinite(y):
-        return acosh_special_values[special_type(x)][special_type(y)]
-
-    if fabs(x) > CM_LARGE_DOUBLE or fabs(y) > CM_LARGE_DOUBLE:
-        # avoid unnecessary overflow for large arguments
-        real = math.log(math.hypot(x/2., y/2.)) + M_LN2*2.
-        imag = math.atan2(y, x)
-    else:
-        s1x, s1y = c_sqrt(x - 1., y)
-        s2x, s2y = c_sqrt(x + 1., y)
-        real = asinh(s1x*s2x + s1y*s2y)
-        imag = 2.*math.atan2(s1y, s2x)
-    return (real, imag)
-
+    return rcomplex.c_acosh(x,y)
 
 @unaryfn
 def c_asin(x, y):
-    # asin(z) = -i asinh(iz)
-    sx, sy = c_asinh(-y, x)
-    return (sy, -sx)
-
+    return rcomplex.c_asin(x,y)
 
 @unaryfn
 def c_asinh(x, y):
-    if not isfinite(x) or not isfinite(y):
-        return asinh_special_values[special_type(x)][special_type(y)]
-
-    if fabs(x) > CM_LARGE_DOUBLE or fabs(y) > CM_LARGE_DOUBLE:
-        if y >= 0.:
-            real = copysign(math.log(math.hypot(x/2., y/2.)) +
-                            M_LN2*2., x)
-        else:
-            real = -copysign(math.log(math.hypot(x/2., y/2.)) +
-                             M_LN2*2., -x)
-        imag = math.atan2(y, fabs(x))
-    else:
-        s1x, s1y = c_sqrt(1.+y, -x)
-        s2x, s2y = c_sqrt(1.-y, x)
-        real = asinh(s1x*s2y - s2x*s1y)
-        imag = math.atan2(y, s1x*s2x - s1y*s2y)
-    return (real, imag)
-
+    return rcomplex.c_asinh(x,y)
 
 @unaryfn
 def c_atan(x, y):
-    # atan(z) = -i atanh(iz)
-    sx, sy = c_atanh(-y, x)
-    return (sy, -sx)
-
+    return rcomplex.c_atan(x,y)
 
 @unaryfn
 def c_atanh(x, y):
-    if not isfinite(x) or not isfinite(y):
-        return atanh_special_values[special_type(x)][special_type(y)]
-
-    # Reduce to case where x >= 0., using atanh(z) = -atanh(-z).
-    if x < 0.:
-        return c_neg(*c_atanh(*c_neg(x, y)))
-
-    ay = fabs(y)
-    if x > CM_SQRT_LARGE_DOUBLE or ay > CM_SQRT_LARGE_DOUBLE:
-        # if abs(z) is large then we use the approximation
-        # atanh(z) ~ 1/z +/- i*pi/2 (+/- depending on the sign
-        # of y
-        h = math.hypot(x/2., y/2.)   # safe from overflow
-        real = x/4./h/h
-        # the two negations in the next line cancel each other out
-        # except when working with unsigned zeros: they're there to
-        # ensure that the branch cut has the correct continuity on
-        # systems that don't support signed zeros
-        imag = -copysign(math.pi/2., -y)
-    elif x == 1. and ay < CM_SQRT_DBL_MIN:
-        # C99 standard says:  atanh(1+/-0.) should be inf +/- 0i
-        if ay == 0.:
-            raise ValueError("math domain error")
-            #real = INF
-            #imag = y
-        else:
-            real = -math.log(math.sqrt(ay)/math.sqrt(math.hypot(ay, 2.)))
-            imag = copysign(math.atan2(2., -ay) / 2, y)
-    else:
-        real = log1p(4.*x/((1-x)*(1-x) + ay*ay))/4.
-        imag = -math.atan2(-2.*y, (1-x)*(1+x) - ay*ay) / 2.
-    return (real, imag)
-
+    return rcomplex.c_atanh(x,y)
 
 @unaryfn
 def c_log(x, y):
-    # The usual formula for the real part is log(hypot(z.real, z.imag)).
-    # There are four situations where this formula is potentially
-    # problematic:
-    #
-    # (1) the absolute value of z is subnormal.  Then hypot is subnormal,
-    # so has fewer than the usual number of bits of accuracy, hence may
-    # have large relative error.  This then gives a large absolute error
-    # in the log.  This can be solved by rescaling z by a suitable power
-    # of 2.
-    #
-    # (2) the absolute value of z is greater than DBL_MAX (e.g. when both
-    # z.real and z.imag are within a factor of 1/sqrt(2) of DBL_MAX)
-    # Again, rescaling solves this.
-    #
-    # (3) the absolute value of z is close to 1.  In this case it's
-    # difficult to achieve good accuracy, at least in part because a
-    # change of 1ulp in the real or imaginary part of z can result in a
-    # change of billions of ulps in the correctly rounded answer.
-    #
-    # (4) z = 0.  The simplest thing to do here is to call the
-    # floating-point log with an argument of 0, and let its behaviour
-    # (returning -infinity, signaling a floating-point exception, setting
-    # errno, or whatever) determine that of c_log.  So the usual formula
-    # is fine here.
-
-    # XXX the following two lines seem unnecessary at least on Linux;
-    # the tests pass fine without them
-    if not isfinite(x) or not isfinite(y):
-        return log_special_values[special_type(x)][special_type(y)]
-
-    ax = fabs(x)
-    ay = fabs(y)
-
-    if ax > CM_LARGE_DOUBLE or ay > CM_LARGE_DOUBLE:
-        real = math.log(math.hypot(ax/2., ay/2.)) + M_LN2
-    elif ax < DBL_MIN and ay < DBL_MIN:
-        if ax > 0. or ay > 0.:
-            # catch cases where hypot(ax, ay) is subnormal
-            real = math.log(math.hypot(math.ldexp(ax, DBL_MANT_DIG),
-                                       math.ldexp(ay, DBL_MANT_DIG)))
-            real -= DBL_MANT_DIG*M_LN2
-        else:
-            # log(+/-0. +/- 0i)
-            raise ValueError("math domain error")
-            #real = -INF
-            #imag = atan2(y, x)
-    else:
-        h = math.hypot(ax, ay)
-        if 0.71 <= h and h <= 1.73:
-            am = max(ax, ay)
-            an = min(ax, ay)
-            real = log1p((am-1)*(am+1) + an*an) / 2.
-        else:
-            real = math.log(h)
-    imag = math.atan2(y, x)
-    return (real, imag)
-
+    return rcomplex.c_log(x,y)
 
 _inner_wrapped_log = wrapped_log
 
@@ -300,196 +87,38 @@
 
 @unaryfn
 def c_log10(x, y):
-    rx, ry = c_log(x, y)
-    return (rx / M_LN10, ry / M_LN10)
-
+    return rcomplex.c_log10(x,y)
 
 @unaryfn
 def c_exp(x, y):
-    if not isfinite(x) or not isfinite(y):
-        if isinf(x) and isfinite(y) and y != 0.:
-            if x > 0:
-                real = copysign(INF, math.cos(y))
-                imag = copysign(INF, math.sin(y))
-            else:
-                real = copysign(0., math.cos(y))
-                imag = copysign(0., math.sin(y))
-            r = (real, imag)
-        else:
-            r = exp_special_values[special_type(x)][special_type(y)]
-
-        # need to raise ValueError if y is +/- infinity and x is not
-        # a NaN and not -infinity
-        if isinf(y) and (isfinite(x) or (isinf(x) and x > 0)):
-            raise ValueError("math domain error")
-        return r
-
-    if x > CM_LOG_LARGE_DOUBLE:
-        l = math.exp(x-1.)
-        real = l * math.cos(y) * math.e
-        imag = l * math.sin(y) * math.e
-    else:
-        l = math.exp(x)
-        real = l * math.cos(y)
-        imag = l * math.sin(y)
-    if isinf(real) or isinf(imag):
-        raise OverflowError("math range error")
-    return real, imag
-
+    return rcomplex.c_exp(x,y)
 
 @unaryfn
 def c_cosh(x, y):
-    if not isfinite(x) or not isfinite(y):
-        if isinf(x) and isfinite(y) and y != 0.:
-            if x > 0:
-                real = copysign(INF, math.cos(y))
-                imag = copysign(INF, math.sin(y))
-            else:
-                real = copysign(INF, math.cos(y))
-                imag = -copysign(INF, math.sin(y))
-            r = (real, imag)
-        else:
-            r = cosh_special_values[special_type(x)][special_type(y)]
-
-        # need to raise ValueError if y is +/- infinity and x is not
-        # a NaN
-        if isinf(y) and not isnan(x):
-            raise ValueError("math domain error")
-        return r
-
-    if fabs(x) > CM_LOG_LARGE_DOUBLE:
-        # deal correctly with cases where cosh(x) overflows but
-        # cosh(z) does not.
-        x_minus_one = x - copysign(1., x)
-        real = math.cos(y) * math.cosh(x_minus_one) * math.e
-        imag = math.sin(y) * math.sinh(x_minus_one) * math.e
-    else:
-        real = math.cos(y) * math.cosh(x)
-        imag = math.sin(y) * math.sinh(x)
-    if isinf(real) or isinf(imag):
-        raise OverflowError("math range error")
-    return real, imag
-
+    return rcomplex.c_cosh(x,y)
 
 @unaryfn
 def c_sinh(x, y):
-    # special treatment for sinh(+/-inf + iy) if y is finite and nonzero
-    if not isfinite(x) or not isfinite(y):
-        if isinf(x) and isfinite(y) and y != 0.:
-            if x > 0:
-                real = copysign(INF, math.cos(y))
-                imag = copysign(INF, math.sin(y))
-            else:
-                real = -copysign(INF, math.cos(y))
-                imag = copysign(INF, math.sin(y))
-            r = (real, imag)
-        else:
-            r = sinh_special_values[special_type(x)][special_type(y)]
-
-        # need to raise ValueError if y is +/- infinity and x is not
-        # a NaN
-        if isinf(y) and not isnan(x):
-            raise ValueError("math domain error")
-        return r
-
-    if fabs(x) > CM_LOG_LARGE_DOUBLE:
-        x_minus_one = x - copysign(1., x)
-        real = math.cos(y) * math.sinh(x_minus_one) * math.e
-        imag = math.sin(y) * math.cosh(x_minus_one) * math.e
-    else:
-        real = math.cos(y) * math.sinh(x)
-        imag = math.sin(y) * math.cosh(x)
-    if isinf(real) or isinf(imag):
-        raise OverflowError("math range error")
-    return real, imag
-
+    return rcomplex.c_sinh(x,y)
 
 @unaryfn
 def c_tanh(x, y):
-    # Formula:
-    #
-    #   tanh(x+iy) = (tanh(x)(1+tan(y)^2) + i tan(y)(1-tanh(x))^2) /
-    #   (1+tan(y)^2 tanh(x)^2)
-    #
-    #   To avoid excessive roundoff error, 1-tanh(x)^2 is better computed
-    #   as 1/cosh(x)^2.  When abs(x) is large, we approximate 1-tanh(x)^2
-    #   by 4 exp(-2*x) instead, to avoid possible overflow in the
-    #   computation of cosh(x).
-
-    if not isfinite(x) or not isfinite(y):
-        if isinf(x) and isfinite(y) and y != 0.:
-            if x > 0:
-                real = 1.0        # vv XXX why is the 2. there?
-                imag = copysign(0., 2. * math.sin(y) * math.cos(y))
-            else:
-                real = -1.0
-                imag = copysign(0., 2. * math.sin(y) * math.cos(y))
-            r = (real, imag)
-        else:
-            r = tanh_special_values[special_type(x)][special_type(y)]
-
-        # need to raise ValueError if y is +/-infinity and x is finite
-        if isinf(y) and isfinite(x):
-            raise ValueError("math domain error")
-        return r
-
-    if fabs(x) > CM_LOG_LARGE_DOUBLE:
-        real = copysign(1., x)
-        imag = 4. * math.sin(y) * math.cos(y) * math.exp(-2.*fabs(x))
-    else:
-        tx = math.tanh(x)
-        ty = math.tan(y)
-        cx = 1. / math.cosh(x)
-        txty = tx * ty
-        denom = 1. + txty * txty
-        real = tx * (1. + ty*ty) / denom
-        imag = ((ty / denom) * cx) * cx
-    return real, imag
-
+    return rcomplex.c_tanh(x,y)
 
 @unaryfn
 def c_cos(x, y):
-    # cos(z) = cosh(iz)
-    return c_cosh(-y, x)
+    return rcomplex.c_cos(x,y)
 
 @unaryfn
 def c_sin(x, y):
-    # sin(z) = -i sinh(iz)
-    sx, sy = c_sinh(-y, x)
-    return sy, -sx
+    return rcomplex.c_sin(x,y)
 
 @unaryfn
 def c_tan(x, y):
-    # tan(z) = -i tanh(iz)
-    sx, sy = c_tanh(-y, x)
-    return sy, -sx
-
+    return rcomplex.c_tan(x,y)
 
 def c_rect(r, phi):
-    if not isfinite(r) or not isfinite(phi):
-        # if r is +/-infinity and phi is finite but nonzero then
-        # result is (+-INF +-INF i), but we need to compute cos(phi)
-        # and sin(phi) to figure out the signs.
-        if isinf(r) and isfinite(phi) and phi != 0.:
-            if r > 0:
-                real = copysign(INF, math.cos(phi))
-                imag = copysign(INF, math.sin(phi))
-            else:
-                real = -copysign(INF, math.cos(phi))
-                imag = -copysign(INF, math.sin(phi))
-            z = (real, imag)
-        else:
-            z = rect_special_values[special_type(r)][special_type(phi)]
-
-        # need to raise ValueError if r is a nonzero number and phi
-        # is infinite
-        if r != 0. and not isnan(r) and isinf(phi):
-            raise ValueError("math domain error")
-        return z
-
-    real = r * math.cos(phi)
-    imag = r * math.sin(phi)
-    return real, imag
+    return rcomplex.c_rect(r,phi)
 
 def wrapped_rect(space, w_x, w_y):
     x = space.float_w(w_x)
@@ -500,28 +129,7 @@
 
 
 def c_phase(x, y):
-    # Windows screws up atan2 for inf and nan, and alpha Tru64 5.1 doesn't
-    # follow C99 for atan2(0., 0.).
-    if isnan(x) or isnan(y):
-        return NAN
-    if isinf(y):
-        if isinf(x):
-            if copysign(1., x) == 1.:
-                # atan2(+-inf, +inf) == +-pi/4
-                return copysign(0.25 * math.pi, y)
-            else:
-                # atan2(+-inf, -inf) == +-pi*3/4
-                return copysign(0.75 * math.pi, y)
-        # atan2(+-inf, x) == +-pi/2 for finite x
-        return copysign(0.5 * math.pi, y)
-    if isinf(x) or y == 0.:
-        if copysign(1., x) == 1.:
-            # atan2(+-y, +inf) = atan2(+-0, +x) = +-0.
-            return copysign(0., y)
-        else:
-            # atan2(+-y, -inf) = atan2(+-0., -x) = +-pi.
-            return copysign(math.pi, y)
-    return math.atan2(y, x)
+    return rcomplex.c_phase(x,y)
 
 def wrapped_phase(space, w_z):
     x, y = space.unpackcomplex(w_z)
@@ -531,28 +139,10 @@
 
 
 def c_abs(x, y):
-    if not isfinite(x) or not isfinite(y):
-        # C99 rules: if either the real or the imaginary part is an
-        # infinity, return infinity, even if the other part is a NaN.
-        if isinf(x):
-            return INF
-        if isinf(y):
-            return INF
-
-        # either the real or imaginary part is a NaN,
-        # and neither is infinite. Result should be NaN.
-        return NAN
-
-    result = math.hypot(x, y)
-    if not isfinite(result):
-        raise OverflowError("math range error")
-    return result
-
+    return rcomplex.c_abs(x,y)
 
 def c_polar(x, y):
-    phi = c_phase(x, y)
-    r = c_abs(x, y)
-    return r, phi
+    return rcomplex.c_polar(x,y)
 
 def wrapped_polar(space, w_z):
     x, y = space.unpackcomplex(w_z)
@@ -562,7 +152,7 @@
 
 
 def c_isinf(x, y):
-    return isinf(x) or isinf(y)
+    return rcomplex.c_isinf(x,y)
 
 def wrapped_isinf(space, w_z):
     x, y = space.unpackcomplex(w_z)
@@ -572,7 +162,7 @@
 
 
 def c_isnan(x, y):
-    return isnan(x) or isnan(y)
+    return rcomplex.c_isnan(x,y)
 
 def wrapped_isnan(space, w_z):
     x, y = space.unpackcomplex(w_z)
diff --git a/pypy/module/cmath/test/test_cmath.py b/pypy/module/cmath/test/test_cmath.py
--- a/pypy/module/cmath/test/test_cmath.py
+++ b/pypy/module/cmath/test/test_cmath.py
@@ -6,7 +6,7 @@
 
 
 def test_special_values():
-    from pypy.module.cmath.special_value import sqrt_special_values
+    from pypy.rlib.special_value import sqrt_special_values
     assert len(sqrt_special_values) == 7
     assert len(sqrt_special_values[4]) == 7
     assert isinstance(sqrt_special_values[5][1], tuple)
@@ -115,7 +115,6 @@
     Empty lines or lines starting with -- are ignored
     yields id, fn, arg_real, arg_imag, exp_real, exp_imag
     """
-    fname = os.path.join(os.path.dirname(__file__), fname)
     with open(fname) as fp:
         for line in fp:
             # skip comment lines and blank lines
@@ -186,8 +185,10 @@
 def test_specific_values():
     #if not float.__getformat__("double").startswith("IEEE"):
     #    return
-
-    for id, fn, ar, ai, er, ei, flags in parse_testfile('cmath_testcases.txt'):
+    
+    # too fragile...
+    fname = os.path.join(os.path.dirname(__file__), '../../../rlib/test', 'rcomplex_testcases.txt')
+    for id, fn, ar, ai, er, ei, flags in parse_testfile(fname):
         arg = (ar, ai)
         expected = (er, ei)
         function = getattr(interp_cmath, 'c_' + fn)
diff --git a/pypy/module/micronumpy/__init__.py b/pypy/module/micronumpy/__init__.py
--- a/pypy/module/micronumpy/__init__.py
+++ b/pypy/module/micronumpy/__init__.py
@@ -64,6 +64,10 @@
         'str_': 'interp_boxes.W_StringBox',
         'unicode_': 'interp_boxes.W_UnicodeBox',
         'void': 'interp_boxes.W_VoidBox',
+        'complexfloating': 'interp_boxes.W_ComplexFloatingBox',
+        'complex_': 'interp_boxes.W_Complex128Box',
+        'complex128': 'interp_boxes.W_Complex128Box',
+        'complex64': 'interp_boxes.W_Complex64Box',
     }
 
     # ufuncs
@@ -78,6 +82,8 @@
         ("arccosh", "arccosh"),
         ("arcsinh", "arcsinh"),
         ("arctanh", "arctanh"),
+        ("conj", "conjugate"),
+        ("conjugate", "conjugate"),
         ("copysign", "copysign"),
         ("cos", "cos"),
         ("cosh", "cosh"),
@@ -141,6 +147,8 @@
         ('floor_divide', 'floor_divide'),
         ('logaddexp', 'logaddexp'),
         ('logaddexp2', 'logaddexp2'),
+        ('real', 'real'),
+        ('imag', 'imag'),
     ]:
         interpleveldefs[exposed] = "interp_ufuncs.get(space).%s" % impl
 
diff --git a/pypy/module/micronumpy/compile.py b/pypy/module/micronumpy/compile.py
--- a/pypy/module/micronumpy/compile.py
+++ b/pypy/module/micronumpy/compile.py
@@ -56,7 +56,8 @@
     w_slice = "slice"
     w_str = "str"
     w_unicode = "unicode"
-
+    w_complex = "complex"
+    
     def __init__(self):
         """NOT_RPYTHON"""
         self.fromcache = InternalSpaceCache(self).getorbuild
diff --git a/pypy/module/micronumpy/interp_boxes.py b/pypy/module/micronumpy/interp_boxes.py
--- a/pypy/module/micronumpy/interp_boxes.py
+++ b/pypy/module/micronumpy/interp_boxes.py
@@ -1,11 +1,12 @@
 from pypy.interpreter.baseobjspace import Wrappable
 from pypy.interpreter.error import operationerrfmt, OperationError
 from pypy.interpreter.gateway import interp2app, unwrap_spec
-from pypy.interpreter.typedef import TypeDef
+from pypy.interpreter.typedef import TypeDef, GetSetProperty
 from pypy.objspace.std.floattype import float_typedef
 from pypy.objspace.std.stringtype import str_typedef
 from pypy.objspace.std.unicodetype import unicode_typedef, unicode_from_object
 from pypy.objspace.std.inttype import int_typedef
+from pypy.objspace.std.complextype import complex_typedef
 from pypy.rlib.rarithmetic import LONG_BIT
 from pypy.tool.sourcetools import func_with_new_name
 from pypy.module.micronumpy.arrayimpl.voidbox import VoidBoxStorage
@@ -34,6 +35,25 @@
     def convert_to(self, dtype):
         return dtype.box(self.value)
 
+class ComplexBox(object):
+    _mixin_ = True
+
+    def __init__(self, real, imag=0.):
+        self.real = real
+        self.imag = imag
+
+    def convert_to(self, dtype):
+        from pypy.module.micronumpy.types import ComplexFloating
+        if not isinstance(dtype.itemtype, ComplexFloating):
+            raise TypeError('cannot convert %r to complex' % dtype)
+        return dtype.box_complex(self.real, self.imag)
+
+    def convert_real_to(self, dtype):
+        return dtype.box(self.real)
+
+    def convert_imag_to(self, dtype):
+        return dtype.box(self.imag)
+
 class W_GenericBox(Wrappable):
     _attrs_ = ()
 
@@ -57,7 +77,12 @@
         return space.wrap(box.value)
 
     def descr_float(self, space):
-        box = self.convert_to(W_Float64Box._get_dtype(space))
+        try:
+            box = self.convert_to(W_Float64Box._get_dtype(space))
+        except TypeError:
+            raise OperationError(space.w_TypeError,
+                                 space.wrap("Cannot convert %s to float" % self._get_dtype(space).name))
+
         assert isinstance(box, W_Float64Box)
         return space.wrap(box.value)
 
@@ -220,6 +245,7 @@
 def descr_index(space, self):
     return space.index(self.item(space))
 
+
 class W_VoidBox(W_FlexibleBox):
     @unwrap_spec(item=str)
     def descr_getitem(self, space, item):
@@ -266,6 +292,32 @@
         #    arr.storage[i] = arg[i]
         return W_UnicodeBox(arr, 0, arr.dtype)
 
+
+class W_ComplexFloatingBox(W_InexactBox):
+    _attrs_ = ()
+    def descr_get_real(self, space):
+        dtype = self._COMPONENTS_BOX._get_dtype(space)
+        box = self.convert_real_to(dtype)
+        assert isinstance(box, self._COMPONENTS_BOX)
+        return space.wrap(box)
+
+    def descr_get_imag(self, space):
+        dtype = self._COMPONENTS_BOX._get_dtype(space)
+        box = self.convert_imag_to(dtype)
+        assert isinstance(box, self._COMPONENTS_BOX)
+        return space.wrap(box)
+
+
+class W_Complex64Box(ComplexBox, W_ComplexFloatingBox):
+    descr__new__, _get_dtype = new_dtype_getter("complex64")
+    _COMPONENTS_BOX = W_Float32Box
+
+
+class W_Complex128Box(ComplexBox, W_ComplexFloatingBox):
+    descr__new__, _get_dtype = new_dtype_getter("complex128")
+    _COMPONENTS_BOX = W_Float64Box
+
+    
 W_GenericBox.typedef = TypeDef("generic",
     __module__ = "numpypy",
 
@@ -448,3 +500,21 @@
     __new__ = interp2app(W_UnicodeBox.descr__new__unicode_box.im_func),
 )
 
+W_ComplexFloatingBox.typedef = TypeDef("complexfloating", W_InexactBox.typedef,
+    __module__ = "numpypy",
+)
+
+
+W_Complex128Box.typedef = TypeDef("complex128", (W_ComplexFloatingBox.typedef, complex_typedef),
+    __module__ = "numpypy",
+    __new__ = interp2app(W_Complex128Box.descr__new__.im_func),
+    real = GetSetProperty(W_ComplexFloatingBox.descr_get_real),
+    imag = GetSetProperty(W_ComplexFloatingBox.descr_get_imag),
+)
+
+W_Complex64Box.typedef = TypeDef("complex64", (W_ComplexFloatingBox.typedef),
+    __module__ = "numpypy",
+    __new__ = interp2app(W_Complex64Box.descr__new__.im_func),
+    real = GetSetProperty(W_ComplexFloatingBox .descr_get_real),
+    imag = GetSetProperty(W_ComplexFloatingBox.descr_get_imag),
+)
diff --git a/pypy/module/micronumpy/interp_dtype.py b/pypy/module/micronumpy/interp_dtype.py
--- a/pypy/module/micronumpy/interp_dtype.py
+++ b/pypy/module/micronumpy/interp_dtype.py
@@ -46,6 +46,11 @@
     def box(self, value):
         return self.itemtype.box(value)
 
+    @specialize.argtype(1, 2)
+    def box_complex(self, real, imag):
+        return self.itemtype.box_complex(real, imag)
+
+
     def coerce(self, space, w_item):
         return self.itemtype.coerce(space, self, w_item)
 
@@ -121,6 +126,9 @@
     def is_signed(self):
         return self.kind == SIGNEDLTR
 
+    def is_complex_type(self):
+        return (self.num == 14 or self.num == 15)
+
     def is_bool_type(self):
         return self.kind == BOOLLTR
 
@@ -393,6 +401,31 @@
             alternate_constructors=[space.w_float],
             aliases=["float"],
         )
+        # self.w_float128dtype = W_Dtype(
+        #     types.Float128(),
+        #     num=13,
+        #     kind=FLOATINGLTR,
+        #     name="float128",
+        #     ...
+        # )
+        self.w_complex64dtype = W_Dtype(
+            types.Complex64(),
+            num=14,
+            kind=FLOATINGLTR,
+            name="complex64",
+            char="F",
+            w_box_type = space.gettypefor(interp_boxes.W_Complex64Box),
+        )
+        self.w_complex128dtype = W_Dtype(
+            types.Complex128(),
+            num=15,
+            kind=FLOATINGLTR,
+            name="complex128",
+            char="D",
+            w_box_type = space.gettypefor(interp_boxes.W_Complex128Box),
+            alternate_constructors=[space.w_complex],
+            aliases=["complex"],
+        )
         self.w_stringdtype = W_Dtype(
             types.StringType(1),
             num=18,
@@ -426,8 +459,9 @@
             self.w_int16dtype, self.w_uint16dtype, self.w_int32dtype,
             self.w_uint32dtype, self.w_longdtype, self.w_ulongdtype,
             self.w_int64dtype, self.w_uint64dtype,
-            self.w_float32dtype,
-            self.w_float64dtype, self.w_stringdtype, self.w_unicodedtype,
+            self.w_float32dtype, self.w_float64dtype, self.w_complex64dtype,
+            self.w_complex128dtype,
+            self.w_stringdtype, self.w_unicodedtype,
             self.w_voiddtype,
         ]
         self.float_dtypes_by_num_bytes = sorted(
diff --git a/pypy/module/micronumpy/interp_numarray.py b/pypy/module/micronumpy/interp_numarray.py
--- a/pypy/module/micronumpy/interp_numarray.py
+++ b/pypy/module/micronumpy/interp_numarray.py
@@ -383,6 +383,8 @@
     descr_neg = _unaryop_impl("negative")
     descr_abs = _unaryop_impl("absolute")
     descr_invert = _unaryop_impl("invert")
+    descr_get_real = _unaryop_impl("real")
+    descr_get_imag = _unaryop_impl("imag")
 
     def descr_nonzero(self, space):
         if self.get_size() > 1:
@@ -629,6 +631,8 @@
     swapaxes = interp2app(W_NDimArray.descr_swapaxes),
     flat = GetSetProperty(W_NDimArray.descr_get_flatiter),
     item = interp2app(W_NDimArray.descr_item),
+    real = GetSetProperty(W_NDimArray.descr_get_real),
+    imag = GetSetProperty(W_NDimArray.descr_get_imag),
 
     __array_interface__ = GetSetProperty(W_NDimArray.descr_array_iface),
 )
@@ -663,8 +667,9 @@
         for w_elem in elems_w:
             dtype = interp_ufuncs.find_dtype_for_scalar(space, w_elem,
                                                         dtype)
-            if dtype is interp_dtype.get_dtype_cache(space).w_float64dtype:
-                break
+            #if dtype is interp_dtype.get_dtype_cache(space).w_float64dtype:
+            #    break
+            
         if dtype is None:
             dtype = interp_dtype.get_dtype_cache(space).w_float64dtype
     if ndmin > len(shape):
diff --git a/pypy/module/micronumpy/interp_ufuncs.py b/pypy/module/micronumpy/interp_ufuncs.py
--- a/pypy/module/micronumpy/interp_ufuncs.py
+++ b/pypy/module/micronumpy/interp_ufuncs.py
@@ -17,14 +17,15 @@
     return not dtype.itemtype.bool(val)
 
 class W_Ufunc(Wrappable):
-    _attrs_ = ["name", "promote_to_float", "promote_bools", "identity"]
-    _immutable_fields_ = ["promote_to_float", "promote_bools", "name"]
+    _attrs_ = ["name", "promote_to_float", "promote_bools", "identity", "allow_complex"]
+    _immutable_fields_ = ["promote_to_float", "promote_bools", "name", "allow_complex"]
 
     def __init__(self, name, promote_to_float, promote_bools, identity,
-                 int_only):
+                 int_only, allow_complex):
         self.name = name
         self.promote_to_float = promote_to_float
         self.promote_bools = promote_bools
+        self.allow_complex = allow_complex
 
         self.identity = identity
         self.int_only = int_only
@@ -215,10 +216,10 @@
     _immutable_fields_ = ["func", "name"]
 
     def __init__(self, func, name, promote_to_float=False, promote_bools=False,
-        identity=None, bool_result=False, int_only=False):
+        identity=None, bool_result=False, int_only=False, allow_complex=True):
 
         W_Ufunc.__init__(self, name, promote_to_float, promote_bools, identity,
-                         int_only)
+                         int_only, allow_complex)
         self.func = func
         self.bool_result = bool_result
 
@@ -233,7 +234,8 @@
         calc_dtype = find_unaryop_result_dtype(space,
                                   w_obj.get_dtype(),
                                   promote_to_float=self.promote_to_float,
-                                  promote_bools=self.promote_bools)
+                                  promote_bools=self.promote_bools,
+                                  allow_complex=self.allow_complex)
         if out is not None:
             if not isinstance(out, W_NDimArray):
                 raise OperationError(space.w_TypeError, space.wrap(
@@ -267,10 +269,10 @@
     argcount = 2
 
     def __init__(self, func, name, promote_to_float=False, promote_bools=False,
-        identity=None, comparison_func=False, int_only=False):
+        identity=None, comparison_func=False, int_only=False, allow_complex=True):
 
         W_Ufunc.__init__(self, name, promote_to_float, promote_bools, identity,
-                         int_only)
+                         int_only, allow_complex)
         self.func = func
         self.comparison_func = comparison_func
         if name == 'logical_and':
@@ -289,14 +291,15 @@
             w_out = None
         w_lhs = convert_to_array(space, w_lhs)
         w_rhs = convert_to_array(space, w_rhs)
+        calc_dtype = find_binop_result_dtype(space,
+            w_lhs.get_dtype(), w_rhs.get_dtype(),
+            int_only=self.int_only,
+            promote_to_float=self.promote_to_float,
+            promote_bools=self.promote_bools,
+            allow_complex=self.allow_complex,
+            )
         if space.is_w(w_out, space.w_None) or w_out is None:
             out = None
-            calc_dtype = find_binop_result_dtype(space,
-                w_lhs.get_dtype(), w_rhs.get_dtype(),
-                int_only=self.int_only,
-                promote_to_float=self.promote_to_float,
-                promote_bools=self.promote_bools,
-            )
         elif not isinstance(w_out, W_NDimArray):
             raise OperationError(space.w_TypeError, space.wrap(
                     'output must be an array'))
@@ -340,15 +343,25 @@
 
 
 def find_binop_result_dtype(space, dt1, dt2, promote_to_float=False,
-    promote_bools=False, int_only=False):
+    promote_bools=False, int_only=False, allow_complex=True):
     # dt1.num should be <= dt2.num
     if dt1.num > dt2.num:
         dt1, dt2 = dt2, dt1
     if int_only and (not dt1.is_int_type() or not dt2.is_int_type()):
         raise OperationError(space.w_TypeError, space.wrap("Unsupported types"))
+    if not allow_complex and (dt1.is_complex_type() or dt2.is_complex_type()):
+        raise OperationError(space.w_TypeError, space.wrap("Unsupported types"))
     # Some operations promote op(bool, bool) to return int8, rather than bool
     if promote_bools and (dt1.kind == dt2.kind == interp_dtype.BOOLLTR):
         return interp_dtype.get_dtype_cache(space).w_int8dtype
+
+    # Everything promotes to complex
+    if dt2.num == 14 or dt2.num == 15 or dt1.num == 14 or dt2.num == 15:
+        if dt2.num == 15 or dt1.num == 15:
+            return interp_dtype.get_dtype_cache(space).w_complex128dtype
+        else:
+            return interp_dtype.get_dtype_cache(space).w_complex64dtype
+    
     if promote_to_float:
         return find_unaryop_result_dtype(space, dt2, promote_to_float=True)
     # If they're the same kind, choose the greater one.
@@ -391,9 +404,11 @@
 
 
 def find_unaryop_result_dtype(space, dt, promote_to_float=False,
-    promote_bools=False, promote_to_largest=False):
+    promote_bools=False, promote_to_largest=False, allow_complex=True):
     if promote_bools and (dt.kind == interp_dtype.BOOLLTR):
         return interp_dtype.get_dtype_cache(space).w_int8dtype
+    if not allow_complex and (dt.is_complex_type()):
+        raise OperationError(space.w_TypeError, space.wrap("Unsupported types"))
     if promote_to_float:
         if dt.kind == interp_dtype.FLOATINGLTR:
             return dt
@@ -419,7 +434,8 @@
     bool_dtype = interp_dtype.get_dtype_cache(space).w_booldtype
     long_dtype = interp_dtype.get_dtype_cache(space).w_longdtype
     int64_dtype = interp_dtype.get_dtype_cache(space).w_int64dtype
-
+    complex_type = interp_dtype.get_dtype_cache(space).w_complex128dtype
+    float_type = interp_dtype.get_dtype_cache(space).w_float64dtype
     if isinstance(w_obj, interp_boxes.W_GenericBox):
         dtype = w_obj.get_dtype(space)
         if current_guess is None:
@@ -440,6 +456,14 @@
             current_guess is long_dtype or current_guess is int64_dtype):
             return int64_dtype
         return current_guess
+    elif space.isinstance_w(w_obj, space.w_complex):
+        if (current_guess is None or current_guess is bool_dtype or
+            current_guess is long_dtype or current_guess is int64_dtype or
+            current_guess is complex_type or current_guess is float_type):
+            return complex_type
+        return current_guess
+    if current_guess is complex_type:
+        return complex_type
     return interp_dtype.get_dtype_cache(space).w_float64dtype
 
 
@@ -476,7 +500,7 @@
             ("floor_divide", "floordiv", 2, {"promote_bools": True}),
             ("divide", "div", 2, {"promote_bools": True}),
             ("true_divide", "div", 2, {"promote_to_float": True}),
-            ("mod", "mod", 2, {"promote_bools": True}),
+            ("mod", "mod", 2, {"promote_bools": True, 'allow_complex': False}),
             ("power", "pow", 2, {"promote_bools": True}),
             ("left_shift", "lshift", 2, {"int_only": True}),
             ("right_shift", "rshift", 2, {"int_only": True}),
@@ -489,8 +513,10 @@
             ("greater_equal", "ge", 2, {"comparison_func": True}),
             ("isnan", "isnan", 1, {"bool_result": True}),
             ("isinf", "isinf", 1, {"bool_result": True}),
-            ("isneginf", "isneginf", 1, {"bool_result": True}),
-            ("isposinf", "isposinf", 1, {"bool_result": True}),
+            ("isneginf", "isneginf", 1, {"bool_result": True,
+                                         "allow_complex": False}),
+            ("isposinf", "isposinf", 1, {"bool_result": True,
+                                         "allow_complex": False}),
             ("isfinite", "isfinite", 1, {"bool_result": True}),
 
             ('logical_and', 'logical_and', 2, {'comparison_func': True,
@@ -503,22 +529,32 @@
             ("maximum", "max", 2),
             ("minimum", "min", 2),
 
-            ("copysign", "copysign", 2, {"promote_to_float": True}),
+            ("copysign", "copysign", 2, {"promote_to_float": True,
+                                         "allow_complex": False}),
 
             ("positive", "pos", 1),
             ("negative", "neg", 1),
             ("absolute", "abs", 1),
             ("sign", "sign", 1, {"promote_bools": True}),
-            ("signbit", "signbit", 1, {"bool_result": True}),
+            ("signbit", "signbit", 1, {"bool_result": True, 
+                                       "allow_complex": False}),
             ("reciprocal", "reciprocal", 1),
+            ("conjugate", "conj", 1),
+            ("real", "real", 1),
+            ("imag", "imag", 1),
 
-            ("fabs", "fabs", 1, {"promote_to_float": True}),
+            ("fabs", "fabs", 1, {"promote_to_float": True,
+                                 "allow_complex": False}),
             ("fmax", "fmax", 2, {"promote_to_float": True}),
             ("fmin", "fmin", 2, {"promote_to_float": True}),
-            ("fmod", "fmod", 2, {"promote_to_float": True}),
-            ("floor", "floor", 1, {"promote_to_float": True}),
-            ("ceil", "ceil", 1, {"promote_to_float": True}),
-            ("trunc", "trunc", 1, {"promote_to_float": True}),
+            ("fmod", "fmod", 2, {"promote_to_float": True, 
+                                 'allow_complex': False}),
+            ("floor", "floor", 1, {"promote_to_float": True,
+                                   "allow_complex": False}),
+            ("ceil", "ceil", 1, {"promote_to_float": True,
+                                   "allow_complex": False}),
+            ("trunc", "trunc", 1, {"promote_to_float": True,
+                                   "allow_complex": False}),
             ("exp", "exp", 1, {"promote_to_float": True}),
             ("exp2", "exp2", 1, {"promote_to_float": True}),
             ("expm1", "expm1", 1, {"promote_to_float": True}),
@@ -532,7 +568,8 @@
             ("arcsin", "arcsin", 1, {"promote_to_float": True}),
             ("arccos", "arccos", 1, {"promote_to_float": True}),
             ("arctan", "arctan", 1, {"promote_to_float": True}),
-            ("arctan2", "arctan2", 2, {"promote_to_float": True}),
+            ("arctan2", "arctan2", 2, {"promote_to_float": True,
+                                       "allow_complex": False}),
             ("sinh", "sinh", 1, {"promote_to_float": True}),
             ("cosh", "cosh", 1, {"promote_to_float": True}),
             ("tanh", "tanh", 1, {"promote_to_float": True}),
@@ -540,15 +577,19 @@
             ("arccosh", "arccosh", 1, {"promote_to_float": True}),
             ("arctanh", "arctanh", 1, {"promote_to_float": True}),
 
-            ("radians", "radians", 1, {"promote_to_float": True}),
-            ("degrees", "degrees", 1, {"promote_to_float": True}),
+            ("radians", "radians", 1, {"promote_to_float": True,
+                                       "allow_complex": False}),
+            ("degrees", "degrees", 1, {"promote_to_float": True,
+                                       "allow_complex": False}),
 
             ("log", "log", 1, {"promote_to_float": True}),
             ("log2", "log2", 1, {"promote_to_float": True}),
             ("log10", "log10", 1, {"promote_to_float": True}),
             ("log1p", "log1p", 1, {"promote_to_float": True}),
-            ("logaddexp", "logaddexp", 2, {"promote_to_float": True}),
-            ("logaddexp2", "logaddexp2", 2, {"promote_to_float": True}),
+            ("logaddexp", "logaddexp", 2, {"promote_to_float": True,
+                                       "allow_complex": False}),
+            ("logaddexp2", "logaddexp2", 2, {"promote_to_float": True,
+                                       "allow_complex": False}),
         ]:
             self.add_ufunc(space, *ufunc_def)
 
diff --git a/pypy/module/micronumpy/test/complex64_testcases.txt b/pypy/module/micronumpy/test/complex64_testcases.txt
new file mode 100644
--- /dev/null
+++ b/pypy/module/micronumpy/test/complex64_testcases.txt
@@ -0,0 +1,2214 @@
+-- Testcases for functions in cmath.
+--
+-- Each line takes the form:
+--
+-- <testid> <function> <input_value> -> <output_value> <flags>
+--
+-- where:
+--
+--   <testid> is a short name identifying the test,
+--
+--   <function> is the function to be tested (exp, cos, asinh, ...),
+--
+--   <input_value> is a pair of floats separated by whitespace
+--     representing real and imaginary parts of a complex number, and
+--
+--   <output_value> is the expected (ideal) output value, again
+--     represented as a pair of floats.
+--
+--   <flags> is a list of the floating-point flags required by C99
+--
+-- The possible flags are:
+--
+--   divide-by-zero : raised when a finite input gives a
+--     mathematically infinite result.
+--
+--   overflow : raised when a finite input gives a finite result whose
+--     real or imaginary part is too large to fit in the usual range
+--     of an IEEE 754 double.
+--
+--   invalid : raised for invalid inputs.
+--
+--   ignore-real-sign : indicates that the sign of the real part of
+--     the result is unspecified; if the real part of the result is
+--     given as inf, then both -inf and inf should be accepted as
+--     correct.
+--
+--   ignore-imag-sign : indicates that the sign of the imaginary part
+--     of the result is unspecified.
+--
+-- Flags may appear in any order.
+--
+-- Lines beginning with '--' (like this one) start a comment, and are
+-- ignored.  Blank lines, or lines containing only whitespace, are also
+-- ignored.
+
+-- The majority of the values below were computed with the help of
+-- version 2.3 of the MPFR library for multiple-precision
+-- floating-point computations with correct rounding.  All output
+-- values in this file are (modulo yet-to-be-discovered bugs)
+-- correctly rounded, provided that each input and output decimal
+-- floating-point value below is interpreted as a representation of
+-- the corresponding nearest IEEE 754 double-precision value.  See the
+-- MPFR homepage at http://www.mpfr.org for more information about the
+-- MPFR project.
+
+-----------------------
+-- sqrt: Square root --
+-----------------------
+
+-- zeros
+sqrt0000 sqrt 0.0 0.0 -> 0.0 0.0
+sqrt0001 sqrt 0.0 -0.0 -> 0.0 -0.0
+sqrt0002 sqrt -0.0 0.0 -> 0.0 0.0
+sqrt0003 sqrt -0.0 -0.0 -> 0.0 -0.0
+sqrt0004 sqrt 1.0 -0.0 -> 1.0 -0.0
+
+-- values along both sides of real axis
+sqrt0010 sqrt -1.40129846432481707092372958329e-45  0.0 -> 0.0 3.743392130574644e-23
+sqrt0011 sqrt -1.40129846432481707092372958329e-45 -0.0 -> 0.0 -3.743392130574644e-23
+sqrt0012 sqrt -1e-35 0.0 -> 0.0 3.1622776601683795e-18
+sqrt0013 sqrt -1e-35 -0.0 -> 0.0 -3.1622776601683791e-18
+sqrt0014 sqrt -1e-20 0.0 -> 0.0 9.9999999999999996e-11
+sqrt0015 sqrt -1e-20 -0.0 -> 0.0 -9.9999999999999996e-11
+sqrt0016 sqrt -9.9999999999999998e-17 0.0 -> 0.0 1e-08
+sqrt0017 sqrt -9.9999999999999998e-17 -0.0 -> 0.0 -1e-08
+sqrt0018 sqrt -0.001 0.0 -> 0.0 0.031622776601683791
+sqrt0019 sqrt -0.001 -0.0 -> 0.0 -0.031622776601683791
+sqrt0020 sqrt -0.57899999999999996 0.0 -> 0.0 0.76092049518987193
+sqrt0021 sqrt -0.57899999999999996 -0.0 -> 0.0 -0.76092049518987193
+sqrt0022 sqrt -0.99999999999999989 0.0 -> 0.0 0.99999999999999989
+sqrt0023 sqrt -0.99999999999999989 -0.0 -> 0.0 -0.99999999999999989
+sqrt0024 sqrt -1.0000000000000002 0.0 -> 0.0 1.0
+sqrt0025 sqrt -1.0000000000000002 -0.0 -> 0.0 -1.0
+sqrt0026 sqrt -1.0009999999999999 0.0 -> 0.0 1.000499875062461
+sqrt0027 sqrt -1.0009999999999999 -0.0 -> 0.0 -1.000499875062461
+sqrt0028 sqrt -2.0 0.0 -> 0.0 1.4142135623730951
+sqrt0029 sqrt -2.0 -0.0 -> 0.0 -1.4142135623730951
+sqrt0030 sqrt -23.0 0.0 -> 0.0 4.7958315233127191
+sqrt0031 sqrt -23.0 -0.0 -> 0.0 -4.7958315233127191
+sqrt0032 sqrt -10000000000000000.0 0.0 -> 0.0 100000000.0
+sqrt0033 sqrt -10000000000000000.0 -0.0 -> 0.0 -100000000.0
+sqrt0034 sqrt -9.9999999999999998e+19 0.0 -> 0.0 9.9999999999999993e+9
+sqrt0035 sqrt -9.9999999999999998e+19 -0.0 -> 0.0 -9.9999999999999993e+9
+sqrt0036 sqrt -1.0000000000000001e+29 0.0 -> 0.0 3.1622776601683796e+14
+sqrt0037 sqrt -1.0000000000000001e+29 -0.0 -> 0.0 -3.1622776601683796e+14
+sqrt0038 sqrt 1.40129846432481707092372958329e-45 0.0 -> 3.743392130574644e-162 0.0
+sqrt0039 sqrt 9.8813129168249309e-324 -0.0 -> 3.1434555694052576e-162 -0.0
+sqrt0040 sqrt 1e-305 0.0 -> 3.1622776601683791e-153 0.0
+sqrt0041 sqrt 1e-305 -0.0 -> 3.1622776601683791e-153 -0.0
+sqrt0042 sqrt 1e-150 0.0 -> 9.9999999999999996e-76 0.0
+sqrt0043 sqrt 1e-150 -0.0 -> 9.9999999999999996e-76 -0.0
+sqrt0044 sqrt 9.9999999999999998e-17 0.0 -> 1e-08 0.0
+sqrt0045 sqrt 9.9999999999999998e-17 -0.0 -> 1e-08 -0.0
+sqrt0046 sqrt 0.001 0.0 -> 0.031622776601683791 0.0
+sqrt0047 sqrt 0.001 -0.0 -> 0.031622776601683791 -0.0
+sqrt0048 sqrt 0.57899999999999996 0.0 -> 0.76092049518987193 0.0
+sqrt0049 sqrt 0.57899999999999996 -0.0 -> 0.76092049518987193 -0.0
+sqrt0050 sqrt 0.99999999999999989 0.0 -> 0.99999999999999989 0.0
+sqrt0051 sqrt 0.99999999999999989 -0.0 -> 0.99999999999999989 -0.0
+sqrt0052 sqrt 1.0000000000000002 0.0 -> 1.0 0.0
+sqrt0053 sqrt 1.0000000000000002 -0.0 -> 1.0 -0.0
+sqrt0054 sqrt 1.0009999999999999 0.0 -> 1.000499875062461 0.0
+sqrt0055 sqrt 1.0009999999999999 -0.0 -> 1.000499875062461 -0.0
+sqrt0056 sqrt 2.0 0.0 -> 1.4142135623730951 0.0
+sqrt0057 sqrt 2.0 -0.0 -> 1.4142135623730951 -0.0
+sqrt0058 sqrt 23.0 0.0 -> 4.7958315233127191 0.0
+sqrt0059 sqrt 23.0 -0.0 -> 4.7958315233127191 -0.0
+sqrt0060 sqrt 10000000000000000.0 0.0 -> 100000000.0 0.0
+sqrt0061 sqrt 10000000000000000.0 -0.0 -> 100000000.0 -0.0
+sqrt0062 sqrt 9.9999999999999998e+149 0.0 -> 9.9999999999999993e+74 0.0
+sqrt0063 sqrt 9.9999999999999998e+149 -0.0 -> 9.9999999999999993e+74 -0.0
+sqrt0064 sqrt 1.0000000000000001e+299 0.0 -> 3.1622776601683796e+149 0.0
+sqrt0065 sqrt 1.0000000000000001e+299 -0.0 -> 3.1622776601683796e+149 -0.0
+
+-- random inputs
+sqrt0100 sqrt -0.34252542541549913 -223039880.15076211 -> 10560.300180587592 -10560.300196805192
+sqrt0101 sqrt -0.88790791393018909 -5.3307751730827402 -> 1.5027154613689004 -1.7737140896343291
+sqrt0102 sqrt -113916.89291310767 -0.018143374626153858 -> 2.6877817875351178e-05 -337.51576691038952
+sqrt0103 sqrt -0.63187172386197121 -0.26293913366617694 -> 0.16205707495266153 -0.81125471918761971
+sqrt0104 sqrt -0.058185169308906215 -2.3548312990430991 -> 1.0717660342420072 -1.0985752598086966
+sqrt0105 sqrt -1.0580584765935896 0.14400319259151736 -> 0.069837489270111242 1.030987755262468
+sqrt0106 sqrt -1.1667595947504932 0.11159711473953678 -> 0.051598531319315251 1.0813981705111229
+sqrt0107 sqrt -0.5123728411449906 0.026175433648339085 -> 0.018278026262418718 0.71603556293597614
+sqrt0108 sqrt -3.7453400060067228 1.0946500314809635 -> 0.27990088541692498 1.9554243814742367
+sqrt0109 sqrt -0.0027736121575097673 1.0367943000839817 -> 0.71903560338719175 0.72096172651250545
+sqrt0110 sqrt 1501.2559699453188 -1.1997325207283589 -> 38.746047664730959 -0.015481998720355024
+sqrt0111 sqrt 1.4830075326850578 -0.64100878436755349 -> 1.244712815741096 -0.25749264258434584
+sqrt0112 sqrt 0.095395618499734602 -0.48226565701639595 -> 0.54175904053472879 -0.44509239434231551
+sqrt0113 sqrt 0.50109185681863277 -0.54054037379892561 -> 0.7868179858332387 -0.34349772344520979
+sqrt0114 sqrt 0.98779807595367897 -0.00019848758437225191 -> 0.99388031770665153 -9.9854872279921968e-05
+sqrt0115 sqrt 11.845472380792259 0.0010051104581506761 -> 3.4417252072345397 0.00014601840612346451
+sqrt0116 sqrt 2.3558249686735975 0.25605157371744403 -> 1.5371278477386647 0.083288964575761404
+sqrt0117 sqrt 0.77584894123159098 1.0496420627016076 -> 1.0200744386390885 0.51449287568756552
+sqrt0118 sqrt 1.8961715669604893 0.34940793467158854 -> 1.3827991781411615 0.12634080935066902
+sqrt0119 sqrt 0.96025378316565801 0.69573224860140515 -> 1.0358710342209998 0.33581991658093457
+
+-- values near 0
+sqrt0120 sqrt 7.3577938365086866e-313 8.1181408465112743e-319 -> 8.5777583531543516e-157 4.732087634251168e-163
+sqrt0121 sqrt 1.2406883874892108e-310 -5.1210133324269776e-312 -> 1.1140990057468052e-155 -2.2982756945349973e-157
+sqrt0122 sqrt -7.1145453001139502e-322 2.9561379244703735e-314 -> 1.2157585807480286e-157 1.2157586100077242e-157
+sqrt0123 sqrt -4.9963244206801218e-314 -8.4718424423690227e-319 -> 1.8950582312540437e-162 -2.2352459419578971e-157
+sqrt0124 sqrt 0.0 7.699553609385195e-318 -> 1.9620848107797476e-159 1.9620848107797476e-159
+sqrt0125 sqrt -0.0 3.3900826606499415e-309 -> 4.1170879639922327e-155 4.1170879639922327e-155
+sqrt0126 sqrt 0.0 -9.8907989772250828e-319 -> 7.032353438652342e-160 -7.032353438652342e-160
+sqrt0127 sqrt -0.0 -1.3722939367590908e-315 -> 2.6194407196566702e-158 -2.6194407196566702e-158
+sqrt0128 sqrt 7.9050503334599447e-323 0.0 -> 8.8910349979403099e-162 0.0
+sqrt0129 sqrt 1.8623241768349486e-309 -0.0 -> 4.3154654173506579e-155 -0.0
+sqrt0130 sqrt -2.665971134499887e-308 0.0 -> 0.0 1.6327801856036491e-154
+sqrt0131 sqrt -1.5477066694467245e-310 -0.0 -> 0.0 -1.2440685951533077e-155
+
+-- inputs whose absolute value overflows
+sqrt0140 sqrt 1.6999999999999999e+308 -1.6999999999999999e+308 -> 1.4325088230154573e+154 -5.9336458271212207e+153
+sqrt0141 sqrt -1.797e+308 -9.9999999999999999e+306 -> 3.7284476432057307e+152 -1.3410406899802901e+154
+
+-- special values
+sqrt1000 sqrt 0.0 0.0 -> 0.0 0.0
+sqrt1001 sqrt -0.0 0.0 -> 0.0 0.0
+sqrt1002 sqrt 0.0 inf -> inf inf
+sqrt1003 sqrt 2.3 inf -> inf inf
+sqrt1004 sqrt inf inf -> inf inf
+sqrt1005 sqrt -0.0 inf -> inf inf
+sqrt1006 sqrt -2.3 inf -> inf inf
+sqrt1007 sqrt -inf inf -> inf inf
+sqrt1008 sqrt nan inf -> inf inf
+sqrt1009 sqrt 0.0 nan -> nan nan
+sqrt1010 sqrt 2.3 nan -> nan nan
+sqrt1011 sqrt -0.0 nan -> nan nan
+sqrt1012 sqrt -2.3 nan -> nan nan
+sqrt1013 sqrt -inf 0.0 -> 0.0 inf
+sqrt1014 sqrt -inf 2.3 -> 0.0 inf
+sqrt1015 sqrt inf 0.0 -> inf 0.0
+sqrt1016 sqrt inf 2.3 -> inf 0.0
+sqrt1017 sqrt -inf nan -> nan inf       ignore-imag-sign
+sqrt1018 sqrt inf nan -> inf nan
+sqrt1019 sqrt nan 0.0 -> nan nan
+sqrt1020 sqrt nan 2.3 -> nan nan
+sqrt1021 sqrt nan nan -> nan nan
+sqrt1022 sqrt 0.0 -0.0 -> 0.0 -0.0
+sqrt1023 sqrt -0.0 -0.0 -> 0.0 -0.0
+sqrt1024 sqrt 0.0 -inf -> inf -inf
+sqrt1025 sqrt 2.3 -inf -> inf -inf
+sqrt1026 sqrt inf -inf -> inf -inf
+sqrt1027 sqrt -0.0 -inf -> inf -inf
+sqrt1028 sqrt -2.3 -inf -> inf -inf
+sqrt1029 sqrt -inf -inf -> inf -inf
+sqrt1030 sqrt nan -inf -> inf -inf
+sqrt1031 sqrt -inf -0.0 -> 0.0 -inf
+sqrt1032 sqrt -inf -2.3 -> 0.0 -inf
+sqrt1033 sqrt inf -0.0 -> inf -0.0
+sqrt1034 sqrt inf -2.3 -> inf -0.0
+sqrt1035 sqrt nan -0.0 -> nan nan
+sqrt1036 sqrt nan -2.3 -> nan nan
+
+
+
+--------------------------
+-- acos: Inverse cosine --
+--------------------------
+
+-- zeros
+acos0000 acos 0.0 0.0 -> 1.5707963267948966 -0.0
+acos0001 acos 0.0 -0.0 -> 1.5707963267948966 0.0
+acos0002 acos -0.0 0.0 -> 1.5707963267948966 -0.0
+acos0003 acos -0.0 -0.0 -> 1.5707963267948966 0.0
+
+-- branch points: +/-1
+acos0010 acos 1.0 0.0 -> 0.0 -0.0
+acos0011 acos 1.0 -0.0 -> 0.0 0.0
+acos0012 acos -1.0 0.0 -> 3.1415926535897931 -0.0
+acos0013 acos -1.0 -0.0 -> 3.1415926535897931 0.0
+
+-- values along both sides of real axis
+acos0020 acos -9.8813129168249309e-324 0.0 -> 1.5707963267948966 -0.0
+acos0021 acos -9.8813129168249309e-324 -0.0 -> 1.5707963267948966 0.0
+acos0022 acos -1e-305 0.0 -> 1.5707963267948966 -0.0
+acos0023 acos -1e-305 -0.0 -> 1.5707963267948966 0.0
+acos0024 acos -1e-150 0.0 -> 1.5707963267948966 -0.0
+acos0025 acos -1e-150 -0.0 -> 1.5707963267948966 0.0
+acos0026 acos -9.9999999999999998e-17 0.0 -> 1.5707963267948968 -0.0
+acos0027 acos -9.9999999999999998e-17 -0.0 -> 1.5707963267948968 0.0
+acos0028 acos -0.001 0.0 -> 1.5717963269615634 -0.0
+acos0029 acos -0.001 -0.0 -> 1.5717963269615634 0.0
+acos0030 acos -0.57899999999999996 0.0 -> 2.1882979816120667 -0.0
+acos0031 acos -0.57899999999999996 -0.0 -> 2.1882979816120667 0.0
+acos0032 acos -0.99999999999999989 0.0 -> 3.1415926386886319 -0.0
+acos0033 acos -0.99999999999999989 -0.0 -> 3.1415926386886319 0.0
+acos0034 acos -1.0000000000000002 0.0 -> 3.1415926535897931 -2.1073424255447014e-08
+acos0035 acos -1.0000000000000002 -0.0 -> 3.1415926535897931 2.1073424255447014e-08
+acos0036 acos -1.0009999999999999 0.0 -> 3.1415926535897931 -0.044717633608306849
+acos0037 acos -1.0009999999999999 -0.0 -> 3.1415926535897931 0.044717633608306849
+acos0038 acos -2.0 0.0 -> 3.1415926535897931 -1.3169578969248168
+acos0039 acos -2.0 -0.0 -> 3.1415926535897931 1.3169578969248168
+acos0040 acos -23.0 0.0 -> 3.1415926535897931 -3.8281684713331012
+acos0041 acos -23.0 -0.0 -> 3.1415926535897931 3.8281684713331012
+acos0042 acos -10000000000000000.0 0.0 -> 3.1415926535897931 -37.534508668464674
+acos0043 acos -10000000000000000.0 -0.0 -> 3.1415926535897931 37.534508668464674
+acos0044 acos -9.9999999999999998e+149 0.0 -> 3.1415926535897931 -346.08091112966679
+acos0045 acos -9.9999999999999998e+149 -0.0 -> 3.1415926535897931 346.08091112966679
+acos0046 acos -1.0000000000000001e+299 0.0 -> 3.1415926535897931 -689.16608998577965
+acos0047 acos -1.0000000000000001e+299 -0.0 -> 3.1415926535897931 689.16608998577965
+acos0048 acos 9.8813129168249309e-324 0.0 -> 1.5707963267948966 -0.0
+acos0049 acos 9.8813129168249309e-324 -0.0 -> 1.5707963267948966 0.0
+acos0050 acos 1e-305 0.0 -> 1.5707963267948966 -0.0
+acos0051 acos 1e-305 -0.0 -> 1.5707963267948966 0.0
+acos0052 acos 1e-150 0.0 -> 1.5707963267948966 -0.0
+acos0053 acos 1e-150 -0.0 -> 1.5707963267948966 0.0
+acos0054 acos 9.9999999999999998e-17 0.0 -> 1.5707963267948966 -0.0
+acos0055 acos 9.9999999999999998e-17 -0.0 -> 1.5707963267948966 0.0
+acos0056 acos 0.001 0.0 -> 1.56979632662823 -0.0
+acos0057 acos 0.001 -0.0 -> 1.56979632662823 0.0
+acos0058 acos 0.57899999999999996 0.0 -> 0.95329467197772655 -0.0
+acos0059 acos 0.57899999999999996 -0.0 -> 0.95329467197772655 0.0
+acos0060 acos 0.99999999999999989 0.0 -> 1.4901161193847656e-08 -0.0
+acos0061 acos 0.99999999999999989 -0.0 -> 1.4901161193847656e-08 0.0
+acos0062 acos 1.0000000000000002 0.0 -> 0.0 -2.1073424255447014e-08
+acos0063 acos 1.0000000000000002 -0.0 -> 0.0 2.1073424255447014e-08
+acos0064 acos 1.0009999999999999 0.0 -> 0.0 -0.044717633608306849
+acos0065 acos 1.0009999999999999 -0.0 -> 0.0 0.044717633608306849
+acos0066 acos 2.0 0.0 -> 0.0 -1.3169578969248168
+acos0067 acos 2.0 -0.0 -> 0.0 1.3169578969248168
+acos0068 acos 23.0 0.0 -> 0.0 -3.8281684713331012
+acos0069 acos 23.0 -0.0 -> 0.0 3.8281684713331012
+acos0070 acos 10000000000000000.0 0.0 -> 0.0 -37.534508668464674
+acos0071 acos 10000000000000000.0 -0.0 -> 0.0 37.534508668464674
+acos0072 acos 9.9999999999999998e+149 0.0 -> 0.0 -346.08091112966679
+acos0073 acos 9.9999999999999998e+149 -0.0 -> 0.0 346.08091112966679
+acos0074 acos 1.0000000000000001e+299 0.0 -> 0.0 -689.16608998577965
+acos0075 acos 1.0000000000000001e+299 -0.0 -> 0.0 689.16608998577965
+
+-- random inputs
+acos0100 acos -3.3307113324596682 -10.732007530863266 -> 1.8706085694482339 3.113986806554613
+acos0101 acos -2863.952991743291 -2681013315.2571239 -> 1.5707973950301699 22.402607843274758
+acos0102 acos -0.33072639793220088 -0.85055464658253055 -> 1.8219426895922601 0.79250166729311966
+acos0103 acos -2.5722325842097802 -12.703940809821574 -> 1.7699942413107408 3.2565170156527325
+acos0104 acos -42.495233785459583 -0.54039320751337161 -> 3.1288732573153304 4.4424815519735601
+acos0105 acos -1.1363818625856401 9641.1325498630376 -> 1.5709141948820049 -9.8669410553254284
+acos0106 acos -2.4398426824157866e-11 0.33002051890266165 -> 1.570796326818066 -0.32430578041578667
+acos0107 acos -1.3521340428186552 2.9369737912076772 -> 1.9849059192339338 -1.8822893674117942
+acos0108 acos -1.827364706477915 1.0355459232147557 -> 2.5732246307960032 -1.4090688267854969
+acos0109 acos -0.25978373706403546 10.09712669185833 -> 1.5963940386378306 -3.0081673050196063
+acos0110 acos 0.33561778471072551 -4587350.6823999118 -> 1.5707962536333251 16.031960402579539
+acos0111 acos 0.49133444610998445 -0.8071422362990015 -> 1.1908761712801788 0.78573345813187867
+acos0112 acos 0.42196734507823974 -2.4812965431745115 -> 1.414091186100692 1.651707260988172
+acos0113 acos 2.961426210100655 -219.03295695248664 -> 1.5572768319822778 6.0824659885827304
+acos0114 acos 2.886209063652641 -20.38011207220606 -> 1.4302765252297889 3.718201853147642
+acos0115 acos 0.4180568075276509 1.4833433990823484 -> 1.3393834558303042 -1.2079847758301576
+acos0116 acos 52.376111405924718 0.013930429001941001 -> 0.00026601761804024188 -4.6515066691204714
+acos0117 acos 41637948387.625969 1.563418292894041 -> 3.7547918507883548e-11 -25.145424989809381
+acos0118 acos 0.061226659122249526 0.8447234394615154 -> 1.5240280306367315 -0.76791798971140812
+acos0119 acos 2.4480466420442959e+26 0.18002339201384662 -> 7.353756620564798e-28 -61.455650015996376
+
+-- values near infinity
+acos0200 acos 1.6206860518683021e+308 1.0308426226285283e+308 -> 0.56650826093826223 -710.54206874241561
+acos0201 acos 1.2067735875070062e+308 -1.3429173724390276e+308 -> 0.83874369390864889 710.48017794027498
+acos0202 acos -7.4130145132549047e+307 1.1759130543927645e+308 -> 2.1332729346478536 -710.21871115698752
+acos0203 acos -8.6329426442257249e+307 -1.2316282952184133e+308 -> 2.1821511032444838 710.29752145697148
+acos0204 acos 0.0 1.4289713855849746e+308 -> 1.5707963267948966 -710.24631069738996
+acos0205 acos -0.0 1.3153524545987432e+308 -> 1.5707963267948966 -710.1634604787539
+acos0206 acos 0.0 -9.6229037669269321e+307 -> 1.5707963267948966 709.85091679573691
+acos0207 acos -0.0 -4.9783616421107088e+307 -> 1.5707963267948966 709.19187157911233
+acos0208 acos 1.3937541925739389e+308 0.0 -> 0.0 -710.22135678707264
+acos0209 acos 9.1362388967371536e+307 -0.0 -> 0.0 709.79901953124613
+acos0210 acos -1.3457361220697436e+308 0.0 -> 3.1415926535897931 -710.18629698871848
+acos0211 acos -5.4699090056144284e+307 -0.0 -> 3.1415926535897931 709.28603271085649
+acos0212 acos 1.5880716932358901e+308 5.5638401252339929 -> 3.503519487773873e-308 -710.35187633140583
+acos0213 acos 1.2497211663463164e+308 -3.0456477717911024 -> 2.4370618453197486e-308 710.11227628223412
+acos0214 acos -9.9016224006029528e+307 4.9570427340789056 -> 3.1415926535897931 -709.87946935229468
+acos0215 acos -1.5854071066874139e+308 -4.4233577741497783 -> 3.1415926535897931 710.35019704672004
+acos0216 acos 9.3674623083647628 1.5209559051877979e+308 -> 1.5707963267948966 -710.30869484491086
+acos0217 acos 8.1773832021784383 -6.6093445795000056e+307 -> 1.5707963267948966 709.4752552227792
+acos0218 acos -3.1845935000665104 1.5768856396650893e+308 -> 1.5707963267948966 -710.34480761042687
+acos0219 acos -1.0577303880953903 -6.4574626815735613e+307 -> 1.5707963267948966 709.45200719662046
+
+-- values near 0
+acos0220 acos 1.8566986970714045e-320 3.1867234156760402e-321 -> 1.5707963267948966 -3.1867234156760402e-321
+acos0221 acos 7.9050503334599447e-323 -8.8931816251424378e-323 -> 1.5707963267948966 8.8931816251424378e-323
+acos0222 acos -4.4465908125712189e-323 2.4654065097222727e-311 -> 1.5707963267948966 -2.4654065097222727e-311
+acos0223 acos -6.1016916408192619e-311 -2.4703282292062327e-323 -> 1.5707963267948966 2.4703282292062327e-323
+acos0224 acos 0.0 3.4305783621842729e-311 -> 1.5707963267948966 -3.4305783621842729e-311
+acos0225 acos -0.0 1.6117409498633145e-319 -> 1.5707963267948966 -1.6117409498633145e-319
+acos0226 acos 0.0 -4.9900630229965901e-322 -> 1.5707963267948966 4.9900630229965901e-322
+acos0227 acos -0.0 -4.4889279210592818e-311 -> 1.5707963267948966 4.4889279210592818e-311
+acos0228 acos 5.3297678681477214e-312 0.0 -> 1.5707963267948966 -0.0
+acos0229 acos 6.2073425897211614e-313 -0.0 -> 1.5707963267948966 0.0
+acos0230 acos -4.9406564584124654e-324 0.0 -> 1.5707963267948966 -0.0
+acos0231 acos -1.7107517052899003e-318 -0.0 -> 1.5707963267948966 0.0
+
+-- special values
+acos1000 acos 0.0 0.0 -> 1.5707963267948966 -0.0
+acos1001 acos 0.0 -0.0 -> 1.5707963267948966 0.0
+acos1002 acos -0.0 0.0 -> 1.5707963267948966 -0.0
+acos1003 acos -0.0 -0.0 -> 1.5707963267948966 0.0
+acos1004 acos 0.0 nan -> 1.5707963267948966 nan
+acos1005 acos -0.0 nan -> 1.5707963267948966 nan
+acos1006 acos -2.3 inf -> 1.5707963267948966 -inf
+acos1007 acos -0.0 inf -> 1.5707963267948966 -inf
+acos1008 acos 0.0 inf -> 1.5707963267948966 -inf
+acos1009 acos 2.3 inf -> 1.5707963267948966 -inf
+acos1010 acos -2.3 nan -> nan nan
+acos1011 acos 2.3 nan -> nan nan
+acos1012 acos -inf 2.3 -> 3.1415926535897931 -inf
+acos1013 acos -inf 0.0 -> 3.1415926535897931 -inf
+acos1014 acos inf 2.3 -> 0.0 -inf
+acos1015 acos inf 0.0 -> 0.0 -inf
+acos1016 acos -inf inf -> 2.3561944901923448 -inf
+acos1017 acos inf inf -> 0.78539816339744828 -inf
+acos1018 acos inf nan -> nan inf                        ignore-imag-sign
+acos1019 acos -inf nan -> nan inf                       ignore-imag-sign
+acos1020 acos nan 0.0 -> nan nan
+acos1021 acos nan 2.3 -> nan nan
+acos1022 acos nan inf -> nan -inf
+acos1023 acos nan nan -> nan nan
+acos1024 acos -2.3 -inf -> 1.5707963267948966 inf
+acos1025 acos -0.0 -inf -> 1.5707963267948966 inf
+acos1026 acos 0.0 -inf -> 1.5707963267948966 inf
+acos1027 acos 2.3 -inf -> 1.5707963267948966 inf
+acos1028 acos -inf -2.3 -> 3.1415926535897931 inf
+acos1029 acos -inf -0.0 -> 3.1415926535897931 inf
+acos1030 acos inf -2.3 -> 0.0 inf
+acos1031 acos inf -0.0 -> 0.0 inf
+acos1032 acos -inf -inf -> 2.3561944901923448 inf
+acos1033 acos inf -inf -> 0.78539816339744828 inf
+acos1034 acos nan -0.0 -> nan nan
+acos1035 acos nan -2.3 -> nan nan
+acos1036 acos nan -inf -> nan inf
+
+
+--------------------------------------
+-- acosh: Inverse hyperbolic cosine --
+--------------------------------------
+
+-- zeros
+acosh0000 acosh 0.0 0.0 -> 0.0 1.5707963267948966
+acosh0001 acosh 0.0 -0.0 -> 0.0 -1.5707963267948966
+acosh0002 acosh -0.0 0.0 -> 0.0 1.5707963267948966
+acosh0003 acosh -0.0 -0.0 -> 0.0 -1.5707963267948966
+
+-- branch points: +/-1
+acosh0010 acosh 1.0 0.0 -> 0.0 0.0
+acosh0011 acosh 1.0 -0.0 -> 0.0 -0.0
+acosh0012 acosh -1.0 0.0 -> 0.0 3.1415926535897931
+acosh0013 acosh -1.0 -0.0 -> 0.0 -3.1415926535897931
+
+-- values along both sides of real axis
+acosh0020 acosh -9.8813129168249309e-324 0.0 -> 0.0 1.5707963267948966
+acosh0021 acosh -9.8813129168249309e-324 -0.0 -> 0.0 -1.5707963267948966
+acosh0022 acosh -1e-305 0.0 -> 0.0 1.5707963267948966
+acosh0023 acosh -1e-305 -0.0 -> 0.0 -1.5707963267948966
+acosh0024 acosh -1e-150 0.0 -> 0.0 1.5707963267948966
+acosh0025 acosh -1e-150 -0.0 -> 0.0 -1.5707963267948966
+acosh0026 acosh -9.9999999999999998e-17 0.0 -> 0.0 1.5707963267948968
+acosh0027 acosh -9.9999999999999998e-17 -0.0 -> 0.0 -1.5707963267948968
+acosh0028 acosh -0.001 0.0 -> 0.0 1.5717963269615634
+acosh0029 acosh -0.001 -0.0 -> 0.0 -1.5717963269615634
+acosh0030 acosh -0.57899999999999996 0.0 -> 0.0 2.1882979816120667
+acosh0031 acosh -0.57899999999999996 -0.0 -> 0.0 -2.1882979816120667
+acosh0032 acosh -0.99999999999999989 0.0 -> 0.0 3.1415926386886319
+acosh0033 acosh -0.99999999999999989 -0.0 -> 0.0 -3.1415926386886319
+acosh0034 acosh -1.0000000000000002 0.0 -> 2.1073424255447014e-08 3.1415926535897931
+acosh0035 acosh -1.0000000000000002 -0.0 -> 2.1073424255447014e-08 -3.1415926535897931
+acosh0036 acosh -1.0009999999999999 0.0 -> 0.044717633608306849 3.1415926535897931
+acosh0037 acosh -1.0009999999999999 -0.0 -> 0.044717633608306849 -3.1415926535897931
+acosh0038 acosh -2.0 0.0 -> 1.3169578969248168 3.1415926535897931
+acosh0039 acosh -2.0 -0.0 -> 1.3169578969248168 -3.1415926535897931
+acosh0040 acosh -23.0 0.0 -> 3.8281684713331012 3.1415926535897931
+acosh0041 acosh -23.0 -0.0 -> 3.8281684713331012 -3.1415926535897931
+acosh0042 acosh -10000000000000000.0 0.0 -> 37.534508668464674 3.1415926535897931
+acosh0043 acosh -10000000000000000.0 -0.0 -> 37.534508668464674 -3.1415926535897931
+acosh0044 acosh -9.9999999999999998e+149 0.0 -> 346.08091112966679 3.1415926535897931
+acosh0045 acosh -9.9999999999999998e+149 -0.0 -> 346.08091112966679 -3.1415926535897931
+acosh0046 acosh -1.0000000000000001e+299 0.0 -> 689.16608998577965 3.1415926535897931
+acosh0047 acosh -1.0000000000000001e+299 -0.0 -> 689.16608998577965 -3.1415926535897931
+acosh0048 acosh 9.8813129168249309e-324 0.0 -> 0.0 1.5707963267948966
+acosh0049 acosh 9.8813129168249309e-324 -0.0 -> 0.0 -1.5707963267948966
+acosh0050 acosh 1e-305 0.0 -> 0.0 1.5707963267948966
+acosh0051 acosh 1e-305 -0.0 -> 0.0 -1.5707963267948966
+acosh0052 acosh 1e-150 0.0 -> 0.0 1.5707963267948966
+acosh0053 acosh 1e-150 -0.0 -> 0.0 -1.5707963267948966
+acosh0054 acosh 9.9999999999999998e-17 0.0 -> 0.0 1.5707963267948966
+acosh0055 acosh 9.9999999999999998e-17 -0.0 -> 0.0 -1.5707963267948966
+acosh0056 acosh 0.001 0.0 -> 0.0 1.56979632662823
+acosh0057 acosh 0.001 -0.0 -> 0.0 -1.56979632662823
+acosh0058 acosh 0.57899999999999996 0.0 -> 0.0 0.95329467197772655
+acosh0059 acosh 0.57899999999999996 -0.0 -> 0.0 -0.95329467197772655
+acosh0060 acosh 0.99999999999999989 0.0 -> 0.0 1.4901161193847656e-08
+acosh0061 acosh 0.99999999999999989 -0.0 -> 0.0 -1.4901161193847656e-08
+acosh0062 acosh 1.0000000000000002 0.0 -> 2.1073424255447014e-08 0.0
+acosh0063 acosh 1.0000000000000002 -0.0 -> 2.1073424255447014e-08 -0.0
+acosh0064 acosh 1.0009999999999999 0.0 -> 0.044717633608306849 0.0
+acosh0065 acosh 1.0009999999999999 -0.0 -> 0.044717633608306849 -0.0
+acosh0066 acosh 2.0 0.0 -> 1.3169578969248168 0.0
+acosh0067 acosh 2.0 -0.0 -> 1.3169578969248168 -0.0
+acosh0068 acosh 23.0 0.0 -> 3.8281684713331012 0.0
+acosh0069 acosh 23.0 -0.0 -> 3.8281684713331012 -0.0
+acosh0070 acosh 10000000000000000.0 0.0 -> 37.534508668464674 0.0
+acosh0071 acosh 10000000000000000.0 -0.0 -> 37.534508668464674 -0.0
+acosh0072 acosh 9.9999999999999998e+149 0.0 -> 346.08091112966679 0.0
+acosh0073 acosh 9.9999999999999998e+149 -0.0 -> 346.08091112966679 -0.0
+acosh0074 acosh 1.0000000000000001e+299 0.0 -> 689.16608998577965 0.0
+acosh0075 acosh 1.0000000000000001e+299 -0.0 -> 689.16608998577965 -0.0
+
+-- random inputs
+acosh0100 acosh -1.4328589581250843 -1.8370347775558309 -> 1.5526962646549587 -2.190250168435786
+acosh0101 acosh -0.31075819156220957 -1.0772555786839297 -> 0.95139168286193709 -1.7812228089636479
+acosh0102 acosh -1.9044776578070453 -20.485370158932124 -> 3.7177411088932359 -1.6633888745861227
+acosh0103 acosh -0.075642506000858742 -21965976320.873051 -> 24.505907742881991 -1.5707963267983402
+acosh0104 acosh -1.6162271181056307 -3.0369343458696099 -> 1.9407057262861227 -2.0429549461750209
+acosh0105 acosh -0.3103780280298063 0.00018054880018078987 -> 0.00018992877058761416 1.886386995096728
+acosh0106 acosh -9159468751.5897655 5.8014747664273649 -> 23.631201197959193 3.1415926529564078
+acosh0107 acosh -0.037739157550933884 0.21841357493510705 -> 0.21685844960602488 1.6076735133449402
+acosh0108 acosh -8225991.0508394297 0.28318543008913644 -> 16.615956520420287 3.1415926191641019
+acosh0109 acosh -35.620070502302639 0.31303237005015 -> 4.2658980006943965 3.1328013255541873
+acosh0110 acosh 96.729939906820917 -0.029345228372365334 -> 5.2650434775863548 -0.00030338895866972843
+acosh0111 acosh 0.59656024007966491 -2.0412294654163978 -> 1.4923002024287835 -1.312568421900338
+acosh0112 acosh 109.29384112677828 -0.00015454863061533812 -> 5.3871662961545477 -1.4141245154061214e-06
+acosh0113 acosh 8.6705651969361597 -3.6723631649787465 -> 2.9336180958363545 -0.40267362031872861
+acosh0114 acosh 1.8101646445052686 -0.012345132721855478 -> 1.1997148566285769 -0.0081813912760150265
+acosh0115 acosh 52.56897195025288 0.001113916065985443 -> 4.6551827622264135 2.1193445872040307e-05
+acosh0116 acosh 0.28336786164214739 355643992457.40485 -> 27.290343226816528 1.5707963267940999
+acosh0117 acosh 0.73876621291911437 2.8828594541104322e-20 -> 4.2774820978159067e-20 0.73955845836827927
+acosh0118 acosh 0.025865471781718878 37125746064318.492 -> 31.938478989418012 1.5707963267948959
+acosh0119 acosh 2.2047353511780132 0.074712248143489271 -> 1.4286403248698021 0.037997904971626598
+
+-- values near infinity
+acosh0200 acosh 8.1548592876467785e+307 9.0943779335951128e+307 -> 710.08944620800605 0.83981165425478954
+acosh0201 acosh 1.4237229680972531e+308 -1.0336966617874858e+308 -> 710.4543331094759 -0.6279972876348755
+acosh0202 acosh -1.5014526899738939e+308 1.5670700378448792e+308 -> 710.66420706795464 2.3348137299106697
+acosh0203 acosh -1.0939040375213928e+308 -1.0416960351127978e+308 -> 710.30182863115886 -2.380636147787027
+acosh0204 acosh 0.0 1.476062433559588e+308 -> 710.27873384716929 1.5707963267948966
+acosh0205 acosh -0.0 6.2077210326221094e+307 -> 709.41256457484769 1.5707963267948966
+acosh0206 acosh 0.0 -1.5621899909968308e+308 -> 710.33544449990734 -1.5707963267948966
+acosh0207 acosh -0.0 -8.3556624833839122e+307 -> 709.70971018048317 -1.5707963267948966
+acosh0208 acosh 1.3067079752499342e+308 0.0 -> 710.15686680107228 0.0
+acosh0209 acosh 1.5653640340214026e+308 -0.0 -> 710.33747422926706 -0.0
+acosh0210 acosh -6.9011375992290636e+307 0.0 -> 709.51845699719922 3.1415926535897931
+acosh0211 acosh -9.9539576809926973e+307 -0.0 -> 709.88474095870185 -3.1415926535897931
+acosh0212 acosh 7.6449598518914925e+307 9.5706540768268358 -> 709.62081731754802 1.2518906916769345e-307
+acosh0213 acosh 5.4325410972602197e+307 -7.8064807816522706 -> 709.279177727925 -1.4369851312471974e-307
+acosh0214 acosh -1.1523626112360465e+308 7.0617510038869336 -> 710.03117010216909 3.1415926535897931
+acosh0215 acosh -1.1685027786862599e+308 -5.1568558357925625 -> 710.04507907571417 -3.1415926535897931
+acosh0216 acosh 3.0236370339788721 1.7503248720096417e+308 -> 710.44915723458064 1.5707963267948966
+acosh0217 acosh 6.6108007926031149 -9.1469968225806149e+307 -> 709.80019633903328 -1.5707963267948966
+acosh0218 acosh -5.1096262905623959 6.4484926785412395e+307 -> 709.45061713997973 1.5707963267948966
+acosh0219 acosh -2.8080920608735846 -1.7716118836519368e+308 -> 710.46124562363445 -1.5707963267948966
+
+-- values near 0
+acosh0220 acosh 4.5560530326699304e-317 7.3048989121436657e-318 -> 7.3048989121436657e-318 1.5707963267948966
+acosh0221 acosh 4.8754274133585331e-314 -9.8469794897684199e-315 -> 9.8469794897684199e-315 -1.5707963267948966
+acosh0222 acosh -4.6748876009960097e-312 9.7900342887557606e-318 -> 9.7900342887557606e-318 1.5707963267948966
+acosh0223 acosh -4.3136871538399236e-320 -4.9406564584124654e-323 -> 4.9406564584124654e-323 -1.5707963267948966
+acosh0224 acosh 0.0 4.3431013866496774e-314 -> 4.3431013866496774e-314 1.5707963267948966
+acosh0225 acosh -0.0 6.0147334335829184e-317 -> 6.0147334335829184e-317 1.5707963267948966
+acosh0226 acosh 0.0 -1.2880291387081297e-320 -> 1.2880291387081297e-320 -1.5707963267948966
+acosh0227 acosh -0.0 -1.4401563976534621e-317 -> 1.4401563976534621e-317 -1.5707963267948966
+acosh0228 acosh 1.3689680570863091e-313 0.0 -> 0.0 1.5707963267948966
+acosh0229 acosh 1.5304346893494371e-312 -0.0 -> 0.0 -1.5707963267948966
+acosh0230 acosh -3.7450175954766488e-320 0.0 -> 0.0 1.5707963267948966
+acosh0231 acosh -8.4250563080885801e-311 -0.0 -> 0.0 -1.5707963267948966
+
+-- special values
+acosh1000 acosh 0.0 0.0 -> 0.0 1.5707963267948966
+acosh1001 acosh -0.0 0.0 -> 0.0 1.5707963267948966
+acosh1002 acosh 0.0 inf -> inf 1.5707963267948966
+acosh1003 acosh 2.3 inf -> inf 1.5707963267948966
+acosh1004 acosh -0.0 inf -> inf 1.5707963267948966
+acosh1005 acosh -2.3 inf -> inf 1.5707963267948966
+acosh1006 acosh 0.0 nan -> nan nan
+acosh1007 acosh 2.3 nan -> nan nan
+acosh1008 acosh -0.0 nan -> nan nan
+acosh1009 acosh -2.3 nan -> nan nan
+acosh1010 acosh -inf 0.0 -> inf 3.1415926535897931
+acosh1011 acosh -inf 2.3 -> inf 3.1415926535897931
+acosh1012 acosh inf 0.0 -> inf 0.0
+acosh1013 acosh inf 2.3 -> inf 0.0
+acosh1014 acosh -inf inf -> inf 2.3561944901923448
+acosh1015 acosh inf inf -> inf 0.78539816339744828
+acosh1016 acosh inf nan -> inf nan
+acosh1017 acosh -inf nan -> inf nan
+acosh1018 acosh nan 0.0 -> nan nan
+acosh1019 acosh nan 2.3 -> nan nan
+acosh1020 acosh nan inf -> inf nan
+acosh1021 acosh nan nan -> nan nan
+acosh1022 acosh 0.0 -0.0 -> 0.0 -1.5707963267948966
+acosh1023 acosh -0.0 -0.0 -> 0.0 -1.5707963267948966
+acosh1024 acosh 0.0 -inf -> inf -1.5707963267948966
+acosh1025 acosh 2.3 -inf -> inf -1.5707963267948966
+acosh1026 acosh -0.0 -inf -> inf -1.5707963267948966
+acosh1027 acosh -2.3 -inf -> inf -1.5707963267948966
+acosh1028 acosh -inf -0.0 -> inf -3.1415926535897931
+acosh1029 acosh -inf -2.3 -> inf -3.1415926535897931
+acosh1030 acosh inf -0.0 -> inf -0.0
+acosh1031 acosh inf -2.3 -> inf -0.0
+acosh1032 acosh -inf -inf -> inf -2.3561944901923448
+acosh1033 acosh inf -inf -> inf -0.78539816339744828
+acosh1034 acosh nan -0.0 -> nan nan
+acosh1035 acosh nan -2.3 -> nan nan
+acosh1036 acosh nan -inf -> inf nan
+
+
+------------------------
+-- asin: Inverse sine --
+------------------------
+
+-- zeros
+asin0000 asin 0.0 0.0 -> 0.0 0.0
+asin0001 asin 0.0 -0.0 -> 0.0 -0.0
+asin0002 asin -0.0 0.0 -> -0.0 0.0
+asin0003 asin -0.0 -0.0 -> -0.0 -0.0
+
+-- branch points: +/-1
+asin0010 asin 1.0 0.0 -> 1.5707963267948966 0.0
+asin0011 asin 1.0 -0.0 -> 1.5707963267948966 -0.0
+asin0012 asin -1.0 0.0 -> -1.5707963267948966 0.0
+asin0013 asin -1.0 -0.0 -> -1.5707963267948966 -0.0
+
+-- values along both sides of real axis
+asin0020 asin -9.8813129168249309e-324 0.0 -> -9.8813129168249309e-324 0.0
+asin0021 asin -9.8813129168249309e-324 -0.0 -> -9.8813129168249309e-324 -0.0
+asin0022 asin -1e-305 0.0 -> -1e-305 0.0
+asin0023 asin -1e-305 -0.0 -> -1e-305 -0.0
+asin0024 asin -1e-150 0.0 -> -1e-150 0.0
+asin0025 asin -1e-150 -0.0 -> -1e-150 -0.0
+asin0026 asin -9.9999999999999998e-17 0.0 -> -9.9999999999999998e-17 0.0
+asin0027 asin -9.9999999999999998e-17 -0.0 -> -9.9999999999999998e-17 -0.0
+asin0028 asin -0.001 0.0 -> -0.0010000001666667416 0.0
+asin0029 asin -0.001 -0.0 -> -0.0010000001666667416 -0.0
+asin0030 asin -0.57899999999999996 0.0 -> -0.61750165481717001 0.0
+asin0031 asin -0.57899999999999996 -0.0 -> -0.61750165481717001 -0.0
+asin0032 asin -0.99999999999999989 0.0 -> -1.5707963118937354 0.0
+asin0033 asin -0.99999999999999989 -0.0 -> -1.5707963118937354 -0.0
+asin0034 asin -1.0000000000000002 0.0 -> -1.5707963267948966 2.1073424255447014e-08
+asin0035 asin -1.0000000000000002 -0.0 -> -1.5707963267948966 -2.1073424255447014e-08
+asin0036 asin -1.0009999999999999 0.0 -> -1.5707963267948966 0.044717633608306849
+asin0037 asin -1.0009999999999999 -0.0 -> -1.5707963267948966 -0.044717633608306849
+asin0038 asin -2.0 0.0 -> -1.5707963267948966 1.3169578969248168
+asin0039 asin -2.0 -0.0 -> -1.5707963267948966 -1.3169578969248168
+asin0040 asin -23.0 0.0 -> -1.5707963267948966 3.8281684713331012
+asin0041 asin -23.0 -0.0 -> -1.5707963267948966 -3.8281684713331012
+asin0042 asin -10000000000000000.0 0.0 -> -1.5707963267948966 37.534508668464674
+asin0043 asin -10000000000000000.0 -0.0 -> -1.5707963267948966 -37.534508668464674
+asin0044 asin -9.9999999999999998e+149 0.0 -> -1.5707963267948966 346.08091112966679
+asin0045 asin -9.9999999999999998e+149 -0.0 -> -1.5707963267948966 -346.08091112966679
+asin0046 asin -1.0000000000000001e+299 0.0 -> -1.5707963267948966 689.16608998577965
+asin0047 asin -1.0000000000000001e+299 -0.0 -> -1.5707963267948966 -689.16608998577965
+asin0048 asin 9.8813129168249309e-324 0.0 -> 9.8813129168249309e-324 0.0
+asin0049 asin 9.8813129168249309e-324 -0.0 -> 9.8813129168249309e-324 -0.0
+asin0050 asin 1e-305 0.0 -> 1e-305 0.0
+asin0051 asin 1e-305 -0.0 -> 1e-305 -0.0
+asin0052 asin 1e-150 0.0 -> 1e-150 0.0
+asin0053 asin 1e-150 -0.0 -> 1e-150 -0.0
+asin0054 asin 9.9999999999999998e-17 0.0 -> 9.9999999999999998e-17 0.0
+asin0055 asin 9.9999999999999998e-17 -0.0 -> 9.9999999999999998e-17 -0.0
+asin0056 asin 0.001 0.0 -> 0.0010000001666667416 0.0
+asin0057 asin 0.001 -0.0 -> 0.0010000001666667416 -0.0
+asin0058 asin 0.57899999999999996 0.0 -> 0.61750165481717001 0.0
+asin0059 asin 0.57899999999999996 -0.0 -> 0.61750165481717001 -0.0
+asin0060 asin 0.99999999999999989 0.0 -> 1.5707963118937354 0.0
+asin0061 asin 0.99999999999999989 -0.0 -> 1.5707963118937354 -0.0
+asin0062 asin 1.0000000000000002 0.0 -> 1.5707963267948966 2.1073424255447014e-08
+asin0063 asin 1.0000000000000002 -0.0 -> 1.5707963267948966 -2.1073424255447014e-08
+asin0064 asin 1.0009999999999999 0.0 -> 1.5707963267948966 0.044717633608306849
+asin0065 asin 1.0009999999999999 -0.0 -> 1.5707963267948966 -0.044717633608306849
+asin0066 asin 2.0 0.0 -> 1.5707963267948966 1.3169578969248168
+asin0067 asin 2.0 -0.0 -> 1.5707963267948966 -1.3169578969248168
+asin0068 asin 23.0 0.0 -> 1.5707963267948966 3.8281684713331012
+asin0069 asin 23.0 -0.0 -> 1.5707963267948966 -3.8281684713331012
+asin0070 asin 10000000000000000.0 0.0 -> 1.5707963267948966 37.534508668464674
+asin0071 asin 10000000000000000.0 -0.0 -> 1.5707963267948966 -37.534508668464674
+asin0072 asin 9.9999999999999998e+149 0.0 -> 1.5707963267948966 346.08091112966679
+asin0073 asin 9.9999999999999998e+149 -0.0 -> 1.5707963267948966 -346.08091112966679
+asin0074 asin 1.0000000000000001e+299 0.0 -> 1.5707963267948966 689.16608998577965
+asin0075 asin 1.0000000000000001e+299 -0.0 -> 1.5707963267948966 -689.16608998577965
+
+-- random inputs
+asin0100 asin -1.5979555835086083 -0.15003009814595247 -> -1.4515369557405788 -1.0544476399790823
+asin0101 asin -0.57488225895317679 -9.6080397838952743e-13 -> -0.61246024460412851 -1.174238005400403e-12
+asin0102 asin -3.6508087930516249 -0.36027527093220152 -> -1.4685890605305874 -1.9742273007152038
+asin0103 asin -1.5238659792326819 -1.1360813516996364 -> -0.86080051691147275 -1.3223742205689195
+asin0104 asin -1592.0639045555306 -0.72362427935018236 -> -1.5703418071175179 -8.0659336918729228
+asin0105 asin -0.19835471371312019 4.2131508416697709 -> -0.045777831019935149 2.1461732751933171
+asin0106 asin -1.918471054430213 0.40603305079779234 -> -1.3301396585791556 1.30263642314981
+asin0107 asin -254495.01623373642 0.71084414434470822 -> -1.5707935336394359 13.140183712762321
+asin0108 asin -0.31315882715691157 3.9647994288429866 -> -0.076450403840916004 2.0889762138713457
+asin0109 asin -0.90017064284720816 1.2530659485907105 -> -0.53466509741943447 1.1702811557577
+asin0110 asin 2.1615181696571075 -0.14058647488229523 -> 1.4976166323896871 -1.4085811039334604
+asin0111 asin 1.2104749210707795 -0.85732484485298999 -> 0.83913071588343924 -1.0681719250525901
+asin0112 asin 1.7059733185128891 -0.84032966373156581 -> 1.0510900815816229 -1.2967979791361652
+asin0113 asin 9.9137085017290687 -1.4608383970250893 -> 1.4237704820128891 -2.995414677560686
+asin0114 asin 117.12344751041495 -5453908091.5334015 -> 2.1475141411392012e-08 -23.112745450217066
+asin0115 asin 0.081041187798029227 0.067054349860173196 -> 0.080946786856771813 0.067223991060639698
+asin0116 asin 46.635472322049949 2.3835190718056678 -> 1.5197194940010779 4.5366989600972083
+asin0117 asin 3907.0687961127105 19.144021886390181 -> 1.5658965233083235 8.9637018715924217
+asin0118 asin 1.0889312322308273 509.01577883554768 -> 0.0021392803817829316 6.9256294494524706
+asin0119 asin 0.10851518277509224 1.5612510908217476 -> 0.058491014243902621 1.2297075725621327
+
+-- values near infinity
+asin0200 asin 1.5230241998821499e+308 5.5707228994084525e+307 -> 1.2201446370892068 710.37283486535966
+asin0201 asin 8.1334317698672204e+307 -9.2249425197872451e+307 -> 0.72259991284020042 -710.0962453049026
+asin0202 asin -9.9138506659241768e+307 6.701544526434995e+307 -> -0.97637511742194594 710.06887486671371
+asin0203 asin -1.4141298868173842e+308 -5.401505134514191e+307 -> -1.2059319055160587 -710.30396478954628
+asin0204 asin 0.0 9.1618092977897431e+307 -> 0.0 709.80181441050593
+asin0205 asin -0.0 6.8064342551939755e+307 -> -0.0 709.50463910853489
+asin0206 asin 0.0 -6.4997516454798215e+307 -> 0.0 -709.45853469751592
+asin0207 asin -0.0 -1.6767449053345242e+308 -> -0.0 -710.4062101803022
+asin0208 asin 5.4242749957378916e+307 0.0 -> 1.5707963267948966 709.27765497888902
+asin0209 asin 9.5342145121164749e+307 -0.0 -> 1.5707963267948966 -709.84165758595907
+asin0210 asin -7.0445698006201847e+307 0.0 -> -1.5707963267948966 709.53902780872136
+asin0211 asin -1.0016025569769706e+308 -0.0 -> -1.5707963267948966 -709.89095709697881
+asin0212 asin 1.6552203778877204e+308 0.48761543336249491 -> 1.5707963267948966 710.39328998153474
+asin0213 asin 1.2485712830384869e+308 -4.3489311161278899 -> 1.5707963267948966 -710.1113557467786
+asin0214 asin -1.5117842813353125e+308 5.123452666102434 -> -1.5707963267948966 710.30264641923031
+asin0215 asin -1.3167634313008016e+308 -0.52939679793528982 -> -1.5707963267948966 -710.16453260239768
+asin0216 asin 0.80843929176985907 1.0150851827767876e+308 -> 7.9642507396113875e-309 709.90432835561637
+asin0217 asin 8.2544809829680901 -1.7423548140539474e+308 -> 4.7375430746865733e-308 -710.44459336242164
+asin0218 asin -5.2499000118824295 4.6655578977512214e+307 -> -1.1252459249113292e-307 709.1269781491103
+asin0219 asin -5.9904782760833433 -4.7315689314781163e+307 -> -1.2660659419394637e-307 -709.14102757522312
+
+-- special values
+asin1000 asin -0.0 0.0 -> -0.0 0.0
+asin1001 asin 0.0 0.0 -> 0.0 0.0
+asin1002 asin -0.0 -0.0 -> -0.0 -0.0
+asin1003 asin 0.0 -0.0 -> 0.0 -0.0
+asin1004 asin -inf 0.0 -> -1.5707963267948966 inf
+asin1005 asin -inf 2.2999999999999998 -> -1.5707963267948966 inf
+asin1006 asin nan 0.0 -> nan nan
+asin1007 asin nan 2.2999999999999998 -> nan nan
+asin1008 asin -0.0 inf -> -0.0 inf
+asin1009 asin -2.2999999999999998 inf -> -0.0 inf
+asin1010 asin -inf inf -> -0.78539816339744828 inf
+asin1011 asin nan inf -> nan inf
+asin1012 asin -0.0 nan -> -0.0 nan
+asin1013 asin -2.2999999999999998 nan -> nan nan
+asin1014 asin -inf nan -> nan inf ignore-imag-sign
+asin1015 asin nan nan -> nan nan
+asin1016 asin inf 0.0 -> 1.5707963267948966 inf
+asin1017 asin inf 2.2999999999999998 -> 1.5707963267948966 inf
+asin1018 asin 0.0 inf -> 0.0 inf
+asin1019 asin 2.2999999999999998 inf -> 0.0 inf
+asin1020 asin inf inf -> 0.78539816339744828 inf
+asin1021 asin 0.0 nan -> 0.0 nan
+asin1022 asin 2.2999999999999998 nan -> nan nan
+asin1023 asin inf nan -> nan inf ignore-imag-sign
+asin1024 asin inf -0.0 -> 1.5707963267948966 -inf
+asin1025 asin inf -2.2999999999999998 -> 1.5707963267948966 -inf
+asin1026 asin nan -0.0 -> nan nan
+asin1027 asin nan -2.2999999999999998 -> nan nan
+asin1028 asin 0.0 -inf -> 0.0 -inf
+asin1029 asin 2.2999999999999998 -inf -> 0.0 -inf
+asin1030 asin inf -inf -> 0.78539816339744828 -inf
+asin1031 asin nan -inf -> nan -inf
+asin1032 asin -inf -0.0 -> -1.5707963267948966 -inf
+asin1033 asin -inf -2.2999999999999998 -> -1.5707963267948966 -inf
+asin1034 asin -0.0 -inf -> -0.0 -inf
+asin1035 asin -2.2999999999999998 -inf -> -0.0 -inf
+asin1036 asin -inf -inf -> -0.78539816339744828 -inf
+
+
+------------------------------------
+-- asinh: Inverse hyperbolic sine --
+------------------------------------
+
+-- zeros
+asinh0000 asinh 0.0 0.0 -> 0.0 0.0
+asinh0001 asinh 0.0 -0.0 -> 0.0 -0.0
+asinh0002 asinh -0.0 0.0 -> -0.0 0.0
+asinh0003 asinh -0.0 -0.0 -> -0.0 -0.0
+
+-- branch points: +/-i
+asinh0010 asinh 0.0 1.0 -> 0.0 1.5707963267948966
+asinh0011 asinh 0.0 -1.0 -> 0.0 -1.5707963267948966
+asinh0012 asinh -0.0 1.0 -> -0.0 1.5707963267948966
+asinh0013 asinh -0.0 -1.0 -> -0.0 -1.5707963267948966
+
+-- values along both sides of imaginary axis
+asinh0020 asinh 0.0 -9.8813129168249309e-324 -> 0.0 -9.8813129168249309e-324
+asinh0021 asinh -0.0 -9.8813129168249309e-324 -> -0.0 -9.8813129168249309e-324
+asinh0022 asinh 0.0 -1e-305 -> 0.0 -1e-305
+asinh0023 asinh -0.0 -1e-305 -> -0.0 -1e-305
+asinh0024 asinh 0.0 -1e-150 -> 0.0 -1e-150
+asinh0025 asinh -0.0 -1e-150 -> -0.0 -1e-150
+asinh0026 asinh 0.0 -9.9999999999999998e-17 -> 0.0 -9.9999999999999998e-17
+asinh0027 asinh -0.0 -9.9999999999999998e-17 -> -0.0 -9.9999999999999998e-17
+asinh0028 asinh 0.0 -0.001 -> 0.0 -0.0010000001666667416
+asinh0029 asinh -0.0 -0.001 -> -0.0 -0.0010000001666667416
+asinh0030 asinh 0.0 -0.57899999999999996 -> 0.0 -0.61750165481717001
+asinh0031 asinh -0.0 -0.57899999999999996 -> -0.0 -0.61750165481717001
+asinh0032 asinh 0.0 -0.99999999999999989 -> 0.0 -1.5707963118937354
+asinh0033 asinh -0.0 -0.99999999999999989 -> -0.0 -1.5707963118937354
+asinh0034 asinh 0.0 -1.0000000000000002 -> 2.1073424255447014e-08 -1.5707963267948966
+asinh0035 asinh -0.0 -1.0000000000000002 -> -2.1073424255447014e-08 -1.5707963267948966
+asinh0036 asinh 0.0 -1.0009999999999999 -> 0.044717633608306849 -1.5707963267948966
+asinh0037 asinh -0.0 -1.0009999999999999 -> -0.044717633608306849 -1.5707963267948966
+asinh0038 asinh 0.0 -2.0 -> 1.3169578969248168 -1.5707963267948966
+asinh0039 asinh -0.0 -2.0 -> -1.3169578969248168 -1.5707963267948966
+asinh0040 asinh 0.0 -20.0 -> 3.6882538673612966 -1.5707963267948966
+asinh0041 asinh -0.0 -20.0 -> -3.6882538673612966 -1.5707963267948966
+asinh0042 asinh 0.0 -10000000000000000.0 -> 37.534508668464674 -1.5707963267948966
+asinh0043 asinh -0.0 -10000000000000000.0 -> -37.534508668464674 -1.5707963267948966
+asinh0044 asinh 0.0 -9.9999999999999998e+149 -> 346.08091112966679 -1.5707963267948966
+asinh0045 asinh -0.0 -9.9999999999999998e+149 -> -346.08091112966679 -1.5707963267948966
+asinh0046 asinh 0.0 -1.0000000000000001e+299 -> 689.16608998577965 -1.5707963267948966
+asinh0047 asinh -0.0 -1.0000000000000001e+299 -> -689.16608998577965 -1.5707963267948966
+asinh0048 asinh 0.0 9.8813129168249309e-324 -> 0.0 9.8813129168249309e-324
+asinh0049 asinh -0.0 9.8813129168249309e-324 -> -0.0 9.8813129168249309e-324
+asinh0050 asinh 0.0 1e-305 -> 0.0 1e-305
+asinh0051 asinh -0.0 1e-305 -> -0.0 1e-305
+asinh0052 asinh 0.0 1e-150 -> 0.0 1e-150
+asinh0053 asinh -0.0 1e-150 -> -0.0 1e-150
+asinh0054 asinh 0.0 9.9999999999999998e-17 -> 0.0 9.9999999999999998e-17
+asinh0055 asinh -0.0 9.9999999999999998e-17 -> -0.0 9.9999999999999998e-17
+asinh0056 asinh 0.0 0.001 -> 0.0 0.0010000001666667416
+asinh0057 asinh -0.0 0.001 -> -0.0 0.0010000001666667416
+asinh0058 asinh 0.0 0.57899999999999996 -> 0.0 0.61750165481717001
+asinh0059 asinh -0.0 0.57899999999999996 -> -0.0 0.61750165481717001
+asinh0060 asinh 0.0 0.99999999999999989 -> 0.0 1.5707963118937354
+asinh0061 asinh -0.0 0.99999999999999989 -> -0.0 1.5707963118937354
+asinh0062 asinh 0.0 1.0000000000000002 -> 2.1073424255447014e-08 1.5707963267948966
+asinh0063 asinh -0.0 1.0000000000000002 -> -2.1073424255447014e-08 1.5707963267948966
+asinh0064 asinh 0.0 1.0009999999999999 -> 0.044717633608306849 1.5707963267948966
+asinh0065 asinh -0.0 1.0009999999999999 -> -0.044717633608306849 1.5707963267948966
+asinh0066 asinh 0.0 2.0 -> 1.3169578969248168 1.5707963267948966
+asinh0067 asinh -0.0 2.0 -> -1.3169578969248168 1.5707963267948966
+asinh0068 asinh 0.0 20.0 -> 3.6882538673612966 1.5707963267948966
+asinh0069 asinh -0.0 20.0 -> -3.6882538673612966 1.5707963267948966
+asinh0070 asinh 0.0 10000000000000000.0 -> 37.534508668464674 1.5707963267948966
+asinh0071 asinh -0.0 10000000000000000.0 -> -37.534508668464674 1.5707963267948966
+asinh0072 asinh 0.0 9.9999999999999998e+149 -> 346.08091112966679 1.5707963267948966
+asinh0073 asinh -0.0 9.9999999999999998e+149 -> -346.08091112966679 1.5707963267948966
+asinh0074 asinh 0.0 1.0000000000000001e+299 -> 689.16608998577965 1.5707963267948966
+asinh0075 asinh -0.0 1.0000000000000001e+299 -> -689.16608998577965 1.5707963267948966
+
+-- random inputs
+asinh0100 asinh -0.5946402853710423 -0.044506548910000145 -> -0.56459775392653022 -0.038256221441536356
+asinh0101 asinh -0.19353958046180916 -0.017489624793193454 -> -0.19237926804196651 -0.017171741895336792
+asinh0102 asinh -0.033117585138955893 -8.5256414015933757 -> -2.8327758348650969 -1.5668848791092411
+asinh0103 asinh -1.5184043184035716 -0.73491245339073275 -> -1.2715891419764005 -0.39204624408542355
+asinh0104 asinh -0.60716120271208818 -0.28900743958436542 -> -0.59119299421187232 -0.24745931678118135
+asinh0105 asinh -0.0237177865112429 2.8832601052166313 -> -1.7205820772413236 1.5620261702963094
+asinh0106 asinh -2.3906812342743979 2.6349216848574013 -> -1.9609636249445124 0.8142142660574706
+asinh0107 asinh -0.0027605019787620517 183.85588476550555 -> -5.9072920005445066 1.5707813120847871
+asinh0108 asinh -0.99083661164404713 0.028006797051617648 -> -0.8750185251283995 0.019894099615994653
+asinh0109 asinh -3.0362951937986393 0.86377266758504867 -> -1.8636030714685221 0.26475058859950168
+asinh0110 asinh 0.34438464536152769 -0.71603790174885029 -> 0.43985415690734164 -0.71015037409294324
+asinh0111 asinh 4.4925124413876256 -60604595352.871613 -> 25.520783738612078 -1.5707963267207683
+asinh0112 asinh 2.3213991428170337 -7.5459667007307258 -> 2.7560464993451643 -1.270073210856117
+asinh0113 asinh 0.21291939741682028 -1.2720428814784408 -> 0.77275088137338266 -1.3182099250896895
+asinh0114 asinh 6.6447359379455957 -0.97196191666946996 -> 2.602830695139672 -0.14368247412319965
+asinh0115 asinh 7.1326256655083746 2.1516360452706857 -> 2.7051146374367212 0.29051701669727581
+asinh0116 asinh 0.18846550905063442 3.4705348585339832 -> 1.917697875799296 1.514155593347924
+asinh0117 asinh 0.19065075303281598 0.26216814548222012 -> 0.19603050785932474 0.26013422809614117
+asinh0118 asinh 2.0242004665739719 0.70510281647495787 -> 1.4970366212896002 0.30526007200481453
+asinh0119 asinh 37.336596461576057 717.29157391678234 -> 7.269981997945294 1.5187910219576033
+
+-- values near infinity
+asinh0200 asinh 1.0760517500874541e+308 1.1497786241240167e+308 -> 710.34346055651815 0.81850936961793475
+asinh0201 asinh 1.1784839328845529e+308 -1.6478429586716638e+308 -> 710.59536255783678 -0.94996311735607697
+asinh0202 asinh -4.8777682248909193e+307 1.4103736217538474e+308 -> -710.28970147376992 1.2378239519096443
+asinh0203 asinh -1.2832478903233108e+308 -1.5732392613155698e+308 -> -710.59750164290745 -0.88657181439322452
+asinh0204 asinh 0.0 6.8431383856345372e+307 -> 709.51001718444604 1.5707963267948966
+asinh0205 asinh -0.0 8.601822432238051e+307 -> -709.73874482126689 1.5707963267948966
+asinh0206 asinh 0.0 -5.5698396067303782e+307 -> 709.30413698733742 -1.5707963267948966
+asinh0207 asinh -0.0 -7.1507777734621804e+307 -> -709.55399186002705 -1.5707963267948966
+asinh0208 asinh 1.6025136110019349e+308 0.0 -> 710.3609292261076 0.0
+asinh0209 asinh 1.3927819858239114e+308 -0.0 -> 710.22065899832899 -0.0
+asinh0210 asinh -6.0442994056210995e+307 0.0 -> -709.38588631057621 0.0
+asinh0211 asinh -1.2775271979042634e+308 -0.0 -> -710.13428215553972 -0.0
+asinh0212 asinh 1.0687496260268489e+308 1.0255615699476961 -> 709.95584521407841 9.5959010882679093e-309
+asinh0213 asinh 1.0050967333370962e+308 -0.87668970117333433 -> 709.89443961168183 -8.7224410556242882e-309
+asinh0214 asinh -5.7161452814862392e+307 8.2377808413450122 -> -709.33006540611166 1.4411426644501116e-307
+asinh0215 asinh -8.2009040727653315e+307 -6.407409526654976 -> -709.69101513070109 -7.8130526461510088e-308
+asinh0216 asinh 6.4239368496483982 1.6365990821551427e+308 -> 710.38197618101287 1.5707963267948966
+asinh0217 asinh 5.4729111423315882 -1.1227237438144211e+308 -> 710.00511346983546 -1.5707963267948966
+asinh0218 asinh -8.3455818297412723 1.443172020182019e+308 -> -710.25619930551818 1.5707963267948966
+asinh0219 asinh -2.6049726230372441 -1.7952291144022702e+308 -> -710.47448847685644 -1.5707963267948966
+
+-- values near 0
+asinh0220 asinh 1.2940113339664088e-314 6.9169190417774516e-323 -> 1.2940113339664088e-314 6.9169190417774516e-323
+asinh0221 asinh 2.3848478863874649e-315 -3.1907655025717717e-310 -> 2.3848478863874649e-315 -3.1907655025717717e-310
+asinh0222 asinh -3.0097643679641622e-316 4.6936236354918422e-322 -> -3.0097643679641622e-316 4.6936236354918422e-322
+asinh0223 asinh -1.787997087755751e-308 -8.5619622834902341e-310 -> -1.787997087755751e-308 -8.5619622834902341e-310
+asinh0224 asinh 0.0 1.2491433448427325e-314 -> 0.0 1.2491433448427325e-314
+asinh0225 asinh -0.0 2.5024072154538062e-308 -> -0.0 2.5024072154538062e-308
+asinh0226 asinh 0.0 -2.9643938750474793e-323 -> 0.0 -2.9643938750474793e-323
+asinh0227 asinh -0.0 -2.9396905927554169e-320 -> -0.0 -2.9396905927554169e-320
+asinh0228 asinh 5.64042930029359e-317 0.0 -> 5.64042930029359e-317 0.0
+asinh0229 asinh 3.3833911866596068e-318 -0.0 -> 3.3833911866596068e-318 -0.0
+asinh0230 asinh -4.9406564584124654e-324 0.0 -> -4.9406564584124654e-324 0.0
+asinh0231 asinh -2.2211379227994845e-308 -0.0 -> -2.2211379227994845e-308 -0.0
+
+-- special values
+asinh1000 asinh 0.0 0.0 -> 0.0 0.0
+asinh1001 asinh 0.0 -0.0 -> 0.0 -0.0
+asinh1002 asinh -0.0 0.0 -> -0.0 0.0
+asinh1003 asinh -0.0 -0.0 -> -0.0 -0.0
+asinh1004 asinh 0.0 inf -> inf 1.5707963267948966
+asinh1005 asinh 2.3 inf -> inf 1.5707963267948966
+asinh1006 asinh 0.0 nan -> nan nan
+asinh1007 asinh 2.3 nan -> nan nan
+asinh1008 asinh inf 0.0 -> inf 0.0
+asinh1009 asinh inf 2.3 -> inf 0.0
+asinh1010 asinh inf inf -> inf 0.78539816339744828
+asinh1011 asinh inf nan -> inf nan
+asinh1012 asinh nan 0.0 -> nan 0.0
+asinh1013 asinh nan 2.3 -> nan nan
+asinh1014 asinh nan inf -> inf nan                      ignore-real-sign
+asinh1015 asinh nan nan -> nan nan
+asinh1016 asinh 0.0 -inf -> inf -1.5707963267948966
+asinh1017 asinh 2.3 -inf -> inf -1.5707963267948966
+asinh1018 asinh inf -0.0 -> inf -0.0
+asinh1019 asinh inf -2.3 -> inf -0.0


More information about the pypy-commit mailing list