?

Average Error: 0.0 → 0.0
Time: 4.8s
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
Error40.8
Cost1512
\[\begin{array}{l} \mathbf{if}\;x \leq -5.4 \cdot 10^{+228}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1 \cdot 10^{+191}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;x \leq -2.4 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -9.8 \cdot 10^{-129}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;x \leq -9.2 \cdot 10^{-196}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq -7.4 \cdot 10^{-228}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;x \leq -3.35 \cdot 10^{-251}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{-293}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-122}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-78}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 2
Error32.9
Cost1116
\[\begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq -8.4 \cdot 10^{-50}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-112}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-187}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-234}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-76}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-9}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \]
Alternative 3
Error12.6
Cost588
\[\begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+44}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -1:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq 34000:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \]
Alternative 4
Error1.6
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 5
Error24.8
Cost452
\[\begin{array}{l} \mathbf{if}\;x \leq -9.8 \cdot 10^{-129}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(z + 1\right)\\ \end{array} \]
Alternative 6
Error39.0
Cost196
\[\begin{array}{l} \mathbf{if}\;y \leq 2.55 \cdot 10^{-80}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 7
Error42.9
Cost64
\[x \]

Error

Reproduce?

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