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

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

    \[\leadsto \frac{1}{\color{blue}{\frac{t}{\frac{\left(x + y\right) - z}{2}}}}\]
  5. Taylor expanded around 0 0.1

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

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

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

Reproduce

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