Explicitly cast the input array to float before doing anything to it

so that the computation of `s` does not compute as integer division.

fixes issue #2566