@cython.cdivision(True) causes "math domain error" in weird scenario
Running a Jupyter notebook in VSCode, I am getting bizarre behavior with the Cython unprotected division directive. Starting the session with %load_ext cython, run: %%cython import math cimport cython @cython.cdivision(True) def simpleTest(int d): cdef double c = 1/math.exp(math.log(math.sqrt(2/d))) return c Now run simpleTest(x) and for any value of x >= 3 I get: ValueError: math… Read More @cython.cdivision(True) causes "math domain error" in weird scenario