aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2012-09-18 05:47:12 +0000
committerastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2012-09-18 05:47:12 +0000
commita820e3bd3c87127755b92a34cc234777502fc282 (patch)
tree012372bd3f40241d54e70ec9ea9e0e11dc3677b9
parent312f07dbe0fc9e927678a6d6d62188287413a6aa (diff)
downloadopt-utilities-a820e3bd3c87127755b92a34cc234777502fc282.tar.bz2
git-svn-id: file:///home/svn/opt_utilities@245 ed2142bd-67ad-457f-ba7c-d818d4011675
-rw-r--r--misc/bootstrap.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/misc/bootstrap.hpp b/misc/bootstrap.hpp
index 6059917..cc647ef 100644
--- a/misc/bootstrap.hpp
+++ b/misc/bootstrap.hpp
@@ -15,6 +15,7 @@
#include <iostream>
#include <utility>
#include <algorithm>
+#include <cmath>
#include <data_sets/default_data_set.hpp>
using std::cerr;
namespace opt_utilities
@@ -27,7 +28,7 @@ namespace opt_utilities
{
y=(rand()/(Ty)RAND_MAX-(Ty).5)*(10*y_err)+y0;
}
- while(rand()/(Ty)RAND_MAX>exp(-(y-y0)*(y-y0)/(y_err*y_err)));
+ while(rand()/(Ty)RAND_MAX>std::exp(-(y-y0)*(y-y0)/(y_err*y_err)));
return y;
}