Opened 9 years ago
Last modified 9 years ago
#8621 closed Bugs
erf function gives wrong results with pgcpp - PGI 10.4 — at Initial Version
Reported by: | Owned by: | ||
---|---|---|---|
Milestone: | To Be Determined | Component: | math |
Version: | Boost 1.53.0 | Severity: | Problem |
Keywords: | erf pgi | Cc: |
Description
Hi experts,
I compiled the following code with pgcpp / PGI 10.4 on linux.
/opt/pgi-10.4/linux86/10.4/bin/pgcpp main.cpp -o erf.exe
#include <math.h> #include <boost/math/special_functions/erf.hpp> int main() {
double val(1.0); printf("BOOST : %-20.15E\n", boost::math::erf(val)); printf("MATH_H: %-20.15E\n", erf(val));
}
Output is as follows: BOOST : 8.368481544380342E-01 MATH_H: 8.427007929497149E-01
The value computed by BOOST is incorrect. The same code will give the correct value when compiled with VS2012 with Windows 7-64 bits OS.
My linux box is running SUSE Linux Enterprise Desktop 10 SP2 (x86_64)
Can you please help troubleshoot the problem? Other basic statistic functions will also return wrong values such as cdf and quantile of standard distribution.
Thanks a lot,
Jacques Desfosses