Debugging floating-point exception in python

戏子无情 提交于 2021-01-27 18:45:22

问题


I'm trying to run something that gives me a floating point exception (Floating point exception. Core dumped. No traceback). Since that kind of exception can't be caught using usual try and except, I can't figure out what's causing the exception.

Since I'm working on a VM, I'm not concerned about the implications of using fpectl. However, since I'm using anaconda python, I have no idea how to reinstall it with the appropriate flag. I tried downloading a python distribution from the official website and build it with the flag. The build seemed to be successful, but the when running python from the terminal, it still opens anaconda python one (I thought the default would be overwritten).

Is there a better way to debug a floating point exception, or to install fpectl without having to reinstall anaconda python?

来源:https://stackoverflow.com/questions/38111031/debugging-floating-point-exception-in-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!