?

Average Error: 0.0 → 0.0
Time: 4.4s
Precision: binary64
Cost: 448

?

\[\left(x + y\right) \cdot \left(z + 1\right) \]
\[\left(x + y\right) \cdot \left(z + 1\right) \]
(FPCore (x y z) :precision binary64 (* (+ x y) (+ z 1.0)))
(FPCore (x y z) :precision binary64 (* (+ x y) (+ z 1.0)))
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 + 1.0);
}
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 + 1.0d0)
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 + 1.0);
}
def code(x, y, z):
	return (x + y) * (z + 1.0)
def code(x, y, z):
	return (x + y) * (z + 1.0)
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(z + 1.0))
end
function tmp = code(x, y, z)
	tmp = (x + y) * (z + 1.0);
end
function tmp = code(x, y, z)
	tmp = (x + y) * (z + 1.0);
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[(z + 1.0), $MachinePrecision]), $MachinePrecision]
\left(x + y\right) \cdot \left(z + 1\right)
\left(x + y\right) \cdot \left(z + 1\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. Final simplification0.0

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

Alternatives

Alternative 1
Error13.4
Cost980
\[\begin{array}{l} t_0 := y \cdot \left(z + 1\right)\\ \mathbf{if}\;z \leq -3.8 \cdot 10^{+174}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -6 \cdot 10^{+96}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 400:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+150}:\\ \;\;\;\;x \cdot z\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Error13.2
Cost980
\[\begin{array}{l} t_0 := y \cdot \left(z + 1\right)\\ \mathbf{if}\;z \leq -1.85 \cdot 10^{+173}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{+95}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 390:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{+150}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error32.9
Cost852
\[\begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+173}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+95}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq -1:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq 390:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+149}:\\ \;\;\;\;x \cdot z\\ \mathbf{else}:\\ \;\;\;\;y \cdot z\\ \end{array} \]
Alternative 4
Error13.6
Cost852
\[\begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+172}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{+95}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq -1:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq 430:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+150}:\\ \;\;\;\;x \cdot z\\ \mathbf{else}:\\ \;\;\;\;y \cdot z\\ \end{array} \]
Alternative 5
Error1.7
Cost585
\[\begin{array}{l} \mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1\right):\\ \;\;\;\;z \cdot \left(x + y\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 6
Error32.4
Cost456
\[\begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq 390:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \]
Alternative 7
Error43.5
Cost64
\[x \]

Error

Reproduce?

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