?

Average Error: 0.1% → 0.1%
Time: 5.8s
Precision: binary64
Cost: 576

?

\[\frac{\left(x + y\right) - z}{t \cdot 2} \]
\[\frac{\left(x + y\right) - z}{t \cdot 2} \]
(FPCore (x y z t) :precision binary64 (/ (- (+ x y) z) (* t 2.0)))
(FPCore (x y z t) :precision binary64 (/ (- (+ x y) z) (* t 2.0)))
double code(double x, double y, double z, double t) {
	return ((x + y) - z) / (t * 2.0);
}
double code(double x, double y, double z, double t) {
	return ((x + y) - z) / (t * 2.0);
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = ((x + y) - z) / (t * 2.0d0)
end function
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = ((x + y) - z) / (t * 2.0d0)
end function
public static double code(double x, double y, double z, double t) {
	return ((x + y) - z) / (t * 2.0);
}
public static double code(double x, double y, double z, double t) {
	return ((x + y) - z) / (t * 2.0);
}
def code(x, y, z, t):
	return ((x + y) - z) / (t * 2.0)
def code(x, y, z, t):
	return ((x + y) - z) / (t * 2.0)
function code(x, y, z, t)
	return Float64(Float64(Float64(x + y) - z) / Float64(t * 2.0))
end
function code(x, y, z, t)
	return Float64(Float64(Float64(x + y) - z) / Float64(t * 2.0))
end
function tmp = code(x, y, z, t)
	tmp = ((x + y) - z) / (t * 2.0);
end
function tmp = code(x, y, z, t)
	tmp = ((x + y) - z) / (t * 2.0);
end
code[x_, y_, z_, t_] := N[(N[(N[(x + y), $MachinePrecision] - z), $MachinePrecision] / N[(t * 2.0), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_] := N[(N[(N[(x + y), $MachinePrecision] - z), $MachinePrecision] / N[(t * 2.0), $MachinePrecision]), $MachinePrecision]
\frac{\left(x + y\right) - z}{t \cdot 2}
\frac{\left(x + y\right) - z}{t \cdot 2}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.1

    \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
  2. Final simplification0.1

    \[\leadsto \frac{\left(x + y\right) - z}{t \cdot 2} \]

Alternatives

Alternative 1
Error47.5%
Cost850
\[\begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+87} \lor \neg \left(z \leq -2.25 \cdot 10^{+35}\right) \land \left(z \leq -3 \cdot 10^{-22} \lor \neg \left(z \leq 6.4 \cdot 10^{+19}\right)\right):\\ \;\;\;\;\frac{-0.5}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{0.5}{t}\\ \end{array} \]
Alternative 2
Error55.27%
Cost848
\[\begin{array}{l} t_1 := \frac{-0.5}{\frac{t}{z}}\\ t_2 := \frac{x}{\frac{t}{0.5}}\\ \mathbf{if}\;y \leq -1.26 \cdot 10^{-194}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{-232}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.85 \cdot 10^{-155}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 0.115:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{0.5}{t}\\ \end{array} \]
Alternative 3
Error55.26%
Cost848
\[\begin{array}{l} t_1 := \frac{-0.5}{\frac{t}{z}}\\ t_2 := \frac{x}{\frac{t}{0.5}}\\ \mathbf{if}\;y \leq -1.15 \cdot 10^{-192}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.32 \cdot 10^{-232}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{-154}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 0.115:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{t}{0.5}}\\ \end{array} \]
Alternative 4
Error55.17%
Cost848
\[\begin{array}{l} t_1 := \frac{z \cdot -0.5}{t}\\ t_2 := \frac{x}{\frac{t}{0.5}}\\ \mathbf{if}\;y \leq -2.6 \cdot 10^{-194}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-232}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-155}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 0.11:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{t}{0.5}}\\ \end{array} \]
Alternative 5
Error27.38%
Cost580
\[\begin{array}{l} \mathbf{if}\;x \leq -3.3 \cdot 10^{+44}:\\ \;\;\;\;\frac{x}{\frac{t}{0.5}}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{y - z}{t}\\ \end{array} \]
Alternative 6
Error23.56%
Cost580
\[\begin{array}{l} \mathbf{if}\;x \leq -0.0265:\\ \;\;\;\;\left(x + y\right) \cdot \frac{0.5}{t}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{y - z}{t}\\ \end{array} \]
Alternative 7
Error24.09%
Cost580
\[\begin{array}{l} \mathbf{if}\;y \leq 5 \cdot 10^{-48}:\\ \;\;\;\;\frac{-0.5 \cdot \left(z - x\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{y - z}{t}\\ \end{array} \]
Alternative 8
Error0.41%
Cost576
\[\left(z - \left(x + y\right)\right) \cdot \frac{-0.5}{t} \]
Alternative 9
Error63.86%
Cost320
\[y \cdot \frac{0.5}{t} \]

Error

Reproduce?

herbie shell --seed 2023103 
(FPCore (x y z t)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, B"
  :precision binary64
  (/ (- (+ x y) z) (* t 2.0)))