@
justou 尝试调用了 gsl 库 gsl/gsl_integration.h,函数是正弦函数,类似 “ f = pow(x, 4)*sin(a*x + b*pow(x, 2) + c*pow(x, 3) + d*pow(x, 4))” ,因为参数的原因,函数很有可能不收敛,gsl 库会报错如下并终止程序:
gsl: ../../integration/qags.c:563: ERROR: integral is divergent, or slowly convergent
Default GSL error handler invoked.
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
我的期望是即使函数发散也能返回一个标志不影响程序继续,而不是直接终止报错。想请教一下这种情况可以考虑怎样解决,或者有什么方法可以找到 gsl 的源码自己修改?比较小白,灰常感谢~