QMCPACK
test_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 #include "catch.hpp"
14 
15 #include <cmath>
16 #include "CPU/math.hpp"
17 
18 namespace qmcplusplus
19 {
20 
21 template<typename T>
22 void test_isnan()
23 {
24  const T one(1);
25  T a = std::sqrt(-one);
26  T b = -a;
30 }
31 
32 TEST_CASE("isnan", "[numerics]")
33 {
34  test_isnan<float>();
35  test_isnan<double>();
36 }
37 
38 } // namespace qmcplusplus
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
TEST_CASE("complex_helper", "[type_traits]")
void test_isnan()
Definition: test_math.cpp:22
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
bool isnan(float a)
return true if the value is NaN.
Definition: math.cpp:18