Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3

Percentage Accurate: 69.0% → 91.1%
Time: 24.3s
Alternatives: 18
Speedup: 0.9×

Specification

?
\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a):
	return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (((y - z) * (t - x)) / (a - z));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 18 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 69.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a):
	return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (((y - z) * (t - x)) / (a - z));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}

Alternative 1: 91.1% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{-281} \lor \neg \left(t_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (or (<= t_1 -2e-281) (not (<= t_1 0.0)))
     (fma (/ (- y z) (- a z)) (- t x) x)
     (+ t (/ (- x t) (/ z (- y a)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if ((t_1 <= -2e-281) || !(t_1 <= 0.0)) {
		tmp = fma(((y - z) / (a - z)), (t - x), x);
	} else {
		tmp = t + ((x - t) / (z / (y - a)));
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if ((t_1 <= -2e-281) || !(t_1 <= 0.0))
		tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x);
	else
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-281], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-281} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\

\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2e-281 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 74.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative74.8%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/91.4%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def91.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified91.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]

    if -2e-281 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0

    1. Initial program 3.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/4.8%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 99.7%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    5. Step-by-step derivation
      1. associate--l+99.7%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/99.7%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/99.7%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub99.7%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}} \]
      5. distribute-lft-out--99.7%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      6. associate-*r/99.7%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. distribute-rgt-out--99.7%

        \[\leadsto t + -1 \cdot \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      8. mul-1-neg99.7%

        \[\leadsto t + \color{blue}{\left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)} \]
      9. unsub-neg99.7%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*99.7%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Simplified99.7%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification92.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq -2 \cdot 10^{-281} \lor \neg \left(x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \end{array} \]

Alternative 2: 91.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{-281} \lor \neg \left(t_1 \leq 0\right):\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (or (<= t_1 -2e-281) (not (<= t_1 0.0)))
     (+ x (* (- t x) (/ (- y z) (- a z))))
     (+ t (/ (- x t) (/ z (- y a)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if ((t_1 <= -2e-281) || !(t_1 <= 0.0)) {
		tmp = x + ((t - x) * ((y - z) / (a - z)));
	} else {
		tmp = t + ((x - t) / (z / (y - a)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (((y - z) * (t - x)) / (a - z))
    if ((t_1 <= (-2d-281)) .or. (.not. (t_1 <= 0.0d0))) then
        tmp = x + ((t - x) * ((y - z) / (a - z)))
    else
        tmp = t + ((x - t) / (z / (y - a)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if ((t_1 <= -2e-281) || !(t_1 <= 0.0)) {
		tmp = x + ((t - x) * ((y - z) / (a - z)));
	} else {
		tmp = t + ((x - t) / (z / (y - a)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (((y - z) * (t - x)) / (a - z))
	tmp = 0
	if (t_1 <= -2e-281) or not (t_1 <= 0.0):
		tmp = x + ((t - x) * ((y - z) / (a - z)))
	else:
		tmp = t + ((x - t) / (z / (y - a)))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if ((t_1 <= -2e-281) || !(t_1 <= 0.0))
		tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / Float64(a - z))));
	else
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (((y - z) * (t - x)) / (a - z));
	tmp = 0.0;
	if ((t_1 <= -2e-281) || ~((t_1 <= 0.0)))
		tmp = x + ((t - x) * ((y - z) / (a - z)));
	else
		tmp = t + ((x - t) / (z / (y - a)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-281], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-281} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\

\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2e-281 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 74.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/91.4%

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

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

    if -2e-281 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0

    1. Initial program 3.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/4.8%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 99.7%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    5. Step-by-step derivation
      1. associate--l+99.7%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/99.7%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/99.7%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub99.7%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}} \]
      5. distribute-lft-out--99.7%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      6. associate-*r/99.7%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. distribute-rgt-out--99.7%

        \[\leadsto t + -1 \cdot \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      8. mul-1-neg99.7%

        \[\leadsto t + \color{blue}{\left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)} \]
      9. unsub-neg99.7%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*99.7%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Simplified99.7%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification91.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq -2 \cdot 10^{-281} \lor \neg \left(x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq 0\right):\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \end{array} \]

Alternative 3: 50.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.95 \cdot 10^{+122}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+80}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{+24}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -11.5:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-26}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-73}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-149}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t}}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+146}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.95e+122)
   t
   (if (<= z -5e+80)
     (* (- y a) (/ x z))
     (if (<= z -3.3e+24)
       (+ x t)
       (if (<= z -11.5)
         (* y (/ (- t x) a))
         (if (<= z -4.6e-26)
           (/ x (/ z (- y a)))
           (if (<= z -1.35e-73)
             (- x (/ x (/ a y)))
             (if (<= z -2.6e-149)
               (/ y (/ (- a z) t))
               (if (<= z 1.4e+146) (+ x (/ t (/ a y))) t)))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.95e+122) {
		tmp = t;
	} else if (z <= -5e+80) {
		tmp = (y - a) * (x / z);
	} else if (z <= -3.3e+24) {
		tmp = x + t;
	} else if (z <= -11.5) {
		tmp = y * ((t - x) / a);
	} else if (z <= -4.6e-26) {
		tmp = x / (z / (y - a));
	} else if (z <= -1.35e-73) {
		tmp = x - (x / (a / y));
	} else if (z <= -2.6e-149) {
		tmp = y / ((a - z) / t);
	} else if (z <= 1.4e+146) {
		tmp = x + (t / (a / y));
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-2.95d+122)) then
        tmp = t
    else if (z <= (-5d+80)) then
        tmp = (y - a) * (x / z)
    else if (z <= (-3.3d+24)) then
        tmp = x + t
    else if (z <= (-11.5d0)) then
        tmp = y * ((t - x) / a)
    else if (z <= (-4.6d-26)) then
        tmp = x / (z / (y - a))
    else if (z <= (-1.35d-73)) then
        tmp = x - (x / (a / y))
    else if (z <= (-2.6d-149)) then
        tmp = y / ((a - z) / t)
    else if (z <= 1.4d+146) then
        tmp = x + (t / (a / y))
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.95e+122) {
		tmp = t;
	} else if (z <= -5e+80) {
		tmp = (y - a) * (x / z);
	} else if (z <= -3.3e+24) {
		tmp = x + t;
	} else if (z <= -11.5) {
		tmp = y * ((t - x) / a);
	} else if (z <= -4.6e-26) {
		tmp = x / (z / (y - a));
	} else if (z <= -1.35e-73) {
		tmp = x - (x / (a / y));
	} else if (z <= -2.6e-149) {
		tmp = y / ((a - z) / t);
	} else if (z <= 1.4e+146) {
		tmp = x + (t / (a / y));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.95e+122:
		tmp = t
	elif z <= -5e+80:
		tmp = (y - a) * (x / z)
	elif z <= -3.3e+24:
		tmp = x + t
	elif z <= -11.5:
		tmp = y * ((t - x) / a)
	elif z <= -4.6e-26:
		tmp = x / (z / (y - a))
	elif z <= -1.35e-73:
		tmp = x - (x / (a / y))
	elif z <= -2.6e-149:
		tmp = y / ((a - z) / t)
	elif z <= 1.4e+146:
		tmp = x + (t / (a / y))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.95e+122)
		tmp = t;
	elseif (z <= -5e+80)
		tmp = Float64(Float64(y - a) * Float64(x / z));
	elseif (z <= -3.3e+24)
		tmp = Float64(x + t);
	elseif (z <= -11.5)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= -4.6e-26)
		tmp = Float64(x / Float64(z / Float64(y - a)));
	elseif (z <= -1.35e-73)
		tmp = Float64(x - Float64(x / Float64(a / y)));
	elseif (z <= -2.6e-149)
		tmp = Float64(y / Float64(Float64(a - z) / t));
	elseif (z <= 1.4e+146)
		tmp = Float64(x + Float64(t / Float64(a / y)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2.95e+122)
		tmp = t;
	elseif (z <= -5e+80)
		tmp = (y - a) * (x / z);
	elseif (z <= -3.3e+24)
		tmp = x + t;
	elseif (z <= -11.5)
		tmp = y * ((t - x) / a);
	elseif (z <= -4.6e-26)
		tmp = x / (z / (y - a));
	elseif (z <= -1.35e-73)
		tmp = x - (x / (a / y));
	elseif (z <= -2.6e-149)
		tmp = y / ((a - z) / t);
	elseif (z <= 1.4e+146)
		tmp = x + (t / (a / y));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.95e+122], t, If[LessEqual[z, -5e+80], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.3e+24], N[(x + t), $MachinePrecision], If[LessEqual[z, -11.5], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.6e-26], N[(x / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.35e-73], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e-149], N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+146], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.95 \cdot 10^{+122}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -5 \cdot 10^{+80}:\\
