The initial implementation is totally reckless wrt panics, casting of numeric types, and floating point arithmetic. Fix this up.
The initial implementation is totally reckless wrt panics, casting of numeric types, and floating point arithmetic. Fix this up.