Average Error: 0.0 → 0.0
Time: 4.5s
Precision: binary64
\[\frac{\left(x + y\right) - z}{t \cdot 2} \]
\[\frac{\left(\left(x + y\right) - z\right) \cdot 0.5}{t} \]
\frac{\left(x + y\right) - z}{t \cdot 2}
\frac{\left(\left(x + y\right) - z\right) \cdot 0.5}{t}
(FPCore (x y z t) :precision binary64 (/ (- (+ x y) z) (* t 2.0)))
(FPCore (x y z t) :precision binary64 (/ (* (- (+ x y) z) 0.5) t))
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) * 0.5) / t;
}

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.0

    \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
  2. Applied div-inv_binary640.2

    \[\leadsto \color{blue}{\left(\left(x + y\right) - z\right) \cdot \frac{1}{t \cdot 2}} \]
  3. Simplified0.2

    \[\leadsto \left(\left(x + y\right) - z\right) \cdot \color{blue}{\frac{0.5}{t}} \]
  4. Applied associate-*r/_binary640.0

    \[\leadsto \color{blue}{\frac{\left(\left(x + y\right) - z\right) \cdot 0.5}{t}} \]
  5. Final simplification0.0

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

Reproduce

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