\;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\

\mathbf{elif}\;z \leq -3.3 \cdot 10^{+24}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;z \leq -11.5:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\

\mathbf{elif}\;z \leq -4.6 \cdot 10^{-26}:\\
\;\;\;\;\frac{x}{\frac{z}{y - a}}\\

\mathbf{elif}\;z \leq -1.35 \cdot 10^{-73}:\\
\;\;\;\;x - \frac{x}{\frac{a}{y}}\\

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-149}:\\
\;\;\;\;\frac{y}{\frac{a - z}{t}}\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+146}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if z < -2.95000000000000016e122 or 1.4e146 < z

    1. Initial program 29.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/70.0%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 60.0%

      \[\leadsto \color{blue}{t} \]

    if -2.95000000000000016e122 < z < -4.99999999999999961e80

    1. Initial program 51.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/61.1%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 60.8%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    5. Step-by-step derivation
      1. associate--l+60.8%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/60.8%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/60.8%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub60.8%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}} \]
      5. distribute-lft-out--60.8%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      6. associate-*r/60.8%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. distribute-rgt-out--60.8%

        \[\leadsto t + -1 \cdot \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      8. mul-1-neg60.8%

        \[\leadsto t + \color{blue}{\left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)} \]
      9. unsub-neg60.8%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*69.8%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Simplified69.8%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    7. Taylor expanded in t around 0 49.4%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    8. Step-by-step derivation
      1. associate-/l*58.5%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
      2. associate-/r/58.6%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - a\right)} \]
    9. Simplified58.6%

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

    if -4.99999999999999961e80 < z < -3.2999999999999999e24

    1. Initial program 90.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*92.6%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified92.6%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Step-by-step derivation
      1. clear-num90.9%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
      2. inv-pow90.9%

        \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    5. Applied egg-rr90.9%

      \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    6. Step-by-step derivation
      1. unpow-190.9%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    7. Simplified90.9%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    8. Taylor expanded in t around inf 76.5%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    9. Taylor expanded in z around inf 37.7%

      \[\leadsto x + \color{blue}{t} \]

    if -3.2999999999999999e24 < z < -11.5

    1. Initial program 81.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/100.0%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 62.0%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*80.1%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified80.1%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in y around inf 80.1%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a} - \frac{x}{a}\right)} \]
    8. Step-by-step derivation
      1. div-sub80.1%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    9. Simplified80.1%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} \]

    if -11.5 < z < -4.60000000000000018e-26

    1. Initial program 82.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/80.1%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 59.9%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    5. Step-by-step derivation
      1. associate--l+59.9%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/59.9%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/59.9%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub59.9%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}} \]
      5. distribute-lft-out--59.9%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      6. associate-*r/59.9%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. distribute-rgt-out--59.9%

        \[\leadsto t + -1 \cdot \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      8. mul-1-neg59.9%

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

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*60.3%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Simplified60.3%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    7. Taylor expanded in t around 0 41.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    8. Step-by-step derivation
      1. associate-/l*60.8%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    9. Simplified60.8%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]

    if -4.60000000000000018e-26 < z < -1.34999999999999997e-73

    1. Initial program 85.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/99.8%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 51.7%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*64.9%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified64.9%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in t around 0 44.3%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    8. Step-by-step derivation
      1. mul-1-neg44.3%

        \[\leadsto x + \color{blue}{\left(-\frac{x \cdot y}{a}\right)} \]
      2. unsub-neg44.3%

        \[\leadsto \color{blue}{x - \frac{x \cdot y}{a}} \]
      3. associate-/l*51.1%

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{y}}} \]
    9. Simplified51.1%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a}{y}}} \]

    if -1.34999999999999997e-73 < z < -2.59999999999999999e-149

    1. Initial program 92.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/92.6%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Step-by-step derivation
      1. associate-*l/92.8%

        \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
      2. clear-num92.9%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
      3. associate-/r*92.6%

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{a - z}{y - z}}{t - x}}} \]
    5. Applied egg-rr92.6%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - z}{y - z}}{t - x}}} \]
    6. Taylor expanded in y around -inf 69.4%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    7. Step-by-step derivation
      1. associate-/l*76.4%

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
    8. Simplified76.4%

      \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
    9. Taylor expanded in t around inf 69.3%

      \[\leadsto \frac{y}{\color{blue}{\frac{a - z}{t}}} \]

    if -2.59999999999999999e-149 < z < 1.4e146

    1. Initial program 85.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/92.4%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 73.7%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*77.5%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified77.5%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in t around inf 64.7%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*67.9%

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    9. Simplified67.9%

      \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
  3. Recombined 8 regimes into one program.
  4. Final simplification63.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.95 \cdot 10^{+122}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+80}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{+24}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -11.5:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-26}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-73}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-149}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t}}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+146}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 4: 50.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+120}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{+82}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;z \leq -3 \cdot 10^{+23}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -0.0065:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq -4.3 \cdot 10^{-26}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-73}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-149}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t}}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+146}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -9.5e+120)
   t
   (if (<= z -1.16e+82)
     (/ (* x (- y a)) z)
     (if (<= z -3e+23)
       (+ x t)
       (if (<= z -0.0065)
         (* y (/ (- t x) a))
         (if (<= z -4.3e-26)
           (/ x (/ z (- y a)))
           (if (<= z -1.35e-73)
             (- x (/ x (/ a y)))
             (if (<= z -2.6e-149)
               (/ y (/ (- a z) t))
               (if (<= z 1.2e+146) (+ x (/ t (/ a y))) t)))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -9.5e+120) {
		tmp = t;
	} else if (z <= -1.16e+82) {
		tmp = (x * (y - a)) / z;
	} else if (z <= -3e+23) {
		tmp = x + t;
	} else if (z <= -0.0065) {
		tmp = y * ((t - x) / a);
	} else if (z <= -4.3e-26) {
		tmp = x / (z / (y - a));
	} else if (z <= -1.35e-73) {
		tmp = x - (x / (a / y));
	} else if (z <= -2.6e-149) {
		tmp = y / ((a - z) / t);
	} else if (z <= 1.2e+146) {
		tmp = x + (t / (a / y));
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-9.5d+120)) then
        tmp = t
    else if (z <= (-1.16d+82)) then
        tmp = (x * (y - a)) / z
    else if (z <= (-3d+23)) then
        tmp = x + t
    else if (z <= (-0.0065d0)) then
        tmp = y * ((t - x) / a)
    else if (z <= (-4.3d-26)) then
        tmp = x / (z / (y - a))
    else if (z <= (-1.35d-73)) then
        tmp = x - (x / (a / y))
    else if (z <= (-2.6d-149)) then
        tmp = y / ((a - z) / t)
    else if (z <= 1.2d+146) then
        tmp = x + (t / (a / y))
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -9.5e+120) {
		tmp = t;
	} else if (z <= -1.16e+82) {
		tmp = (x * (y - a)) / z;
	} else if (z <= -3e+23) {
		tmp = x + t;
	} else if (z <= -0.0065) {
		tmp = y * ((t - x) / a);
	} else if (z <= -4.3e-26) {
		tmp = x / (z / (y - a));
	} else if (z <= -1.35e-73) {
		tmp = x - (x / (a / y));
	} else if (z <= -2.6e-149) {
		tmp = y / ((a - z) / t);
	} else if (z <= 1.2e+146) {
		tmp = x + (t / (a / y));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -9.5e+120:
		tmp = t
	elif z <= -1.16e+82:
		tmp = (x * (y - a)) / z
	elif z <= -3e+23:
		tmp = x + t
	elif z <= -0.0065:
		tmp = y * ((t - x) / a)
	elif z <= -4.3e-26:
		tmp = x / (z / (y - a))
	elif z <= -1.35e-73:
		tmp = x - (x / (a / y))
	elif z <= -2.6e-149:
		tmp = y / ((a - z) / t)
	elif z <= 1.2e+146:
		tmp = x + (t / (a / y))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -9.5e+120)
		tmp = t;
	elseif (z <= -1.16e+82)
		tmp = Float64(Float64(x * Float64(y - a)) / z);
	elseif (z <= -3e+23)
		tmp = Float64(x + t);
	elseif (z <= -0.0065)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= -4.3e-26)
		tmp = Float64(x / Float64(z / Float64(y - a)));
	elseif (z <= -1.35e-73)
		tmp = Float64(x - Float64(x / Float64(a / y)));
	elseif (z <= -2.6e-149)
		tmp = Float64(y / Float64(Float64(a - z) / t));
	elseif (z <= 1.2e+146)
		tmp = Float64(x + Float64(t / Float64(a / y)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -9.5e+120)
		tmp = t;
	elseif (z <= -1.16e+82)
		tmp = (x * (y - a)) / z;
	elseif (z <= -3e+23)
		tmp = x + t;
	elseif (z <= -0.0065)
		tmp = y * ((t - x) / a);
	elseif (z <= -4.3e-26)
		tmp = x / (z / (y - a));
	elseif (z <= -1.35e-73)
		tmp = x - (x / (a / y));
	elseif (z <= -2.6e-149)
		tmp = y / ((a - z) / t);
	elseif (z <= 1.2e+146)
		tmp = x + (t / (a / y));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e+120], t, If[LessEqual[z, -1.16e+82], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -3e+23], N[(x + t), $MachinePrecision], If[LessEqual[z, -0.0065], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.3e-26], N[(x / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.35e-73], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e-149], N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+146], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+120}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -1.16 \cdot 10^{+82}:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\

