.. blogpost:: :title: x / y != x * (1 / y) :keywords: scikit-learn, float inverse, compilation, StandardScaler :date: 2020-06-09 :categories: runtime I was recently investigating issue `onnxruntime/4130 `_ in notebook :ref:`onnxdiscrepenciesrst`. While looking into a way to solve it, I finally discovered that this is not an easy problem. * `Division algorithm `_ * `Efficient floating-point division with constant integer divisors `_ * `Will the compiler optimize division into multiplication `_ * `Accelerating Correctly Rounded Floating-Point Division When the Divisor is Known in Advance `_