Average Error: 0.0 → 0.0
Time: 1.4s
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 r208305 = x;
        double r208306 = 1.0;
        double r208307 = r208305 + r208306;
        double r208308 = y;
        double r208309 = r208307 * r208308;
        double r208310 = r208309 - r208305;
        return r208310;
}

double f(double x, double y) {
        double r208311 = 1.0;
        double r208312 = y;
        double r208313 = x;
        double r208314 = r208313 * r208312;
        double r208315 = fma(r208311, r208312, r208314);
        double r208316 = 1.0;
        double r208317 = pow(r208315, r208316);
        double r208318 = r208317 - r208313;
        return r208318;
}

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