Changing local calculations in a mix of float and double to be just double to avoid possible precision loss and possible un-needed float to double conversions .
@christos @amoussa