Average Error: 0.0 → 0.0
Time: 2.3s
Precision: binary64
\[\left(x \cdot y + x\right) + y\]
\[y + \left(y + 1\right) \cdot x\]
\left(x \cdot y + x\right) + y
y + \left(y + 1\right) \cdot x
(FPCore (x y) :precision binary64 (+ (+ (* x y) x) y))
(FPCore (x y) :precision binary64 (+ y (* (+ y 1.0) x)))
double code(double x, double y) {
	return ((x * y) + x) + y;
}
double code(double x, double y) {
	return y + ((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 \cdot y + x\right) + y\]
  2. Using strategy rm
  3. Applied add-log-exp_binary64_420935.3

    \[\leadsto \left(x \cdot y + \color{blue}{\log \left(e^{x}\right)}\right) + y\]
  4. Applied add-log-exp_binary64_420944.9

    \[\leadsto \left(\color{blue}{\log \left(e^{x \cdot y}\right)} + \log \left(e^{x}\right)\right) + y\]
  5. Applied sum-log_binary64_426144.9

    \[\leadsto \color{blue}{\log \left(e^{x \cdot y} \cdot e^{x}\right)} + y\]
  6. Simplified36.6

    \[\leadsto \log \color{blue}{\left({\left(e^{x}\right)}^{\left(y + 1\right)}\right)} + y\]
  7. Using strategy rm
  8. Applied log-pow_binary64_425935.3

    \[\leadsto \color{blue}{\left(y + 1\right) \cdot \log \left(e^{x}\right)} + y\]
  9. Simplified0.0

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

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

Reproduce

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