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

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error0.0
Cost448
\[\left(x + y\right) \cdot \left(z + 1\right)\]
Alternative 2
Error1.8
Cost904
\[\begin{array}{l} \mathbf{if}\;z + 1 \leq -579.501637131682 \lor \neg \left(z + 1 \leq 1.0003759603999207\right):\\ \;\;\;\;z \cdot \left(x + y\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array}\]
Alternative 3
Error12.8
Cost1476
\[\begin{array}{l} \mathbf{if}\;z \leq -4.383857348422166 \cdot 10^{+220}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq -3.8997768098344074 \cdot 10^{+146}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;z \leq -0.9927439474692271:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq 231.32791674184503:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;z \cdot y\\ \end{array}\]
Alternative 4
Error46.0
Cost520
\[\begin{array}{l} \mathbf{if}\;y \leq -1.560856438435606 \cdot 10^{-76} \lor \neg \left(y \leq 2.6007298073444477 \cdot 10^{-22}\right):\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array}\]
Alternative 5
Error51.2
Cost192
\[z \cdot x\]
Alternative 6
Error61.9
Cost64
\[1\]
Alternative 7
Error61.9
Cost64
\[-1\]

Error

Derivation

  1. Initial program 0.0

    \[\left(x + y\right) \cdot \left(z + 1\right)\]
  2. Using strategy rm
  3. Applied distribute-rgt-in_binary64_10510.0

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

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

    \[\leadsto \left(x + y\right) \cdot z + \color{blue}{\left(x + y\right)}\]
  6. Using strategy rm
  7. Applied pow1_binary64_11620.0

    \[\leadsto \color{blue}{{\left(\left(x + y\right) \cdot z + \left(x + y\right)\right)}^{1}}\]
  8. Using strategy rm
  9. Applied pow1_binary64_11620.0

    \[\leadsto {\left(\left(x + y\right) \cdot \color{blue}{{z}^{1}} + \left(x + y\right)\right)}^{1}\]
  10. Applied pow1_binary64_11620.0

    \[\leadsto {\left(\color{blue}{{\left(x + y\right)}^{1}} \cdot {z}^{1} + \left(x + y\right)\right)}^{1}\]
  11. Applied pow-prod-down_binary64_11720.0

    \[\leadsto {\left(\color{blue}{{\left(\left(x + y\right) \cdot z\right)}^{1}} + \left(x + y\right)\right)}^{1}\]
  12. Using strategy rm
  13. Applied *-un-lft-identity_binary64_11010.0

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

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

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

Reproduce

herbie shell --seed 2021014 
(FPCore (x y z)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, G"
  :precision binary64
  (* (+ x y) (+ z 1.0)))