[SciPy-Dev] numpy/npy_math.h vs C/C++ stdlib math.h/<cmath>
Evgeni Burovski
evgeny.burovskiy at gmail.com
Sun Apr 25 03:33:52 EDT 2021
Hi,
Prompted by Sturla's comment,
https://github.com/scipy/scipy/pull/13931#discussion_r619728364,
suggesting to change a call of `npy_log` into an `std::log`, here's a
question: what is the recommendation going forward for the math
functions (log, exp, trig functions etc) in scipy C/C++ code: do we
import them from `numpy/npy_math.h` or do we rely on the standard
library?
My main concern is more exotic platforms/toolchains and related edge
cases--- do we rely on numpy or the standard library vendors?
`npy_math.h` still often needs to be included for e.g. numpy data
types, so it's not a question of avoiding an extra #include.
Cheers,
Evgeni
More information about the SciPy-Dev
mailing list