ex-2/recip: fix loop variables to best known

This commit is contained in:
Michele Guerini Rocco 2020-06-09 13:04:21 +00:00
parent cc6ce5e84f
commit 7f18dd14ab

View File

@ -21,18 +21,15 @@
double exact = 0.577215664901532860; double exact = 0.577215664901532860;
int main(int argc, char** argv) { int main(int argc, char** argv) {
double min = 8.95;
double min = (double)atof(argv[1]); double max = 9.04;
double max = (double)atof(argv[2]); double step = 0.01;
double step = (double)atof(argv[3]);
double prev_gamma, gamma = 0; double prev_gamma, gamma = 0;
double Z; double Z;
double best = 0; double best = 0;
for (double z = min; z <= max; z += step) { for (double z = min; z <= max; z += step) {
prev_gamma = gamma; prev_gamma = gamma;
double pro = 1; double pro = 1;