summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
12d4b26)
weird because it means printf does not make any difference between float and
double). However %lg also works for printf. So let's keep it uniform and
we'll change that if we ever find a machine where it does not work.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@639
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
date = gras_os_time() * 1000000;
test(nb_cnst, nb_var, nb_elem);
printf("One shot execution time for a total of %d constraints, "
date = gras_os_time() * 1000000;
test(nb_cnst, nb_var, nb_elem);
printf("One shot execution time for a total of %d constraints, "
- "%d variables with %d active constraint each : %f microsecondes \n",
+ "%d variables with %d active constraint each : %lg microsecondes \n",
nb_cnst, nb_var, nb_elem, date);
return 0;
}
nb_cnst, nb_var, nb_elem, date);
return 0;
}
#include <stdio.h>
#include "surf/maxmin.h"
#include <stdio.h>
#include "surf/maxmin.h"
-#define PRINT_VAR(var) printf(#var " = %g\n",lmm_variable_getvalue(var));
+#define PRINT_VAR(var) printf(#var " = %lg\n",lmm_variable_getvalue(var));
for (i = 0; i < size; i++)
xbt_heap_push(heap, NULL, (10.0 * rand() / (RAND_MAX + 1.0)));
date = gras_os_time() * 1000000 - date;
for (i = 0; i < size; i++)
xbt_heap_push(heap, NULL, (10.0 * rand() / (RAND_MAX + 1.0)));
date = gras_os_time() * 1000000 - date;
- printf("Creation time %d size heap : %g\n", size, date);
+ printf("Creation time %d size heap : %lg\n", size, date);
date = gras_os_time() * 1000000;
for (j = 0; j < MAX_TEST; j++) {
date = gras_os_time() * 1000000;
for (j = 0; j < MAX_TEST; j++) {
xbt_heap_push(heap, NULL, 3.0 * val);
}
date = gras_os_time() * 1000000 - date;
xbt_heap_push(heap, NULL, 3.0 * val);
}
date = gras_os_time() * 1000000 - date;
- printf("Mean access time for a %d size heap : %g\n", size,
+ printf("Mean access time for a %d size heap : %lg\n", size,
date * 1.0 / (MAX_TEST + 0.0));
xbt_heap_free(heap);
date * 1.0 / (MAX_TEST + 0.0));
xbt_heap_free(heap);