⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_cma.py

📁 minimal python variant for small footprint apps like embedded apps
💻 PY
字号:
#! /usr/bin/env python""" Simple test script for cmathmodule.c    Roger E. Masse"""import cmathfrom test_support import verbosetestdict = {'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.pie = cmath.eif verbose:    print 'PI = ', abs(p)    print 'E = ', abs(e)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -