Average Error: 0.0 → 0.0
Time: 4.7s
Precision: binary64
Cost: 576
\[\left(x + y\right) \cdot \left(z + 1\right) \]
\[x + \left(y + z \cdot \left(y + x\right)\right) \]
(FPCore (x y z) :precision binary64 (* (+ x y) (+ z 1.0)))
(FPCore (x y z) :precision binary64 (+ x (+ y (* z (+ y x)))))
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 * (y + x)));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x + y) * (z + 1.0d0)
end function
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x + (y + (z * (y + x)))
end function
public static double code(double x, double y, double z) {
	return (x + y) * (z + 1.0);
}
public static double code(double x, double y, double z) {
	return x + (y + (z * (y + x)));
}
def code(x, y, z):
	return (x + y) * (z + 1.0)
def code(x, y, z):
	return x + (y + (z * (y + x)))
function code(x, y, z)
	return Float64(Float64(x + y) * Float64(z + 1.0))
end
function code(x, y, z)
	return Float64(x + Float64(y + Float64(z * Float64(y + x))))
end
function tmp = code(x, y, z)
	tmp = (x + y) * (z + 1.0);
end
function tmp = code(x, y, z)
	tmp = x + (y + (z * (y + x)));
end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := N[(x + N[(y + N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(x + y\right) \cdot \left(z + 1\right)
x + \left(y + z \cdot \left(y + x\right)\right)

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

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

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

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

Alternatives

Alternative 1
Error39.4
Cost720
\[\begin{array}{l} \mathbf{if}\;y \leq 6 \cdot 10^{-168}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-60}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-46}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+54}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 2
Error12.3
Cost720
\[\begin{array}{l} t_0 := y \cdot \left(z + 1\right)\\ \mathbf{if}\;z \leq -1.15 \cdot 10^{-10}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-9}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 1.46 \cdot 10^{+131}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+190}:\\ \;\;\;\;x \cdot z\\ \mathbf{else}:\\ \;\;\;\;y \cdot z\\ \end{array} \]
Alternative 3
Error1.6
Cost585
\[\begin{array}{l} \mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1\right):\\ \;\;\;\;z \cdot \left(y + x\right)\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
Alternative 4
Error39.3
Cost460
\[\begin{array}{l} \mathbf{if}\;y \leq 6 \cdot 10^{-168}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-59}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-10}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 5
Error38.7
Cost460
\[\begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+71}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -4.6 \cdot 10^{+22}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;x \leq -5.1 \cdot 10^{-81}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 6
Error12.6
Cost456
\[\begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq 26.5:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;y \cdot z\\ \end{array} \]
Alternative 7
Error25.2
Cost452
\[\begin{array}{l} \mathbf{if}\;x \leq -4 \cdot 10^{-124}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(z + 1\right)\\ \end{array} \]
Alternative 8
Error0.0
Cost448
\[\left(y + x\right) \cdot \left(z + 1\right) \]
Alternative 9
Error42.7
Cost64
\[x \]

Error

Reproduce

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