Protection against floating point exception
Unneeded a priori, still while test for GRID floating point exception was raised.