@dfm I was using your excellent notebook to learn about how to call C++ from PyStan. The features are in the develop branch of PyStan and gets picked up by conda, which is great.
I came across one line
if (abs((E - E0) / E) <= 1.234e-10) return E;
in the C++ code in cell 4 and cell 17 that caused a problem for my gcc/g++ stack (GCC 7.4).
Changing this line to read
if (fabs((E - E0) / E) <= 1.234e-10) return E;
fixes the problem.
Posting this, in case others run into it.
The origin of the issue is discussed in Stack Overflow here.
The use of abs() is strictly correct C++, so this isn't really a bug - but it may be useful to others to know this trick.
The C++ extension is excellent.
@dfm I was using your excellent notebook to learn about how to call C++ from PyStan. The features are in the develop branch of PyStan and gets picked up by conda, which is great.
I came across one line
if (abs((E - E0) / E) <= 1.234e-10) return E;in the C++ code in cell 4 and cell 17 that caused a problem for my gcc/g++ stack (GCC 7.4).
Changing this line to read
if (fabs((E - E0) / E) <= 1.234e-10) return E;fixes the problem.
Posting this, in case others run into it.
The origin of the issue is discussed in Stack Overflow here.
The use of abs() is strictly correct C++, so this isn't really a bug - but it may be useful to others to know this trick.
The C++ extension is excellent.