问题
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