本文整理汇总了Python中jas.PolyRing.complexRoots方法的典型用法代码示例。如果您正苦于以下问题:Python PolyRing.complexRoots方法的具体用法?Python PolyRing.complexRoots怎么用?Python PolyRing.complexRoots使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jas.PolyRing
的用法示例。
在下文中一共展示了PolyRing.complexRoots方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: startLog
# 需要导入模块: from jas import PolyRing [as 别名]
# 或者: from jas.PolyRing import complexRoots [as 别名]
print
startLog()
t = System.currentTimeMillis()
# R = r.complexRoots(f);
R = f.complexRoots()
t = System.currentTimeMillis() - t
# print "R = ", [ a.elem.ring for a in R ];
print "R = ", [a.elem.ring.getRoot() for a in R]
print "complex roots time =", t, "milliseconds"
print
# terminate();
# sys.exit();
# eps = QQ(1,10) ** (DD().elem.DEFAULT_PRECISION-3); # not too big
eps = QQ(1, 10) ** 10
print "eps = ", eps
t = System.currentTimeMillis()
R = r.complexRoots(f, eps)
t = System.currentTimeMillis() - t
# print "R = ", [ str(a) for a in R ];
print "R = ", [a.elem.decimalMagnitude() for a in R]
print "complex root refinement time =", t, "milliseconds"
print
# startLog();
terminate()