Average Error: 1.2 → 0.4
Time: 4.5s
Precision: binary64
\[x + y \cdot \frac{z - t}{z - a}\]
\[\begin{array}{l} \mathbf{if}\;\frac{z - t}{z - a} \leq -2.119372169535663 \cdot 10^{+192}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;\frac{z - t}{z - a} \leq 1.9335633529579097 \cdot 10^{+172}:\\ \;\;\;\;x + \frac{z - t}{z - a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(z - t\right) \cdot y\right) \cdot \frac{1}{z - a}\\ \end{array}\]
x + y \cdot \frac{z - t}{z - a}
\begin{array}{l}
\mathbf{if}\;\frac{z - t}{z - a} \leq -2.119372169535663 \cdot 10^{+192}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\

\mathbf{elif}\;\frac{z - t}{z - a} \leq 1.9335633529579097 \cdot 10^{+172}:\\
\;\;\;\;x + \frac{z - t}{z - a} \cdot y\\

\mathbf{else}:\\
\;\;\;\;x + \left(\left(z - t\right) \cdot y\right) \cdot \frac{1}{z - a}\\

\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
(FPCore (x y z t a)
 :precision binary64
 (if (<= (/ (- z t) (- z a)) -2.119372169535663e+192)
   (+ x (* (- z t) (/ y (- z a))))
   (if (<= (/ (- z t) (- z a)) 1.9335633529579097e+172)
     (+ x (* (/ (- z t) (- z a)) y))
     (+ x (* (* (- z t) y) (/ 1.0 (- z a)))))))
double code(double x, double y, double z, double t, double a) {
	return ((double) (x + ((double) (y * (((double) (z - t)) / ((double) (z - a)))))));
}
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (((((double) (z - t)) / ((double) (z - a))) <= -2.119372169535663e+192)) {
		tmp = ((double) (x + ((double) (((double) (z - t)) * (y / ((double) (z - a)))))));
	} else {
		double tmp_1;
		if (((((double) (z - t)) / ((double) (z - a))) <= 1.9335633529579097e+172)) {
			tmp_1 = ((double) (x + ((double) ((((double) (z - t)) / ((double) (z - a))) * y))));
		} else {
			tmp_1 = ((double) (x + ((double) (((double) (((double) (z - t)) * y)) * (1.0 / ((double) (z - a)))))));
		}
		tmp = tmp_1;
	}
	return tmp;
}

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.2
Target1.1
Herbie0.4
\[x + \frac{y}{\frac{z - a}{z - t}}\]

Derivation

  1. Split input into 3 regimes
  2. if (/ (- z t) (- z a)) < -2.1193721695356629e192

    1. Initial program Error: 14.4 bits

      \[x + y \cdot \frac{z - t}{z - a}\]
    2. Using strategy rm
    3. Applied clear-numError: 14.4 bits

      \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}}\]
    4. Using strategy rm
    5. Applied associate-/r/Error: 14.4 bits

      \[\leadsto x + y \cdot \color{blue}{\left(\frac{1}{z - a} \cdot \left(z - t\right)\right)}\]
    6. Applied associate-*r*Error: 0.5 bits

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

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

    if -2.1193721695356629e192 < (/ (- z t) (- z a)) < 1.9335633529579097e172

    1. Initial program Error: 0.3 bits

      \[x + y \cdot \frac{z - t}{z - a}\]

    if 1.9335633529579097e172 < (/ (- z t) (- z a))

    1. Initial program Error: 14.6 bits

      \[x + y \cdot \frac{z - t}{z - a}\]
    2. Using strategy rm
    3. Applied div-invError: 14.7 bits

      \[\leadsto x + y \cdot \color{blue}{\left(\left(z - t\right) \cdot \frac{1}{z - a}\right)}\]
    4. Applied associate-*r*Error: 2.6 bits

      \[\leadsto x + \color{blue}{\left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{z - a}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplificationError: 0.4 bits

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{z - t}{z - a} \leq -2.119372169535663 \cdot 10^{+192}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;\frac{z - t}{z - a} \leq 1.9335633529579097 \cdot 10^{+172}:\\ \;\;\;\;x + \frac{z - t}{z - a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(z - t\right) \cdot y\right) \cdot \frac{1}{z - a}\\ \end{array}\]

Reproduce

herbie shell --seed 2020203 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
  :precision binary64

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

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