Average Error: 0.0 → 0.0
Time: 1.6s
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 r241934 = x;
        double r241935 = 1.0;
        double r241936 = r241934 + r241935;
        double r241937 = y;
        double r241938 = r241936 * r241937;
        double r241939 = r241938 - r241934;
        return r241939;
}

double f(double x, double y) {
        double r241940 = 1.0;
        double r241941 = y;
        double r241942 = x;
        double r241943 = r241942 * r241941;
        double r241944 = fma(r241940, r241941, r241943);
        double r241945 = 1.0;
        double r241946 = pow(r241944, r241945);
        double r241947 = r241946 - r241942;
        return r241947;
}

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