Average Error: 0.1 → 0.1
Time: 7.2s
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
Error35.2
Cost848
\[\begin{array}{l} t_1 := z \cdot \frac{-0.5}{t}\\ t_2 := \frac{x}{\frac{t}{0.5}}\\ \mathbf{if}\;y \leq 4.455706844361414 \cdot 10^{-297}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.1585629604115197 \cdot 10^{-238}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.6591688007092775 \cdot 10^{-144}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 4.006504109853064 \cdot 10^{-23}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot 0.5}{t}\\ \end{array} \]
Alternative 2
Error35.1
Cost848
\[\begin{array}{l} t_1 := -0.5 \cdot \frac{z}{t}\\ t_2 := \frac{x}{\frac{t}{0.5}}\\ \mathbf{if}\;y \leq 4.455706844361414 \cdot 10^{-297}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.1585629604115197 \cdot 10^{-238}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.6591688007092775 \cdot 10^{-144}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 4.006504109853064 \cdot 10^{-23}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot 0.5}{t}\\ \end{array} \]
Alternative 3
Error17.1
Cost844
\[\begin{array}{l} t_1 := \frac{y \cdot 0.5}{t}\\ t_2 := \left(z - x\right) \cdot \frac{-0.5}{t}\\ \mathbf{if}\;y \leq 175000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 193684841848677.9:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.6290086269168895 \cdot 10^{+48}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error15.6
Cost844
\[\begin{array}{l} t_1 := 0.5 \cdot \frac{y - z}{t}\\ t_2 := \left(z - x\right) \cdot \frac{-0.5}{t}\\ \mathbf{if}\;y \leq 1.9385482149925003 \cdot 10^{-72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.5246377918806476 \cdot 10^{-37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.006504109853064 \cdot 10^{-23}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error15.6
Cost844
\[\begin{array}{l} t_1 := 0.5 \cdot \frac{y - z}{t}\\ \mathbf{if}\;y \leq 1.9385482149925003 \cdot 10^{-72}:\\ \;\;\;\;\left(z - x\right) \cdot \frac{-0.5}{t}\\ \mathbf{elif}\;y \leq 1.5246377918806476 \cdot 10^{-37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.006504109853064 \cdot 10^{-23}:\\ \;\;\;\;\frac{0.5}{\frac{t}{x - z}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error0.3
Cost576
\[\left(x + \left(y - z\right)\right) \cdot \frac{0.5}{t} \]
Alternative 7
Error34.9
Cost452
\[\begin{array}{l} \mathbf{if}\;y \leq 4.006504109853064 \cdot 10^{-23}:\\ \;\;\;\;\frac{x}{\frac{t}{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot 0.5}{t}\\ \end{array} \]
Alternative 8
Error40.8
Cost320
\[\frac{0.5}{\frac{t}{x}} \]
Alternative 9
Error40.7
Cost320
\[\frac{x}{\frac{t}{0.5}} \]

Error

Reproduce

herbie shell --seed 2022294 
(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)))