Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
0282b942
"...en/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "fbff43acc9f52aec18e27806cc258a592f8b53f6"
Commit
0282b942
authored
Oct 16, 2017
by
Davis King
Browse files
Fixed compiler error due to #define nonsense in visual studio.
parent
1dc5e002
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
dlib/test/rand.cpp
dlib/test/rand.cpp
+6
-6
No files found.
dlib/test/rand.cpp
View file @
0282b942
...
@@ -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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment