Average Error: 1.8 → 0.2
Time: 23.4s
Precision: binary64
\[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\]
\[x + a \cdot \frac{z - y}{\left(t - z\right) + 1}\]
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
x + a \cdot \frac{z - y}{\left(t - z\right) + 1}
(FPCore (x y z t a)
 :precision binary64
 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
(FPCore (x y z t a)
 :precision binary64
 (+ x (* a (/ (- z y) (+ (- t z) 1.0)))))
double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
double code(double x, double y, double z, double t, double a) {
	return x + (a * ((z - y) / ((t - z) + 1.0)));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original1.8
Target0.2
Herbie0.2
\[x - \frac{y - z}{\left(t - z\right) + 1} \cdot a\]

Derivation

  1. Initial program 1.8

    \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\]
  2. Simplified0.2

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

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

Reproduce

herbie shell --seed 2021176 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (- x (* (/ (- y z) (+ (- t z) 1.0)) a))

  (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))