Average Error: 0.0 → 0.0
Time: 822.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 code(double x, double y) {
	return (((x + 1.0) * y) - x);
}
double code(double x, double y) {
	return (pow(fma(1.0, y, (x * y)), 1.0) - x);
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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