From 7f18dd14ab6864366f9a62978599a2eb69ca4b4c Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Tue, 9 Jun 2020 13:04:21 +0000 Subject: [PATCH] ex-2/recip: fix loop variables to best known --- ex-2/recip.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ex-2/recip.c b/ex-2/recip.c index 130d79e..5192bcd 100644 --- a/ex-2/recip.c +++ b/ex-2/recip.c @@ -21,18 +21,15 @@ double exact = 0.577215664901532860; int main(int argc, char** argv) { - - double min = (double)atof(argv[1]); - double max = (double)atof(argv[2]); - double step = (double)atof(argv[3]); + double min = 8.95; + double max = 9.04; + double step = 0.01; double prev_gamma, gamma = 0; double Z; double best = 0; - for (double z = min; z <= max; z += step) { - prev_gamma = gamma; double pro = 1;