\mathbf{elif}\;z \leq -3 \cdot 10^{+23}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;z \leq -0.0065:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\

\mathbf{elif}\;z \leq -4.3 \cdot 10^{-26}:\\
\;\;\;\;\frac{x}{\frac{z}{y - a}}\\

\mathbf{elif}\;z \leq -1.35 \cdot 10^{-73}:\\
\;\;\;\;x - \frac{x}{\frac{a}{y}}\\

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-149}:\\
\;\;\;\;\frac{y}{\frac{a - z}{t}}\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{+146}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if z < -9.5e120 or 1.2000000000000001e146 < z

    1. Initial program 29.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/70.0%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 60.0%

      \[\leadsto \color{blue}{t} \]

    if -9.5e120 < z < -1.16e82

    1. Initial program 51.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/51.4%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 62.7%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    5. Step-by-step derivation
      1. associate--l+62.7%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/62.7%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/62.7%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub62.7%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}} \]
      5. distribute-lft-out--62.7%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      6. associate-*r/62.7%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. distribute-rgt-out--62.7%

        \[\leadsto t + -1 \cdot \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      8. mul-1-neg62.7%

        \[\leadsto t + \color{blue}{\left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)} \]
      9. unsub-neg62.7%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*62.3%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Simplified62.3%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    7. Taylor expanded in t around 0 60.8%

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

    if -1.16e82 < z < -3.0000000000000001e23

    1. Initial program 85.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*93.7%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified93.7%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Step-by-step derivation
      1. clear-num92.2%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
      2. inv-pow92.2%

        \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    5. Applied egg-rr92.2%

      \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    6. Step-by-step derivation
      1. unpow-192.2%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    7. Simplified92.2%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    8. Taylor expanded in t around inf 72.7%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    9. Taylor expanded in z around inf 39.5%

      \[\leadsto x + \color{blue}{t} \]

    if -3.0000000000000001e23 < z < -0.0064999999999999997

    1. Initial program 81.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/100.0%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 62.0%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*80.1%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified80.1%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in y around inf 80.1%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a} - \frac{x}{a}\right)} \]
    8. Step-by-step derivation
      1. div-sub80.1%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    9. Simplified80.1%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} \]

    if -0.0064999999999999997 < z < -4.29999999999999988e-26

    1. Initial program 82.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/80.1%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 59.9%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    5. Step-by-step derivation
      1. associate--l+59.9%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/59.9%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/59.9%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub59.9%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}} \]
      5. distribute-lft-out--59.9%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      6. associate-*r/59.9%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. distribute-rgt-out--59.9%

        \[\leadsto t + -1 \cdot \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      8. mul-1-neg59.9%

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

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*60.3%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Simplified60.3%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    7. Taylor expanded in t around 0 41.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    8. Step-by-step derivation
      1. associate-/l*60.8%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    9. Simplified60.8%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]

    if -4.29999999999999988e-26 < z < -1.34999999999999997e-73

    1. Initial program 85.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/99.8%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 51.7%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*64.9%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified64.9%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in t around 0 44.3%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    8. Step-by-step derivation
      1. mul-1-neg44.3%

        \[\leadsto x + \color{blue}{\left(-\frac{x \cdot y}{a}\right)} \]
      2. unsub-neg44.3%

        \[\leadsto \color{blue}{x - \frac{x \cdot y}{a}} \]
      3. associate-/l*51.1%

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{y}}} \]
    9. Simplified51.1%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a}{y}}} \]

    if -1.34999999999999997e-73 < z < -2.59999999999999999e-149

    1. Initial program 92.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/92.6%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Step-by-step derivation
      1. associate-*l/92.8%

        \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
      2. clear-num92.9%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
      3. associate-/r*92.6%

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{a - z}{y - z}}{t - x}}} \]
    5. Applied egg-rr92.6%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - z}{y - z}}{t - x}}} \]
    6. Taylor expanded in y around -inf 69.4%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    7. Step-by-step derivation
      1. associate-/l*76.4%

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
    8. Simplified76.4%

      \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
    9. Taylor expanded in t around inf 69.3%

      \[\leadsto \frac{y}{\color{blue}{\frac{a - z}{t}}} \]

    if -2.59999999999999999e-149 < z < 1.2000000000000001e146

    1. Initial program 85.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/92.4%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 73.7%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*77.5%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified77.5%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in t around inf 64.7%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*67.9%

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    9. Simplified67.9%

      \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
  3. Recombined 8 regimes into one program.
  4. Final simplification63.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+120}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{+82}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;z \leq -3 \cdot 10^{+23}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -0.0065:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq -4.3 \cdot 10^{-26}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-73}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-149}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t}}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+146}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 5: 52.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+119}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+80}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -2.45 \cdot 10^{+26}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -0.0215:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-26}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+146}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -5e+119)
   t
   (if (<= z -5e+80)
     (* (- y a) (/ x z))
     (if (<= z -2.45e+26)
       (+ x t)
       (if (<= z -0.0215)
         (* y (/ (- t x) a))
         (if (<= z -4.6e-26)
           (/ x (/ z (- y a)))
           (if (<= z 2.2e+146) (+ x (/ t (/ a y))) t)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5e+119) {
		tmp = t;
	} else if (z <= -5e+80) {
		tmp = (y - a) * (x / z);
	} else if (z <= -2.45e+26) {
		tmp = x + t;
	} else if (z <= -0.0215) {
		tmp = y * ((t - x) / a);
	} else if (z <= -4.6e-26) {
		tmp = x / (z / (y - a));
	} else if (z <= 2.2e+146) {
		tmp = x + (t / (a / y));
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-5d+119)) then
        tmp = t
    else if (z <= (-5d+80)) then
        tmp = (y - a) * (x / z)
    else if (z <= (-2.45d+26)) then
        tmp = x + t
    else if (z <= (-0.0215d0)) then
        tmp = y * ((t - x) / a)
    else if (z <= (-4.6d-26)) then
        tmp = x / (z / (y - a))
    else if (z <= 2.2d+146) then
        tmp = x + (t / (a / y))
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5e+119) {
		tmp = t;
	} else if (z <= -5e+80) {
		tmp = (y - a) * (x / z);
	} else if (z <= -2.45e+26) {
		tmp = x + t;
	} else if (z <= -0.0215) {
		tmp = y * ((t - x) / a);
	} else if (z <= -4.6e-26) {
		tmp = x / (z / (y - a));
	} else if (z <= 2.2e+146) {
		tmp = x + (t / (a / y));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -5e+119:
		tmp = t
	elif z <= -5e+80:
		tmp = (y - a) * (x / z)
	elif z <= -2.45e+26:
		tmp = x + t
	elif z <= -0.0215:
		tmp = y * ((t - x) / a)
	elif z <= -4.6e-26:
		tmp = x / (z / (y - a))
	elif z <= 2.2e+146:
		tmp = x + (t / (a / y))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -5e+119)
		tmp = t;
	elseif (z <= -5e+80)
		tmp = Float64(Float64(y - a) * Float64(x / z));
	elseif (z <= -2.45e+26)
		tmp = Float64(x + t);
	elseif (z <= -0.0215)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= -4.6e-26)
		tmp = Float64(x / Float64(z / Float64(y - a)));
	elseif (z <= 2.2e+146)
		tmp = Float64(x + Float64(t / Float64(a / y)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -5e+119)
		tmp = t;
	elseif (z <= -5e+80)
		tmp = (y - a) * (x / z);
	elseif (z <= -2.45e+26)
		tmp = x + t;
	elseif (z <= -0.0215)
		tmp = y * ((t - x) / a);
	elseif (z <= -4.6e-26)
		tmp = x / (z / (y - a));
	elseif (z <= 2.2e+146)
		tmp = x + (t / (a / y));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e+119], t, If[LessEqual[z, -5e+80], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.45e+26], N[(x + t), $MachinePrecision], If[LessEqual[z, -0.0215], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.6e-26], N[(x / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+146], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+119}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -5 \cdot 10^{+80}:\\
