Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/compare_to_eospac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ int main(int argc, char *argv[]) {
Real diff = tempSpiner_h(j, i) - t_true;
tempDiff_h(j, i) = diff;
const Real mean_t = 0.5 * diff + t_true;
if (isnan(diff)) {
if (std::isnan(diff)) {
std::cout << "NAN! " << j << ", " << i << ", " << tempSpiner_h(j, i) << ", "
<< tempEOSPAC(j, i) << ", " << mean_t << ", " << diff
<< std::endl;
Expand Down
4 changes: 2 additions & 2 deletions test/eos_unit_test_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ inline std::string demangle(const char *name) { return name; }
#include <singularity-eos/eos/eos.hpp>

PORTABLE_INLINE_FUNCTION bool isClose(Real a, Real b, Real eps = 5e-2) {
return fabs(b - a) / (fabs(a + b) + 1e-20) <= eps;
return std::abs(b - a) / (std::abs(a + b) + 1e-20) <= eps;
}

PORTABLE_INLINE_FUNCTION Real myAtan(Real x, Real shift, Real scale, Real offset) {
return scale * atan(x - shift) + offset;
return scale * std::atan(x - shift) + offset;
}

// Function for comparing arrays and outputting the important information
Expand Down