Average Error: 0.0 → 0.0
Time: 4.1s
Precision: binary64
Cost: 448
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[\left(1 - z\right) \cdot \left(x + y\right)\]
\left(x + y\right) \cdot \left(1 - z\right)
\left(1 - z\right) \cdot \left(x + y\right)
(FPCore (x y z) :precision binary64 (* (+ x y) (- 1.0 z)))
(FPCore (x y z) :precision binary64 (* (- 1.0 z) (+ x y)))
double code(double x, double y, double z) {
	return (x + y) * (1.0 - z);
}
double code(double x, double y, double z) {
	return (1.0 - 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
Error1.9
Cost1032
\[\begin{array}{l} \mathbf{if}\;1 - z \leq -5.168601908510771 \cdot 10^{+32} \lor \neg \left(1 - z \leq 1.742754406991473\right):\\ \;\;\;\;\left(x + y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) - z \cdot y\\ \end{array}\]
Alternative 2
Error1.8
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -1.0051600050036185 \lor \neg \left(z \leq 1.010202234378162\right):\\ \;\;\;\;\left(x + y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array}\]
Alternative 3
Error12.3
Cost1925
\[\begin{array}{l} \mathbf{if}\;z \leq -7.849087527667034 \cdot 10^{+130}:\\ \;\;\;\;x - z \cdot x\\ \mathbf{elif}\;z \leq -2.4244414343283377 \cdot 10^{+68}:\\ \;\;\;\;\left(1 - z\right) \cdot y\\ \mathbf{elif}\;z \leq -7.223983222270586 \cdot 10^{-10}:\\ \;\;\;\;x - z \cdot x\\ \mathbf{elif}\;z \leq 4.611603194602757 \cdot 10^{-09}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.0121161751732072 \cdot 10^{+163}:\\ \;\;\;\;x - z \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(1 - z\right) \cdot y\\ \end{array}\]
Alternative 4
Error12.2
Cost648
\[\begin{array}{l} \mathbf{if}\;z \leq -5.809701750466752 \cdot 10^{-09} \lor \neg \left(z \leq 6.493125972238224 \cdot 10^{-09}\right):\\ \;\;\;\;x - z \cdot x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array}\]
Alternative 5
Error23.3
Cost192
\[x + y\]
Alternative 6
Error61.9
Cost64
\[1\]

Error

Derivation

  1. Initial program 0.0

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

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

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

Reproduce

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