?

Average Error: 0.03% → 0.03%
Time: 4.3s
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.03

    \[\left(x + y\right) \cdot \left(z + 1\right) \]
  2. Final simplification0.03

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

Alternatives

Alternative 1
Error61.99%
Cost852
\[\begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{+71}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.26 \cdot 10^{-17}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{-131}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.55 \cdot 10^{-273}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-303}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 2
Error19.39%
Cost716
\[\begin{array}{l} \mathbf{if}\;z \leq -0.048:\\ \;\;\;\;y \cdot \left(z + 1\right)\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-16}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+100}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot z\\ \end{array} \]
Alternative 3
Error19.81%
Cost588
\[\begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq 14.5:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+100}:\\ \;\;\;\;x \cdot z\\ \mathbf{else}:\\ \;\;\;\;y \cdot z\\ \end{array} \]
Alternative 4
Error19.54%
Cost588
\[\begin{array}{l} \mathbf{if}\;z \leq -0.026:\\ \;\;\;\;y \cdot \left(z + 1\right)\\ \mathbf{elif}\;z \leq 13.5:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+101}:\\ \;\;\;\;x \cdot z\\ \mathbf{else}:\\ \;\;\;\;y \cdot z\\ \end{array} \]
Alternative 5
Error2.56%
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
Error60.22%
Cost460
\[\begin{array}{l} \mathbf{if}\;y \leq 1.5 \cdot 10^{-110}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.55 \cdot 10^{-55}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-21}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 7
Error61.41%
Cost460
\[\begin{array}{l} \mathbf{if}\;x \leq -8.4 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-18}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{-131}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 8
Error66.76%
Cost64
\[x \]

Error

Reproduce?

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