not viable: no overload of 'cos' matching 'complex<double> (*)(complex<double>)' for 1st argument 我想用梯形方法来积分复杂的函数如果我只使用double (我将每个complex<double>替换为double),它是有效的,我得到了正确的解决方案,但如果我使用complex<double&
我正在尝试使用梯形规则在Haskell中对一个函数进行数值积分,返回一个带参数a,b的反导数,用于要积分的区间的端点。a + d*k) | k <- [0..n] ] - d/2.0 * (f a + f b) d = (b - a) / n在上面的代码中,我使用
n - for the number of subinterva