\;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\

\mathbf{elif}\;z \leq -2.45 \cdot 10^{+26}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;z \leq -0.0215:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\

\mathbf{elif}\;z \leq -4.6 \cdot 10^{-26}:\\
\;\;\;\;\frac{x}{\frac{z}{y - a}}\\

\mathbf{elif}\;z \leq 2.2 \cdot 10^{+146}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -4.9999999999999999e119 or 2.1999999999999998e146 < z

    1. Initial program 29.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/70.0%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 60.0%

      \[\leadsto \color{blue}{t} \]

    if -4.9999999999999999e119 < z < -4.99999999999999961e80

    1. Initial program 51.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/61.1%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 60.8%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    5. Step-by-step derivation
      1. associate--l+60.8%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/60.8%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/60.8%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub60.8%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}} \]
      5. distribute-lft-out--60.8%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      6. associate-*r/60.8%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. distribute-rgt-out--60.8%

        \[\leadsto t + -1 \cdot \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      8. mul-1-neg60.8%

        \[\leadsto t + \color{blue}{\left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)} \]
      9. unsub-neg60.8%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*69.8%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Simplified69.8%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    7. Taylor expanded in t around 0 49.4%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    8. Step-by-step derivation
      1. associate-/l*58.5%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
      2. associate-/r/58.6%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - a\right)} \]
    9. Simplified58.6%

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

    if -4.99999999999999961e80 < z < -2.44999999999999987e26

    1. Initial program 90.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*92.6%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified92.6%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Step-by-step derivation
      1. clear-num90.9%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
      2. inv-pow90.9%

        \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    5. Applied egg-rr90.9%

      \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    6. Step-by-step derivation
      1. unpow-190.9%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    7. Simplified90.9%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    8. Taylor expanded in t around inf 76.5%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    9. Taylor expanded in z around inf 37.7%

      \[\leadsto x + \color{blue}{t} \]

    if -2.44999999999999987e26 < z < -0.021499999999999998

    1. Initial program 81.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/100.0%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 62.0%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*80.1%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified80.1%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in y around inf 80.1%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a} - \frac{x}{a}\right)} \]
    8. Step-by-step derivation
      1. div-sub80.1%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    9. Simplified80.1%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} \]

    if -0.021499999999999998 < z < -4.60000000000000018e-26

    1. Initial program 82.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/80.1%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 59.9%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    5. Step-by-step derivation
      1. associate--l+59.9%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/59.9%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/59.9%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub59.9%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}} \]
      5. distribute-lft-out--59.9%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      6. associate-*r/59.9%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. distribute-rgt-out--59.9%

        \[\leadsto t + -1 \cdot \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      8. mul-1-neg59.9%

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

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*60.3%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Simplified60.3%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    7. Taylor expanded in t around 0 41.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    8. Step-by-step derivation
      1. associate-/l*60.8%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    9. Simplified60.8%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]

    if -4.60000000000000018e-26 < z < 2.1999999999999998e146

    1. Initial program 86.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/93.1%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 70.0%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*75.0%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified75.0%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in t around inf 60.3%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*63.5%

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    9. Simplified63.5%

      \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification61.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+119}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+80}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -2.45 \cdot 10^{+26}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -0.0215:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-26}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+146}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 6: 65.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -2.55 \cdot 10^{+26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-152}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-41}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+173}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t + \left(t - x\right) \cdot \frac{a}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= z -2.55e+26)
     t_1
     (if (<= z -6.4e-152)
       (* y (/ (- t x) (- a z)))
       (if (<= z 2.8e-41)
         (+ x (* (- t x) (/ y a)))
         (if (<= z 3e+173) t_1 (+ t (* (- t x) (/ a z)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -2.55e+26) {
		tmp = t_1;
	} else if (z <= -6.4e-152) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 2.8e-41) {
		tmp = x + ((t - x) * (y / a));
	} else if (z <= 3e+173) {
		tmp = t_1;
	} else {
		tmp = t + ((t - x) * (a / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (z <= (-2.55d+26)) then
        tmp = t_1
    else if (z <= (-6.4d-152)) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 2.8d-41) then
        tmp = x + ((t - x) * (y / a))
    else if (z <= 3d+173) then
        tmp = t_1
    else
        tmp = t + ((t - x) * (a / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -2.55e+26) {
		tmp = t_1;
	} else if (z <= -6.4e-152) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 2.8e-41) {
		tmp = x + ((t - x) * (y / a));
	} else if (z <= 3e+173) {
		tmp = t_1;
	} else {
		tmp = t + ((t - x) * (a / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -2.55e+26:
		tmp = t_1
	elif z <= -6.4e-152:
		tmp = y * ((t - x) / (a - z))
	elif z <= 2.8e-41:
		tmp = x + ((t - x) * (y / a))
	elif z <= 3e+173:
		tmp = t_1
	else:
		tmp = t + ((t - x) * (a / z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -2.55e+26)
		tmp = t_1;
	elseif (z <= -6.4e-152)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 2.8e-41)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	elseif (z <= 3e+173)
		tmp = t_1;
	else
		tmp = Float64(t + Float64(Float64(t - x) * Float64(a / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -2.55e+26)
		tmp = t_1;
	elseif (z <= -6.4e-152)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 2.8e-41)
		tmp = x + ((t - x) * (y / a));
	elseif (z <= 3e+173)
		tmp = t_1;
	else
		tmp = t + ((t - x) * (a / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.55e+26], t$95$1, If[LessEqual[z, -6.4e-152], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-41], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+173], t$95$1, N[(t + N[(N[(t - x), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -2.55 \cdot 10^{+26}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -6.4 \cdot 10^{-152}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-41}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq 3 \cdot 10^{+173}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.5499999999999999e26 or 2.8000000000000002e-41 < z < 2.9999999999999998e173

    1. Initial program 55.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/78.2%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in x around 0 44.6%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    5. Step-by-step derivation
      1. associate-*r/60.4%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    6. Simplified60.4%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if -2.5499999999999999e26 < z < -6.40000000000000025e-152

    1. Initial program 87.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/94.6%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in y around inf 70.5%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    5. Step-by-step derivation
      1. div-sub73.2%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    6. Simplified73.2%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]

    if -6.40000000000000025e-152 < z < 2.8000000000000002e-41

    1. Initial program 94.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/97.7%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 93.8%

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

    if 2.9999999999999998e173 < z

    1. Initial program 21.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/61.4%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 65.5%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    5. Step-by-step derivation
      1. associate--l+65.5%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/65.5%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/65.5%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub65.5%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}} \]
      5. distribute-lft-out--65.5%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      6. associate-*r/65.5%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. distribute-rgt-out--65.6%

        \[\leadsto t + -1 \cdot \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      8. mul-1-neg65.6%

        \[\leadsto t + \color{blue}{\left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)} \]
      9. unsub-neg65.6%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*85.6%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Simplified85.6%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    7. Taylor expanded in y around 0 58.4%

      \[\leadsto \color{blue}{t - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    8. Step-by-step derivation
      1. mul-1-neg58.4%

        \[\leadsto t - \color{blue}{\left(-\frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-/l*81.8%

        \[\leadsto t - \left(-\color{blue}{\frac{a}{\frac{z}{t - x}}}\right) \]
      3. distribute-frac-neg81.8%

        \[\leadsto t - \color{blue}{\frac{-a}{\frac{z}{t - x}}} \]
      4. associate-/r/82.2%

        \[\leadsto t - \color{blue}{\frac{-a}{z} \cdot \left(t - x\right)} \]
      5. distribute-frac-neg82.2%

        \[\leadsto t - \color{blue}{\left(-\frac{a}{z}\right)} \cdot \left(t - x\right) \]
      6. cancel-sign-sub82.2%

        \[\leadsto \color{blue}{t + \frac{a}{z} \cdot \left(t - x\right)} \]
    9. Simplified82.2%

      \[\leadsto \color{blue}{t + \frac{a}{z} \cdot \left(t - x\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification76.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.55 \cdot 10^{+26}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-152}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-41}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+173}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \left(t - x\right) \cdot \frac{a}{z}\\ \end{array} \]

Alternative 7: 72.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{-37} \lor \neg \left(a \leq 6.6 \cdot 10^{-122}\right):\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= a -1.6e-37) (not (<= a 6.6e-122)))
   (+ x (/ (- t x) (/ a (- y z))))
   (- t (/ y (/ z (- t x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -1.6e-37) || !(a <= 6.6e-122)) {
		tmp = x + ((t - x) / (a / (y - z)));
	} else {
		tmp = t - (y / (z / (t - x)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((a <= (-1.6d-37)) .or. (.not. (a <= 6.6d-122))) then
        tmp = x + ((t - x) / (a / (y - z)))
    else
        tmp = t - (y / (z / (t - x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -1.6e-37) || !(a <= 6.6e-122)) {
		tmp = x + ((t - x) / (a / (y - z)));
	} else {
		tmp = t - (y / (z / (t - x)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -1.6e-37) or not (a <= 6.6e-122):
		tmp = x + ((t - x) / (a / (y - z)))
	else:
		tmp = t - (y / (z / (t - x)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -1.6e-37) || !(a <= 6.6e-122))
		tmp = Float64(x + Float64(Float64(t - x) / Float64(a / Float64(y - z))));
	else
		tmp = Float64(t - Float64(y / Float64(z / Float64(t - x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a <= -1.6e-37) || ~((a <= 6.6e-122)))
		tmp = x + ((t - x) / (a / (y - z)));
	else
		tmp = t - (y / (z / (t - x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.6e-37], N[Not[LessEqual[a, 6.6e-122]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(y / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-37} \lor \neg \left(a \leq 6.6 \cdot 10^{-122}\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\

\mathbf{else}:\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.5999999999999999e-37 or 6.59999999999999999e-122 < a

    1. Initial program 72.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/91.1%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in a around inf 66.0%

      \[\leadsto \color{blue}{x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*76.2%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
    6. Simplified76.2%

      \[\leadsto \color{blue}{x + \frac{t - x}{\frac{a}{y - z}}} \]

    if -1.5999999999999999e-37 < a < 6.59999999999999999e-122

    1. Initial program 65.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. *-commutative65.0%

        \[\leadsto x + \frac{\color{blue}{\left(t - x\right) \cdot \left(y - z\right)}}{a - z} \]
      2. sub-neg65.0%

        \[\leadsto x + \frac{\left(t - x\right) \cdot \color{blue}{\left(y + \left(-z\right)\right)}}{a - z} \]
      3. distribute-lft-in65.1%

        \[\leadsto x + \frac{\color{blue}{\left(t - x\right) \cdot y + \left(t - x\right) \cdot \left(-z\right)}}{a - z} \]
    3. Applied egg-rr65.1%

      \[\leadsto x + \frac{\color{blue}{\left(t - x\right) \cdot y + \left(t - x\right) \cdot \left(-z\right)}}{a - z} \]
    4. Taylor expanded in a around 0 77.3%

      \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}} \]
    5. Step-by-step derivation
      1. mul-1-neg77.3%

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

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right)}{z}} \]
      3. associate-/l*78.4%

        \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{t - x}}} \]
    6. Simplified78.4%

      \[\leadsto \color{blue}{t - \frac{y}{\frac{z}{t - x}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification77.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{-37} \lor \neg \left(a \leq 6.6 \cdot 10^{-122}\right):\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \end{array} \]

Alternative 8: 71.9% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{-80} \lor \neg \left(t \leq 7.6 \cdot 10^{-53}\right):\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -3.2e-80) (not (<= t 7.6e-53)))
   (+ x (/ (- y z) (/ (- a z) t)))
   (* x (+ (/ (- z y) (- a z)) 1.0))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -3.2e-80) || !(t <= 7.6e-53)) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else {
		tmp = x * (((z - y) / (a - z)) + 1.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-3.2d-80)) .or. (.not. (t <= 7.6d-53))) then
        tmp = x + ((y - z) / ((a - z) / t))
    else
        tmp = x * (((z - y) / (a - z)) + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -3.2e-80) || !(t <= 7.6e-53)) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else {
		tmp = x * (((z - y) / (a - z)) + 1.0);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -3.2e-80) or not (t <= 7.6e-53):
		tmp = x + ((y - z) / ((a - z) / t))
	else:
		tmp = x * (((z - y) / (a - z)) + 1.0)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -3.2e-80) || !(t <= 7.6e-53))
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t)));
	else
		tmp = Float64(x * Float64(Float64(Float64(z - y) / Float64(a - z)) + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -3.2e-80) || ~((t <= 7.6e-53)))
		tmp = x + ((y - z) / ((a - z) / t));
	else
		tmp = x * (((z - y) / (a - z)) + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.2e-80], N[Not[LessEqual[t, 7.6e-53]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-80} \lor \neg \left(t \leq 7.6 \cdot 10^{-53}\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.1999999999999999e-80 or 7.5999999999999995e-53 < t

    1. Initial program 69.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*88.5%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified88.5%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Step-by-step derivation
      1. clear-num87.8%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
      2. inv-pow87.8%

        \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    5. Applied egg-rr87.8%

      \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    6. Step-by-step derivation
      1. unpow-187.8%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    7. Simplified87.8%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    8. Taylor expanded in t around inf 83.1%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]

    if -3.1999999999999999e-80 < t < 7.5999999999999995e-53

    1. Initial program 71.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/76.9%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in x around inf 69.4%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y - z}{a - z}\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg69.4%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y - z}{a - z}\right)}\right) \]
      2. unsub-neg69.4%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y - z}{a - z}\right)} \]
    6. Simplified69.4%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y - z}{a - z}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification78.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{-80} \lor \neg \left(t \leq 7.6 \cdot 10^{-53}\right):\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \end{array} \]

Alternative 9: 71.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{-41} \lor \neg \left(a \leq 6.6 \cdot 10^{-122}\right):\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{\left(y - a\right) \cdot \left(x - t\right)}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= a -2e-41) (not (<= a 6.6e-122)))
   (+ x (/ (- t x) (/ a (- y z))))
   (+ t (/ (* (- y a) (- x t)) z))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -2e-41) || !(a <= 6.6e-122)) {
		tmp = x + ((t - x) / (a / (y - z)));
	} else {
		tmp = t + (((y - a) * (x - t)) / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((a <= (-2d-41)) .or. (.not. (a <= 6.6d-122))) then
        tmp = x + ((t - x) / (a / (y - z)))
    else
        tmp = t + (((y - a) * (x - t)) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -2e-41) || !(a <= 6.6e-122)) {
		tmp = x + ((t - x) / (a / (y - z)));
	} else {
		tmp = t + (((y - a) * (x - t)) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -2e-41) or not (a <= 6.6e-122):
		tmp = x + ((t - x) / (a / (y - z)))
	else:
		tmp = t + (((y - a) * (x - t)) / z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -2e-41) || !(a <= 6.6e-122))
		tmp = Float64(x + Float64(Float64(t - x) / Float64(a / Float64(y - z))));
	else
		tmp = Float64(t + Float64(Float64(Float64(y - a) * Float64(x - t)) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a <= -2e-41) || ~((a <= 6.6e-122)))
		tmp = x + ((t - x) / (a / (y - z)));
	else
		tmp = t + (((y - a) * (x - t)) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2e-41], N[Not[LessEqual[a, 6.6e-122]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(y - a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-41} \lor \neg \left(a \leq 6.6 \cdot 10^{-122}\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.00000000000000001e-41 or 6.59999999999999999e-122 < a

    1. Initial program 72.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/91.1%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in a around inf 66.0%

      \[\leadsto \color{blue}{x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*76.2%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
    6. Simplified76.2%

      \[\leadsto \color{blue}{x + \frac{t - x}{\frac{a}{y - z}}} \]

    if -2.00000000000000001e-41 < a < 6.59999999999999999e-122

    1. Initial program 65.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative65.0%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/75.5%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def75.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified75.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around -inf 82.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{-41} \lor \neg \left(a \leq 6.6 \cdot 10^{-122}\right):\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{\left(y - a\right) \cdot \left(x - t\right)}{z}\\ \end{array} \]

Alternative 10: 53.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+119}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{+45}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+146}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.85e+119)
   t
   (if (<= z -5.4e+45)
     (* (- y a) (/ x z))
     (if (<= z 1.3e+146) (+ x (/ t (/ a y))) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.85e+119) {
		tmp = t;
	} else if (z <= -5.4e+45) {
		tmp = (y - a) * (x / z);
	} else if (z <= 1.3e+146) {
		tmp = x + (t / (a / y));
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1.85d+119)) then
        tmp = t
    else if (z <= (-5.4d+45)) then
        tmp = (y - a) * (x / z)
    else if (z <= 1.3d+146) then
        tmp = x + (t / (a / y))
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.85e+119) {
		tmp = t;
	} else if (z <= -5.4e+45) {
		tmp = (y - a) * (x / z);
	} else if (z <= 1.3e+146) {
		tmp = x + (t / (a / y));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.85e+119:
		tmp = t
	elif z <= -5.4e+45:
		tmp = (y - a) * (x / z)
	elif z <= 1.3e+146:
		tmp = x + (t / (a / y))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.85e+119)
		tmp = t;
	elseif (z <= -5.4e+45)
		tmp = Float64(Float64(y - a) * Float64(x / z));
	elseif (z <= 1.3e+146)
		tmp = Float64(x + Float64(t / Float64(a / y)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.85e+119)
		tmp = t;
	elseif (z <= -5.4e+45)
		tmp = (y - a) * (x / z);
	elseif (z <= 1.3e+146)
		tmp = x + (t / (a / y));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.85e+119], t, If[LessEqual[z, -5.4e+45], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+146], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+119}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -5.4 \cdot 10^{+45}:\\
\;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+146}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.85e119 or 1.30000000000000007e146 < z

    1. Initial program 29.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/70.0%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 60.0%

      \[\leadsto \color{blue}{t} \]

    if -1.85e119 < z < -5.39999999999999968e45

    1. Initial program 65.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/72.0%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 60.9%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    5. Step-by-step derivation
      1. associate--l+60.9%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/60.9%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/60.9%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub60.9%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}} \]
      5. distribute-lft-out--60.9%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      6. associate-*r/60.9%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. distribute-rgt-out--60.9%

        \[\leadsto t + -1 \cdot \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      8. mul-1-neg60.9%

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

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*66.2%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Simplified66.2%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    7. Taylor expanded in t around 0 36.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    8. Step-by-step derivation
      1. associate-/l*42.3%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
      2. associate-/r/42.3%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - a\right)} \]
    9. Simplified42.3%

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

    if -5.39999999999999968e45 < z < 1.30000000000000007e146

    1. Initial program 86.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/93.1%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 68.1%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*73.2%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified73.2%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in t around inf 57.7%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*61.1%

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    9. Simplified61.1%

      \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification59.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+119}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{+45}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+146}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 11: 61.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-80} \lor \neg \left(t \leq 5.2 \cdot 10^{-72}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -2e-80) (not (<= t 5.2e-72)))
   (* t (/ (- y z) (- a z)))
   (- x (/ x (/ a y)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -2e-80) || !(t <= 5.2e-72)) {
		tmp = t * ((y - z) / (a - z));
	} else {
		tmp = x - (x / (a / y));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-2d-80)) .or. (.not. (t <= 5.2d-72))) then
        tmp = t * ((y - z) / (a - z))
    else
        tmp = x - (x / (a / y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -2e-80) || !(t <= 5.2e-72)) {
		tmp = t * ((y - z) / (a - z));
	} else {
		tmp = x - (x / (a / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -2e-80) or not (t <= 5.2e-72):
		tmp = t * ((y - z) / (a - z))
	else:
		tmp = x - (x / (a / y))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -2e-80) || !(t <= 5.2e-72))
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	else
		tmp = Float64(x - Float64(x / Float64(a / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -2e-80) || ~((t <= 5.2e-72)))
		tmp = t * ((y - z) / (a - z));
	else
		tmp = x - (x / (a / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2e-80], N[Not[LessEqual[t, 5.2e-72]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-80} \lor \neg \left(t \leq 5.2 \cdot 10^{-72}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{x}{\frac{a}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.99999999999999992e-80 or 5.19999999999999992e-72 < t

    1. Initial program 69.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/90.0%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in x around 0 55.3%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    5. Step-by-step derivation
      1. associate-*r/73.4%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    6. Simplified73.4%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if -1.99999999999999992e-80 < t < 5.19999999999999992e-72

    1. Initial program 72.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/77.7%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 62.1%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*64.2%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified64.2%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in t around 0 58.8%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    8. Step-by-step derivation
      1. mul-1-neg58.8%

        \[\leadsto x + \color{blue}{\left(-\frac{x \cdot y}{a}\right)} \]
      2. unsub-neg58.8%

        \[\leadsto \color{blue}{x - \frac{x \cdot y}{a}} \]
      3. associate-/l*61.9%

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{y}}} \]
    9. Simplified61.9%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a}{y}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification69.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-80} \lor \neg \left(t \leq 5.2 \cdot 10^{-72}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \end{array} \]

