summaryrefslogtreecommitdiff
path: root/fpemulation.c
diff options
context:
space:
mode:
Diffstat (limited to 'fpemulation.c')
-rw-r--r--fpemulation.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fpemulation.c b/fpemulation.c
index 542393f..2a0d849 100644
--- a/fpemulation.c
+++ b/fpemulation.c
@@ -46,9 +46,8 @@ DoEmFloat(void)
InternalFPF* cbase = NULL;
clock_t total_time = 0;
int iterations = 0;
- unsigned long i = 1;
static bool is_adjusted = false;
- static long loops = 0;
+ static long loops = 1;
abase = malloc(ARRAY_SIZE * sizeof(InternalFPF));
if (!abase) {
@@ -84,9 +83,8 @@ DoEmFloat(void)
** again.
*/
do {
- loops = i;
- i += i;
- } while ((DoEmFloatIteration(abase, bbase, cbase, i) <= MINIMUM_TICKS) && (i < LOOP_MAX));
+ loops += loops;
+ } while ((DoEmFloatIteration(abase, bbase, cbase, loops) <= MINIMUM_TICKS) && (loops < LOOP_MAX));
}
/*