Average Error: 0.0 → 0.0
Time: 2.1s
Precision: 64
\[\left(x + 1\right) \cdot y - x\]
\[{\left(\mathsf{fma}\left(1, y, x \cdot y\right)\right)}^{1} - x\]
\left(x + 1\right) \cdot y - x
{\left(\mathsf{fma}\left(1, y, x \cdot y\right)\right)}^{1} - x
double f(double x, double y) {
        double r266221 = x;
        double r266222 = 1.0;
        double r266223 = r266221 + r266222;
        double r266224 = y;
        double r266225 = r266223 * r266224;
        double r266226 = r266225 - r266221;
        return r266226;
}

double f(double x, double y) {
        double r266227 = 1.0;
        double r266228 = y;
        double r266229 = x;
        double r266230 = r266229 * r266228;
        double r266231 = fma(r266227, r266228, r266230);
        double r266232 = 1.0;
        double r266233 = pow(r266231, r266232);
        double r266234 = r266233 - r266229;
        return r266234;
}

Error

Bits error versus x

Bits error versus y

Derivation

  1. Initial program 0.0

    \[\left(x + 1\right) \cdot y - x\]
  2. Using strategy rm
  3. Applied pow10.0

    \[\leadsto \left(x + 1\right) \cdot \color{blue}{{y}^{1}} - x\]
  4. Applied pow10.0

    \[\leadsto \color{blue}{{\left(x + 1\right)}^{1}} \cdot {y}^{1} - x\]
  5. Applied pow-prod-down0.0

    \[\leadsto \color{blue}{{\left(\left(x + 1\right) \cdot y\right)}^{1}} - x\]
  6. Simplified0.0

    \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(1, y, x \cdot y\right)\right)}}^{1} - x\]
  7. Final simplification0.0

    \[\leadsto {\left(\mathsf{fma}\left(1, y, x \cdot y\right)\right)}^{1} - x\]

Reproduce

herbie shell --seed 2020100 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.SRGB:transferFunction from colour-2.3.3"
  :precision binary64
  (- (* (+ x 1) y) x))