add static_casts to avoid unnecessary conversion from double to float
replace fp divisions by multiplications
allow results at high latitudes to be a bit more imprecise