Average Error: 0.0 → 0.0
Time: 645.0ms
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 r194605 = x;
        double r194606 = 1.0;
        double r194607 = r194605 + r194606;
        double r194608 = y;
        double r194609 = r194607 * r194608;
        double r194610 = r194609 - r194605;
        return r194610;
}

double f(double x, double y) {
        double r194611 = 1.0;
        double r194612 = y;
        double r194613 = x;
        double r194614 = r194613 * r194612;
        double r194615 = fma(r194611, r194612, r194614);
        double r194616 = 1.0;
        double r194617 = pow(r194615, r194616);
        double r194618 = r194617 - r194613;
        return r194618;
}

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 2020027 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.SRGB:transferFunction from colour-2.3.3"
  :precision binary64
  (- (* (+ x 1) y) x))