util.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:transmutagen 作者: ergs 项目源码 文件源码
def mean_log10_relative_error(exact, approx):
    import numpy as np
    return np.mean(np.log10(abs(relative_error(exact, approx))))

# Function to create plot like in "Computing the Matrix Exponential in Burnup
# Calculations", Pusa and Leppa?nen:
# mpmath.cplot(lambdify(t, rat_func14 - exp(-t), 'mpmath'), re=[0, 100], im=[-30, 30], color=lambda i: -mpmath.floor(mpmath.log(abs(i), 10))/(30 - mpmath.floor(mpmath.log(abs(i), 10))), points=100000, verbose=True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号