add ctype dependent tolerance to grid tests
Summary
Change the fixed hard coded tolerances in grid tests with something related to numeric_limits<ctype>::epsilon().
Details
Many tolerances in the grid tests are hard coded to something like 1.e-8. Those tests will fail if ctype=float. Thus, all those comparisons are changed to either sqrt(numeric_limits<ctype>::epsilon()) or numeric_limits<ctype>::epsilon(), depending on the previous value.
Discussion
The tolerance values seem quite arbitrary. Sometimes it is compared against 1.e-8, sometimes 1.e-7 or 1.e-6 or 1e3*numeric_limits<ctype>::epsilon(). Maybe it would be cleaner to use the FloatCmp utilities and clearly define what's the expected accuracy.
Edited by Simon Praetorius