A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'v3_9_x'
[simgrid.git]
/
src
/
surf
/
random_mgr.c
diff --git
a/src/surf/random_mgr.c
b/src/surf/random_mgr.c
index
8bad98f
..
07cac22
100644
(file)
--- a/
src/surf/random_mgr.c
+++ b/
src/surf/random_mgr.c
@@
-6,7
+6,9
@@
#include "surf/random_mgr.h"
#include "xbt/sysdep.h"
#include "surf/random_mgr.h"
#include "xbt/sysdep.h"
-#include "gras_config.h" /*_XBT_WIN32*/
+#include "internal_config.h" /*_XBT_WIN32*/
+#include <math.h>
+#include <stdlib.h>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(random, surf, "Random part of surf");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(random, surf, "Random part of surf");
@@
-54,7
+56,7
@@
union ieee754_double {
} ieee_nan;
};
} ieee_nan;
};
-#define IEEE754_DOUBLE_BIAS
0x3ff /* Added to exponent. */
+#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
double drand48(void);
double drand48(void);
@@
-200,8
+202,8
@@
static double custom_random(e_random_generator_t generator, long int *seed)
case RAND:
return (double) rand_r((unsigned int *) seed) / RAND_MAX;
case RNGSTREAM :
case RAND:
return (double) rand_r((unsigned int *) seed) / RAND_MAX;
case RNGSTREAM :
-
XBT_INFO("Seen RNGSTREAM");
-
return 0.0;
+ XBT_INFO("Seen RNGSTREAM");
+ return 0.0;
default:
return drand48();
}
default:
return drand48();
}