Battled with math.h and cmath. We probably should move from C standard libraries to C++ ones internally (in places which are not visible via the interface)

This commit is contained in:
jpekkila
2019-08-19 14:02:30 +03:00
parent 6d4d53342e
commit e89897985e
3 changed files with 7 additions and 6 deletions

View File

@@ -26,7 +26,7 @@
*/ */
#pragma once #pragma once
#include "math_utils.h" #include "src/core/math_utils.h"
#include <assert.h> #include <assert.h>

View File

@@ -25,10 +25,10 @@
* *
*/ */
#pragma once #pragma once
#include <cmath> //#include <cmath>
using namespace std; // Potentially bad practice to declare namespace std here // using namespace std; // Potentially bad practice to declare namespace std here
// #include <math.h> // isnan, isinf // Overloads incorrect/bugged with GCC <= 6.0 #include <math.h> // isnan, isinf // Overloads incorrect/bugged with GCC <= 6.0
// #include <tgmath.h> // Even this does not work //#include <tgmath.h> // Even this does not work
#include <stdlib.h> // rand #include <stdlib.h> // rand
template <class T> template <class T>

View File

@@ -27,7 +27,8 @@
#include "host_forcing.h" #include "host_forcing.h"
// #include "src/core/math_utils.h" // #include "src/core/math_utils.h"
#include "math.h" #include <cmath>
using namespace std;
// The is a wrapper for genering random numbers with a chosen system. // The is a wrapper for genering random numbers with a chosen system.
AcReal AcReal