Sha256: 957a77f6b34e8f36905c8db4419f80d91611ed3e12efc0a1e51c0566cbd0f8aa

Contents?: true

Size: 808 Bytes

Versions: 30

Compression:

Stored size: 808 Bytes

Contents

#! /usr/bin/env python
""" Simple test script for cmathmodule.c
    Roger E. Masse
"""
import cmath
from test_support import verbose

testdict = {'acos' : 1.0,
            'acosh' : 1.0,
            'asin' : 1.0,
            'asinh' : 1.0,
            'atan' : 0.2,
            'atanh' : 0.2,
            'cos' : 1.0,
            'cosh' : 1.0,
            'exp' : 1.0,
            'log' : 1.0,
            'log10' : 1.0,
            'sin' : 1.0,
            'sinh' : 1.0,
            'sqrt' : 1.0,
            'tan' : 1.0,
            'tanh' : 1.0}

for func in testdict.keys():
    f = getattr(cmath, func)
    r = f(testdict[func])
    if verbose:
        print 'Calling %s(%f) = %f' % (func, testdict[func], abs(r))

p = cmath.pi
e = cmath.e
if verbose:
    print 'PI = ', abs(p)
    print 'E = ', abs(e)

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
rubyfox-server-2.19.2.0 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.17.3.2 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.17.3.1 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.17.3.0 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.16.3.2 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.16.3.1 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.16.0.4 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.16.0.3 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.16.0.2 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.16.0.1 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.16.0.0 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.13.7.3 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.13.6.2 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.13.6.1 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.13.5.1 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.13.4.1 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.13.3.1 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.12.5.1 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.12.5.0 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py
rubyfox-server-2.12.4.0 lib/rubyfox/server/data/lib/Lib/test/test_cmath.py