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

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 flip-+_binary6420.6

    \[\leadsto \color{blue}{\frac{\left(x \cdot y\right) \cdot \left(x \cdot y\right) - x \cdot x}{x \cdot y - x}} + y\]
  4. Simplified27.5

    \[\leadsto \frac{\color{blue}{x \cdot \left(x \cdot \left(y \cdot y\right) - x\right)}}{x \cdot y - x} + y\]
  5. Using strategy rm
  6. Applied *-un-lft-identity_binary6427.5

    \[\leadsto \frac{x \cdot \left(x \cdot \left(y \cdot y\right) - x\right)}{\color{blue}{1 \cdot \left(x \cdot y - x\right)}} + y\]
  7. Applied times-frac_binary6413.6

    \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{x \cdot \left(y \cdot y\right) - x}{x \cdot y - x}} + y\]
  8. Simplified13.6

    \[\leadsto \color{blue}{x} \cdot \frac{x \cdot \left(y \cdot y\right) - x}{x \cdot y - x} + y\]
  9. Simplified11.3

    \[\leadsto x \cdot \color{blue}{\left(1 \cdot \frac{y \cdot y + -1}{y + -1}\right)} + y\]
  10. Using strategy rm
  11. Applied *-un-lft-identity_binary6411.3

    \[\leadsto x \cdot \left(1 \cdot \frac{y \cdot y + -1}{\color{blue}{1 \cdot \left(y + -1\right)}}\right) + y\]
  12. Applied *-un-lft-identity_binary6411.3

    \[\leadsto x \cdot \left(1 \cdot \frac{\color{blue}{1 \cdot \left(y \cdot y + -1\right)}}{1 \cdot \left(y + -1\right)}\right) + y\]
  13. Applied times-frac_binary6411.3

    \[\leadsto x \cdot \left(1 \cdot \color{blue}{\left(\frac{1}{1} \cdot \frac{y \cdot y + -1}{y + -1}\right)}\right) + y\]
  14. Simplified11.3

    \[\leadsto x \cdot \left(1 \cdot \left(\color{blue}{1} \cdot \frac{y \cdot y + -1}{y + -1}\right)\right) + y\]
  15. Simplified0.0

    \[\leadsto x \cdot \left(1 \cdot \left(1 \cdot \color{blue}{\left(y + 1\right)}\right)\right) + y\]
  16. Taylor expanded around 0 0.0

    \[\leadsto \color{blue}{\left(x \cdot y + x\right)} + y\]
  17. Simplified0.0

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

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

Reproduce

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