QMCPACK
math.cpp
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2023 QMCPACK developers.
6 //
7 // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 //
9 // File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 // To make the customized qmcplusplus::isnan/isfinite/isinf always effective, this file must be compiled without -ffast-math.
14 #include <cmath>
15 
16 namespace qmcplusplus
17 {
18 bool isnan(float a) { return a != a; }
19 bool isnan(double a) { return a != a; }
20 
21 bool isfinite(float a) { return std::isfinite(a); }
22 bool isfinite(double a) { return std::isfinite(a); }
23 
24 bool isinf(float a) { return std::isinf(a); }
25 bool isinf(double a) { return std::isinf(a); }
26 } // namespace qmcplusplus
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
bool isfinite(float a)
return true if the value is finite.
Definition: math.cpp:21
bool isfinite(double a)
Definition: math.cpp:22
bool isinf(double a)
Definition: math.cpp:25
bool isinf(float a)
return true if the value is Inf.
Definition: math.cpp:24
bool isnan(float a)
return true if the value is NaN.
Definition: math.cpp:18