?

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

?

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

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

Alternatives

Alternative 1
Error12.9
Cost1112
\[\begin{array}{l} t_0 := \left(1 - z\right) \cdot x\\ t_1 := z \cdot \left(-y\right)\\ \mathbf{if}\;z \leq -4.6 \cdot 10^{+185}:\\ \;\;\;\;z \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{+68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -0.0002:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-20}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+24}:\\ \;\;\;\;y \cdot \left(1 - z\right)\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+70}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error13.2
Cost1048
\[\begin{array}{l} t_0 := z \cdot \left(-x\right)\\ t_1 := z \cdot \left(-y\right)\\ \mathbf{if}\;z \leq -3.5 \cdot 10^{+189}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -21000000000:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-20}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+28}:\\ \;\;\;\;y \cdot \left(1 - z\right)\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+74}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error13.0
Cost916
\[\begin{array}{l} t_0 := z \cdot \left(-x\right)\\ t_1 := z \cdot \left(-y\right)\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+183}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -3 \cdot 10^{+69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -21000000000:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 3.15 \cdot 10^{+70}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error1.6
Cost648
\[\begin{array}{l} t_0 := \left(y + x\right) \cdot \left(-z\right)\\ \mathbf{if}\;z \leq -1:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error12.5
Cost520
\[\begin{array}{l} t_0 := z \cdot \left(-x\right)\\ \mathbf{if}\;z \leq -21000000000:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 6
Error38.3
Cost196
\[\begin{array}{l} \mathbf{if}\;y \leq 1.15 \cdot 10^{-76}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 7
Error23.1
Cost192
\[y + x \]
Alternative 8
Error42.5
Cost64
\[x \]

Error

Reproduce?

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