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)
评论列表
文章目录