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

    \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
  2. Using strategy rm
  3. Applied div-sub_binary640.1

    \[\leadsto \color{blue}{\frac{x + y}{t \cdot 2} - \frac{z}{t \cdot 2}} \]
  4. Simplified0.1

    \[\leadsto \color{blue}{\frac{y + x}{t \cdot 2}} - \frac{z}{t \cdot 2} \]
  5. Taylor expanded around 0 0.0

    \[\leadsto \color{blue}{\frac{\left(0.5 \cdot y + 0.5 \cdot x\right) - 0.5 \cdot z}{t}} \]
  6. Simplified0.4

    \[\leadsto \color{blue}{\frac{0.5}{\frac{t}{\left(x + y\right) - z}}} \]
  7. Using strategy rm
  8. Applied *-un-lft-identity_binary640.4

    \[\leadsto \frac{0.5}{\frac{t}{\color{blue}{1 \cdot \left(\left(x + y\right) - z\right)}}} \]
  9. Applied *-un-lft-identity_binary640.4

    \[\leadsto \frac{0.5}{\frac{\color{blue}{1 \cdot t}}{1 \cdot \left(\left(x + y\right) - z\right)}} \]
  10. Applied times-frac_binary640.4

    \[\leadsto \frac{0.5}{\color{blue}{\frac{1}{1} \cdot \frac{t}{\left(x + y\right) - z}}} \]
  11. Applied *-un-lft-identity_binary640.4

    \[\leadsto \frac{\color{blue}{1 \cdot 0.5}}{\frac{1}{1} \cdot \frac{t}{\left(x + y\right) - z}} \]
  12. Applied times-frac_binary640.4

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

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

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

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

Reproduce

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