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

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(x + y\right) + \left(x + y\right) \cdot z} \]

Alternatives

Alternative 1
Error32.1
Cost1116
\[\begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+167}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq -1:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-229}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-307}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-249}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-17}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \]
Alternative 2
Error32.6
Cost852
\[\begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-229}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-307}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-248}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-16}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot z\\ \end{array} \]
Alternative 3
Error12.4
Cost716
\[\begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+167}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq -0.0044:\\ \;\;\;\;y \cdot \left(1 + z\right)\\ \mathbf{elif}\;z \leq 0.23:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;\left(1 + z\right) \cdot x\\ \end{array} \]
Alternative 4
Error12.9
Cost588
\[\begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+167}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq -1:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq 53:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \]
Alternative 5
Error12.7
Cost588
\[\begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+166}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq -0.0041:\\ \;\;\;\;y \cdot \left(1 + z\right)\\ \mathbf{elif}\;z \leq 11.5:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \]
Alternative 6
Error1.6
Cost584
\[\begin{array}{l} t_0 := \left(y + x\right) \cdot z\\ \mathbf{if}\;z \leq -1:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 7
Error0.0
Cost448
\[\left(x + y\right) \cdot \left(z + 1\right) \]
Alternative 8
Error34.5
Cost328
\[\begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+42}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-110}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 9
Error43.1
Cost64
\[x \]

Error

Reproduce

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