Closed sangeeta0201 closed 6 years ago
Ah, here Herbgrind is indicating that there are two spots: is one output executed once (with 2 bits average error and no influences, since the rounding error is never very large), and one comparison executed 52 times (with 1 incorrect result, out of 52, again with no influences).
I admit it is a little confusing, but here Herbgrind is not printing any information about any FP computations (you would need to lower the threshold to see that); it is only printing information about outputs and comparisons.
But the average error is incorrect if I understand correctly. The average error should be total error calculated for 52 iterations, divided by 52.
Also, when I enable logging in herbgrind it shows -
The shadow value is 7.00000000000000e0, but 7.000000 was computed.
2.321928 bits error (4 ulps)
So max error should be 2.3 but its showing in output file as 2.0
Sorry, I was unclear. The average error you see is the average error of the value passed to printf
. You only call printf
once, so the average error is computed across that one instance.
Hi,
I have run herbgrind with one of the microbenchmarks - sum-50.c Herbgrind reports 2.000000 bits average error aggregated over 1 instances but there is only fp computation and that is 'add' and its executed 52 times then why herbgrind reports average over 1 instance, whereas compare is reported over 52 times.