Alternative 12: 39.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{+132}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;y \leq 2.95 \cdot 10^{+118}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{+268}:\\ \;\;\;\;\frac{-x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -5.6e+132)
   (/ t (/ a y))
   (if (<= y 2.95e+118)
     (+ x t)
     (if (<= y 6.6e+268) (/ (- x) (/ a y)) (* y (/ t a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -5.6e+132) {
		tmp = t / (a / y);
	} else if (y <= 2.95e+118) {
		tmp = x + t;
	} else if (y <= 6.6e+268) {
		tmp = -x / (a / y);
	} else {
		tmp = y * (t / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (y <= (-5.6d+132)) then
        tmp = t / (a / y)
    else if (y <= 2.95d+118) then
        tmp = x + t
    else if (y <= 6.6d+268) then
        tmp = -x / (a / y)
    else
        tmp = y * (t / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -5.6e+132) {
		tmp = t / (a / y);
	} else if (y <= 2.95e+118) {
		tmp = x + t;
	} else if (y <= 6.6e+268) {
		tmp = -x / (a / y);
	} else {
		tmp = y * (t / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -5.6e+132:
		tmp = t / (a / y)
	elif y <= 2.95e+118:
		tmp = x + t
	elif y <= 6.6e+268:
		tmp = -x / (a / y)
	else:
		tmp = y * (t / a)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -5.6e+132)
		tmp = Float64(t / Float64(a / y));
	elseif (y <= 2.95e+118)
		tmp = Float64(x + t);
	elseif (y <= 6.6e+268)
		tmp = Float64(Float64(-x) / Float64(a / y));
	else
		tmp = Float64(y * Float64(t / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -5.6e+132)
		tmp = t / (a / y);
	elseif (y <= 2.95e+118)
		tmp = x + t;
	elseif (y <= 6.6e+268)
		tmp = -x / (a / y);
	else
		tmp = y * (t / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.6e+132], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.95e+118], N[(x + t), $MachinePrecision], If[LessEqual[y, 6.6e+268], N[((-x) / N[(a / y), $MachinePrecision]), $MachinePrecision], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+132}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

\mathbf{elif}\;y \leq 2.95 \cdot 10^{+118}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;y \leq 6.6 \cdot 10^{+268}:\\
\;\;\;\;\frac{-x}{\frac{a}{y}}\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.5999999999999998e132

    1. Initial program 80.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/95.8%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 52.1%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*63.5%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified63.5%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in y around inf 55.2%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a} - \frac{x}{a}\right)} \]
    8. Step-by-step derivation
      1. div-sub55.2%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    9. Simplified55.2%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} \]
    10. Taylor expanded in t around inf 40.3%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    11. Step-by-step derivation
      1. associate-/l*51.0%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    12. Simplified51.0%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]

    if -5.5999999999999998e132 < y < 2.9499999999999999e118

    1. Initial program 66.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*79.2%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified79.2%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Step-by-step derivation
      1. clear-num78.7%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
      2. inv-pow78.7%

        \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    5. Applied egg-rr78.7%

      \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    6. Step-by-step derivation
      1. unpow-178.7%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    7. Simplified78.7%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    8. Taylor expanded in t around inf 71.1%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    9. Taylor expanded in z around inf 43.6%

      \[\leadsto x + \color{blue}{t} \]

    if 2.9499999999999999e118 < y < 6.6000000000000002e268

    1. Initial program 74.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/96.8%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 58.6%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*70.2%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified70.2%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in y around inf 61.2%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a} - \frac{x}{a}\right)} \]
    8. Step-by-step derivation
      1. div-sub67.2%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    9. Simplified67.2%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} \]
    10. Taylor expanded in t around 0 48.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a}} \]
    11. Step-by-step derivation
      1. mul-1-neg48.5%

        \[\leadsto \color{blue}{-\frac{x \cdot y}{a}} \]
      2. associate-/l*54.2%

        \[\leadsto -\color{blue}{\frac{x}{\frac{a}{y}}} \]
    12. Simplified54.2%

      \[\leadsto \color{blue}{-\frac{x}{\frac{a}{y}}} \]

    if 6.6000000000000002e268 < y

    1. Initial program 100.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/100.0%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 87.5%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*87.5%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified87.5%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in y around inf 87.5%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a} - \frac{x}{a}\right)} \]
    8. Step-by-step derivation
      1. div-sub87.5%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    9. Simplified87.5%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} \]
    10. Taylor expanded in t around inf 87.5%

      \[\leadsto y \cdot \color{blue}{\frac{t}{a}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification47.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{+132}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;y \leq 2.95 \cdot 10^{+118}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{+268}:\\ \;\;\;\;\frac{-x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \end{array} \]

Alternative 13: 44.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+44} \lor \neg \left(y \leq 2.5 \cdot 10^{+118}\right):\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= y -3.2e+44) (not (<= y 2.5e+118))) (* y (/ (- t x) a)) (+ x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -3.2e+44) || !(y <= 2.5e+118)) {
		tmp = y * ((t - x) / a);
	} else {
		tmp = x + t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((y <= (-3.2d+44)) .or. (.not. (y <= 2.5d+118))) then
        tmp = y * ((t - x) / a)
    else
        tmp = x + t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -3.2e+44) || !(y <= 2.5e+118)) {
		tmp = y * ((t - x) / a);
	} else {
		tmp = x + t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (y <= -3.2e+44) or not (y <= 2.5e+118):
		tmp = y * ((t - x) / a)
	else:
		tmp = x + t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((y <= -3.2e+44) || !(y <= 2.5e+118))
		tmp = Float64(y * Float64(Float64(t - x) / a));
	else
		tmp = Float64(x + t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((y <= -3.2e+44) || ~((y <= 2.5e+118)))
		tmp = y * ((t - x) / a);
	else
		tmp = x + t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.2e+44], N[Not[LessEqual[y, 2.5e+118]], $MachinePrecision]], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+44} \lor \neg \left(y \leq 2.5 \cdot 10^{+118}\right):\\
\;\;\;\;y \cdot \frac{t - x}{a}\\

