Commit 0282b942 authored by Davis King's avatar Davis King

Fixed compiler error due to #define nonsense in visual studio.

parent 1dc5e002
...@@ -388,22 +388,22 @@ namespace ...@@ -388,22 +388,22 @@ namespace
dlib::rand rnd; dlib::rand rnd;
int big = 0; int big_val = 0;
int small = 0; int small_val = 0;
const long long maxval = (((unsigned long long)1)<<62) + (((unsigned long long)1)<<61); const long long maxval = (((unsigned long long)1)<<62) + (((unsigned long long)1)<<61);
for (int i = 0; i < 10000000; ++i) for (int i = 0; i < 10000000; ++i)
{ {
if (rnd.get_integer(maxval) > maxval/2) if (rnd.get_integer(maxval) > maxval/2)
++big; ++big_val;
else else
++small; ++small_val;
} }
// make sure there isn't any funny bias // make sure there isn't any funny bias
DLIB_TEST(std::abs(big/(double)small - 1) < 0.001); DLIB_TEST(std::abs(big_val/(double)small_val - 1) < 0.001);
cout << big/(double)small << endl; cout << big_val/(double)small_val << endl;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment