Average Error: 0.1 → 0.1
Time: 5.7s
Precision: binary64
\[\frac{\left(x + y\right) - z}{t \cdot 2} \]
\[\frac{\frac{\left(z - y\right) - x}{t}}{-2} \]
(FPCore (x y z t) :precision binary64 (/ (- (+ x y) z) (* t 2.0)))
(FPCore (x y z t) :precision binary64 (/ (/ (- (- z y) x) 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 (((z - y) - x) / 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 = (((z - y) - x) / 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 (((z - y) - x) / t) / -2.0;
}
def code(x, y, z, t):
	return ((x + y) - z) / (t * 2.0)
def code(x, y, z, t):
	return (((z - y) - x) / 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(Float64(z - y) - x) / 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 = (((z - y) - x) / 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[(N[(z - y), $MachinePrecision] - x), $MachinePrecision] / t), $MachinePrecision] / -2.0), $MachinePrecision]
\frac{\left(x + y\right) - z}{t \cdot 2}
\frac{\frac{\left(z - y\right) - x}{t}}{-2}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

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. Applied egg-rr0.3

    \[\leadsto \color{blue}{{\left(\frac{2}{\frac{x + \left(y - z\right)}{t}}\right)}^{-1}} \]
  3. Applied egg-rr0.1

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

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

Reproduce

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