Average Error: 0.0 → 0.0
Time: 1.5s
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 r172063 = x;
        double r172064 = 1.0;
        double r172065 = r172063 + r172064;
        double r172066 = y;
        double r172067 = r172065 * r172066;
        double r172068 = r172067 - r172063;
        return r172068;
}

double f(double x, double y) {
        double r172069 = 1.0;
        double r172070 = y;
        double r172071 = x;
        double r172072 = r172071 * r172070;
        double r172073 = fma(r172069, r172070, r172072);
        double r172074 = 1.0;
        double r172075 = pow(r172073, r172074);
        double r172076 = r172075 - r172071;
        return r172076;
}

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