Opened 5 years ago
Closed 4 years ago
#13343 closed Bugs (obsolete)
erf(NaN) and erfc(NaN) do not return NaN
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | math |
Version: | Boost 1.65.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Hello,
It is expected that erf(NaN) and erfc(NaN) are NaN, but they are not:
#include <iostream> #include <cmath> #include "boost/math/special_functions/erf.hpp" int main(){ std::cout << boost::math::erf(nan("")) << "\n"; std::cout << boost::math::erfc(nan("")) << "\n"; return 0; }
Output:
1 0
Note:
See TracTickets
for help on using tickets.
Moved to https://github.com/boostorg/math/issues/141