\mathbf{else}:\\
\;\;\;\;x + t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.20000000000000004e44 or 2.49999999999999986e118 < y

    1. Initial program 77.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/94.3%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 57.6%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*68.1%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified68.1%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in y around inf 57.7%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a} - \frac{x}{a}\right)} \]
    8. Step-by-step derivation
      1. div-sub59.9%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    9. Simplified59.9%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} \]

    if -3.20000000000000004e44 < y < 2.49999999999999986e118

    1. Initial program 66.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*78.0%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified78.0%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Step-by-step derivation
      1. clear-num77.4%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
      2. inv-pow77.4%

        \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    5. Applied egg-rr77.4%

      \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    6. Step-by-step derivation
      1. unpow-177.4%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    7. Simplified77.4%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    8. Taylor expanded in t around inf 74.8%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    9. Taylor expanded in z around inf 46.8%

      \[\leadsto x + \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+44} \lor \neg \left(y \leq 2.5 \cdot 10^{+118}\right):\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 14: 39.6% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+132} \lor \neg \left(y \leq 4.8 \cdot 10^{+138}\right):\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= y -6.5e+132) (not (<= y 4.8e+138))) (* y (/ t a)) (+ x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -6.5e+132) || !(y <= 4.8e+138)) {
		tmp = y * (t / a);
	} else {
		tmp = x + t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((y <= (-6.5d+132)) .or. (.not. (y <= 4.8d+138))) then
        tmp = y * (t / a)
    else
        tmp = x + t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -6.5e+132) || !(y <= 4.8e+138)) {
		tmp = y * (t / a);
	} else {
		tmp = x + t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (y <= -6.5e+132) or not (y <= 4.8e+138):
		tmp = y * (t / a)
	else:
		tmp = x + t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((y <= -6.5e+132) || !(y <= 4.8e+138))
		tmp = Float64(y * Float64(t / a));
	else
		tmp = Float64(x + t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((y <= -6.5e+132) || ~((y <= 4.8e+138)))
		tmp = y * (t / a);
	else
		tmp = x + t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -6.5e+132], N[Not[LessEqual[y, 4.8e+138]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+132} \lor \neg \left(y \leq 4.8 \cdot 10^{+138}\right):\\
\;\;\;\;y \cdot \frac{t}{a}\\

\mathbf{else}:\\
\;\;\;\;x + t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.4999999999999994e132 or 4.8000000000000002e138 < y

    1. Initial program 79.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/96.6%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 60.4%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*71.1%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified71.1%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in y around inf 62.9%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a} - \frac{x}{a}\right)} \]
    8. Step-by-step derivation
      1. div-sub66.2%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    9. Simplified66.2%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} \]
    10. Taylor expanded in t around inf 47.6%

      \[\leadsto y \cdot \color{blue}{\frac{t}{a}} \]

    if -6.4999999999999994e132 < y < 4.8000000000000002e138

    1. Initial program 67.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*79.7%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified79.7%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Step-by-step derivation
      1. clear-num79.1%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
      2. inv-pow79.1%

        \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    5. Applied egg-rr79.1%

      \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    6. Step-by-step derivation
      1. unpow-179.1%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    7. Simplified79.1%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    8. Taylor expanded in t around inf 70.7%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    9. Taylor expanded in z around inf 43.3%

      \[\leadsto x + \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+132} \lor \neg \left(y \leq 4.8 \cdot 10^{+138}\right):\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 15: 40.1% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.3 \cdot 10^{+132} \lor \neg \left(y \leq 3.6 \cdot 10^{+143}\right):\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= y -5.3e+132) (not (<= y 3.6e+143))) (/ t (/ a y)) (+ x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -5.3e+132) || !(y <= 3.6e+143)) {
		tmp = t / (a / y);
	} else {
		tmp = x + t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((y <= (-5.3d+132)) .or. (.not. (y <= 3.6d+143))) then
        tmp = t / (a / y)
    else
        tmp = x + t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -5.3e+132) || !(y <= 3.6e+143)) {
		tmp = t / (a / y);
	} else {
		tmp = x + t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (y <= -5.3e+132) or not (y <= 3.6e+143):
		tmp = t / (a / y)
	else:
		tmp = x + t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((y <= -5.3e+132) || !(y <= 3.6e+143))
		tmp = Float64(t / Float64(a / y));
	else
		tmp = Float64(x + t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((y <= -5.3e+132) || ~((y <= 3.6e+143)))
		tmp = t / (a / y);
	else
		tmp = x + t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.3e+132], N[Not[LessEqual[y, 3.6e+143]], $MachinePrecision]], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.3 \cdot 10^{+132} \lor \neg \left(y \leq 3.6 \cdot 10^{+143}\right):\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

\mathbf{else}:\\
\;\;\;\;x + t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.3e132 or 3.5999999999999999e143 < y

    1. Initial program 79.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/96.6%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 60.4%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*71.1%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified71.1%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in y around inf 62.9%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a} - \frac{x}{a}\right)} \]
    8. Step-by-step derivation
      1. div-sub66.2%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    9. Simplified66.2%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} \]
    10. Taylor expanded in t around inf 43.3%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    11. Step-by-step derivation
      1. associate-/l*50.6%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    12. Simplified50.6%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]

    if -5.3e132 < y < 3.5999999999999999e143

    1. Initial program 67.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*79.7%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified79.7%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Step-by-step derivation
      1. clear-num79.1%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
      2. inv-pow79.1%

        \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    5. Applied egg-rr79.1%

      \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    6. Step-by-step derivation
      1. unpow-179.1%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    7. Simplified79.1%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    8. Taylor expanded in t around inf 70.7%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    9. Taylor expanded in z around inf 43.3%

      \[\leadsto x + \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification45.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.3 \cdot 10^{+132} \lor \neg \left(y \leq 3.6 \cdot 10^{+143}\right):\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 16: 37.6% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{-54} \lor \neg \left(z \leq 1.9 \cdot 10^{+44}\right):\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -7.5e-54) (not (<= z 1.9e+44))) (+ x t) x))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -7.5e-54) || !(z <= 1.9e+44)) {
		tmp = x + t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-7.5d-54)) .or. (.not. (z <= 1.9d+44))) then
        tmp = x + t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -7.5e-54) || !(z <= 1.9e+44)) {
		tmp = x + t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -7.5e-54) or not (z <= 1.9e+44):
		tmp = x + t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -7.5e-54) || !(z <= 1.9e+44))
		tmp = Float64(x + t);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -7.5e-54) || ~((z <= 1.9e+44)))
		tmp = x + t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7.5e-54], N[Not[LessEqual[z, 1.9e+44]], $MachinePrecision]], N[(x + t), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-54} \lor \neg \left(z \leq 1.9 \cdot 10^{+44}\right):\\
\;\;\;\;x + t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.5000000000000005e-54 or 1.9000000000000001e44 < z

    1. Initial program 50.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*71.9%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified71.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Step-by-step derivation
      1. clear-num71.8%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
      2. inv-pow71.8%

        \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    5. Applied egg-rr71.8%

      \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\frac{t - x}{a - z}\right)}^{-1}}} \]
    6. Step-by-step derivation
      1. unpow-171.8%

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    7. Simplified71.8%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{1}{\frac{t - x}{a - z}}}} \]
    8. Taylor expanded in t around inf 58.1%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    9. Taylor expanded in z around inf 42.3%

      \[\leadsto x + \color{blue}{t} \]

    if -7.5000000000000005e-54 < z < 1.9000000000000001e44

    1. Initial program 89.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/93.8%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in a around inf 38.2%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification40.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{-54} \lor \neg \left(z \leq 1.9 \cdot 10^{+44}\right):\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 17: 38.3% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+33}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+146}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -9.2e+33) t (if (<= z 1.4e+146) x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -9.2e+33) {
		tmp = t;
	} else if (z <= 1.4e+146) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-9.2d+33)) then
        tmp = t
    else if (z <= 1.4d+146) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -9.2e+33) {
		tmp = t;
	} else if (z <= 1.4e+146) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -9.2e+33:
		tmp = t
	elif z <= 1.4e+146:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -9.2e+33)
		tmp = t;
	elseif (z <= 1.4e+146)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -9.2e+33)
		tmp = t;
	elseif (z <= 1.4e+146)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.2e+33], t, If[LessEqual[z, 1.4e+146], x, t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+33}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+146}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.20000000000000042e33 or 1.4e146 < z

    1. Initial program 39.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/71.4%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 50.5%

      \[\leadsto \color{blue}{t} \]

    if -9.20000000000000042e33 < z < 1.4e146

    1. Initial program 86.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/93.0%

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in a around inf 34.1%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+33}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+146}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 18: 25.4% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return t;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 70.1%

    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
  2. Step-by-step derivation
    1. associate-*l/85.6%

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

    \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
  4. Taylor expanded in z around inf 22.9%

    \[\leadsto \color{blue}{t} \]
  5. Final simplification22.9%

    \[\leadsto t \]

Developer target: 84.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- t (* (/ y z) (- t x)))))
   (if (< z -1.2536131056095036e+188)
     t_1
     (if (< z 4.446702369113811e+64)
       (+ x (/ (- y z) (/ (- a z) (- t x))))
       t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t - ((y / z) * (t - x))
    if (z < (-1.2536131056095036d+188)) then
        tmp = t_1
    else if (z < 4.446702369113811d+64) then
        tmp = x + ((y - z) / ((a - z) / (t - x)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t - ((y / z) * (t - x))
	tmp = 0
	if z < -1.2536131056095036e+188:
		tmp = t_1
	elif z < 4.446702369113811e+64:
		tmp = x + ((y - z) / ((a - z) / (t - x)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x)))
	tmp = 0.0
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t - ((y / z) * (t - x));
	tmp = 0.0;
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023322 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

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