Average Error: 0.0 → 0.0
Time: 1.9s
Precision: binary64
Cost: 448
\[\left(x \cdot y + x\right) + y\]
\[y + \left(x + y \cdot x\right)\]
\left(x \cdot y + x\right) + y
y + \left(x + y \cdot x\right)
(FPCore (x y) :precision binary64 (+ (+ (* x y) x) y))
(FPCore (x y) :precision binary64 (+ y (+ x (* y x))))
double code(double x, double y) {
	return ((x * y) + x) + y;
}
double code(double x, double y) {
	return y + (x + (y * x));
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error27.0
Cost320
\[y + y \cdot x\]
Alternative 2
Error27.2
Cost320
\[x + y \cdot x\]
Alternative 3
Error36.1
Cost64
\[y\]
Alternative 4
Error36.2
Cost64
\[x\]
Alternative 5
Error61.8
Cost64
\[1\]
Alternative 6
Error62.2
Cost64
\[0\]
Alternative 7
Error61.8
Cost64
\[-1\]

Error

Derivation

  1. Initial program 0.0

    \[\left(x \cdot y + x\right) + y\]
  2. Simplified0.0

    \[\leadsto \color{blue}{y + \left(x + y \cdot x\right)}\]
  3. Final simplification0.0

    \[\leadsto y + \left(x + y \cdot x\right)\]

Reproduce

herbie shell --seed 2021042 
(FPCore (x y)
  :name "Numeric.Log:$cexpm1 from log-domain-0.10.2.1, B"
  :precision binary64
  (+ (+ (* x y) x) y))