So now your algorithm, which was originally integer-based, is now floating point-based and littered with all kinds of extraneous function calls. Taken altogether, this algorithm is less understandable. If this approach has pros, I’m not seeing it.

A language that doesn’t have proper integers and cannot do proper integer arithmetic is just plain weird, a unique outlier that confuses people trained in normal Computer Science.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store