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

Percentage Accurate: 68.3% → 90.3%
Time: 18.5s
Alternatives: 20
Speedup: 1.0×

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 20 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: 68.3% 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: 90.3% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y - z}{a - z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{-288}:\\
\;\;\;\;\mathsf{fma}\left(t_1, t - x, x\right)\\

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-293}:\\
\;\;\;\;t + x \cdot \frac{y - a}{z}\\

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


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

    1. Initial program 76.7%

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

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

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

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

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

    if -1.00000000000000006e-288 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.0000000000000003e-293

    1. Initial program 6.2%

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

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 99.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+99.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/99.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/99.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-sub99.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--99.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/99.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--99.8%

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000003e-293 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 76.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq -1 \cdot 10^{-288}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq 5 \cdot 10^{-293}:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 2: 90.3% 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 -1 \cdot 10^{-288} \lor \neg \left(t_1 \leq 5 \cdot 10^{-293}\right):\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \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 -1e-288) (not (<= t_1 5e-293)))
     (+ x (* (- t x) (/ (- y z) (- a z))))
     (+ t (* x (/ (- y a) z))))))
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 <= -1e-288) || !(t_1 <= 5e-293)) {
		tmp = x + ((t - x) * ((y - z) / (a - z)));
	} else {
		tmp = t + (x * ((y - 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 = x + (((y - z) * (t - x)) / (a - z))
    if ((t_1 <= (-1d-288)) .or. (.not. (t_1 <= 5d-293))) then
        tmp = x + ((t - x) * ((y - z) / (a - z)))
    else
        tmp = t + (x * ((y - 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 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if ((t_1 <= -1e-288) || !(t_1 <= 5e-293)) {
		tmp = x + ((t - x) * ((y - z) / (a - z)));
	} else {
		tmp = t + (x * ((y - a) / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (((y - z) * (t - x)) / (a - z))
	tmp = 0
	if (t_1 <= -1e-288) or not (t_1 <= 5e-293):
		tmp = x + ((t - x) * ((y - z) / (a - z)))
	else:
		tmp = t + (x * ((y - a) / z))
	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 <= -1e-288) || !(t_1 <= 5e-293))
		tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / Float64(a - z))));
	else
		tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z)));
	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 <= -1e-288) || ~((t_1 <= 5e-293)))
		tmp = x + ((t - x) * ((y - z) / (a - z)));
	else
		tmp = t + (x * ((y - a) / z));
	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, -1e-288], N[Not[LessEqual[t$95$1, 5e-293]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $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 -1 \cdot 10^{-288} \lor \neg \left(t_1 \leq 5 \cdot 10^{-293}\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\

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


\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))) < -1.00000000000000006e-288 or 5.0000000000000003e-293 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 76.5%

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

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

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

    if -1.00000000000000006e-288 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.0000000000000003e-293

    1. Initial program 6.2%

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

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 99.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+99.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/99.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/99.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-sub99.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--99.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/99.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--99.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(t - x\right) \cdot \frac{z}{z - a}\\ t_2 := t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{if}\;a \leq -230:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.85 \cdot 10^{-30}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-101}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-156}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-119}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+54}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- t x) (/ z (- z a))))) (t_2 (+ t (/ (- x t) (/ z y)))))
   (if (<= a -230.0)
     t_1
     (if (<= a -2.85e-30)
       (+ x (/ y (/ a (- t x))))
       (if (<= a -1.9e-101)
         t_2
         (if (<= a -3.8e-156)
           (* y (/ (- t x) (- a z)))
           (if (<= a 1.6e-119)
             t_2
             (if (<= a 3.3e+54) (/ t (/ (- a z) (- y z))) t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t - x) * (z / (z - a)));
	double t_2 = t + ((x - t) / (z / y));
	double tmp;
	if (a <= -230.0) {
		tmp = t_1;
	} else if (a <= -2.85e-30) {
		tmp = x + (y / (a / (t - x)));
	} else if (a <= -1.9e-101) {
		tmp = t_2;
	} else if (a <= -3.8e-156) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 1.6e-119) {
		tmp = t_2;
	} else if (a <= 3.3e+54) {
		tmp = t / ((a - z) / (y - z));
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x + ((t - x) * (z / (z - a)))
    t_2 = t + ((x - t) / (z / y))
    if (a <= (-230.0d0)) then
        tmp = t_1
    else if (a <= (-2.85d-30)) then
        tmp = x + (y / (a / (t - x)))
    else if (a <= (-1.9d-101)) then
        tmp = t_2
    else if (a <= (-3.8d-156)) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 1.6d-119) then
        tmp = t_2
    else if (a <= 3.3d+54) then
        tmp = t / ((a - z) / (y - z))
    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 = x + ((t - x) * (z / (z - a)));
	double t_2 = t + ((x - t) / (z / y));
	double tmp;
	if (a <= -230.0) {
		tmp = t_1;
	} else if (a <= -2.85e-30) {
		tmp = x + (y / (a / (t - x)));
	} else if (a <= -1.9e-101) {
		tmp = t_2;
	} else if (a <= -3.8e-156) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 1.6e-119) {
		tmp = t_2;
	} else if (a <= 3.3e+54) {
		tmp = t / ((a - z) / (y - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((t - x) * (z / (z - a)))
	t_2 = t + ((x - t) / (z / y))
	tmp = 0
	if a <= -230.0:
		tmp = t_1
	elif a <= -2.85e-30:
		tmp = x + (y / (a / (t - x)))
	elif a <= -1.9e-101:
		tmp = t_2
	elif a <= -3.8e-156:
		tmp = y * ((t - x) / (a - z))
	elif a <= 1.6e-119:
		tmp = t_2
	elif a <= 3.3e+54:
		tmp = t / ((a - z) / (y - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(t - x) * Float64(z / Float64(z - a))))
	t_2 = Float64(t + Float64(Float64(x - t) / Float64(z / y)))
	tmp = 0.0
	if (a <= -230.0)
		tmp = t_1;
	elseif (a <= -2.85e-30)
		tmp = Float64(x + Float64(y / Float64(a / Float64(t - x))));
	elseif (a <= -1.9e-101)
		tmp = t_2;
	elseif (a <= -3.8e-156)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 1.6e-119)
		tmp = t_2;
	elseif (a <= 3.3e+54)
		tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((t - x) * (z / (z - a)));
	t_2 = t + ((x - t) / (z / y));
	tmp = 0.0;
	if (a <= -230.0)
		tmp = t_1;
	elseif (a <= -2.85e-30)
		tmp = x + (y / (a / (t - x)));
	elseif (a <= -1.9e-101)
		tmp = t_2;
	elseif (a <= -3.8e-156)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 1.6e-119)
		tmp = t_2;
	elseif (a <= 3.3e+54)
		tmp = t / ((a - z) / (y - z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -230.0], t$95$1, If[LessEqual[a, -2.85e-30], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.9e-101], t$95$2, If[LessEqual[a, -3.8e-156], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e-119], t$95$2, If[LessEqual[a, 3.3e+54], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{z}{z - a}\\
t_2 := t + \frac{x - t}{\frac{z}{y}}\\
\mathbf{if}\;a \leq -230:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -2.85 \cdot 10^{-30}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\

\mathbf{elif}\;a \leq -1.9 \cdot 10^{-101}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;a \leq 1.6 \cdot 10^{-119}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 3.3 \cdot 10^{+54}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -230 or 3.3e54 < a

    1. Initial program 71.3%

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-\frac{z}{a - z}\right)} \cdot \left(t - x\right) \]
      2. distribute-neg-frac74.7%

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

      \[\leadsto x + \color{blue}{\frac{-z}{a - z}} \cdot \left(t - x\right) \]
    7. Step-by-step derivation
      1. frac-2neg74.7%

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

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

        \[\leadsto x + \left(\color{blue}{z} \cdot \frac{1}{-\left(a - z\right)}\right) \cdot \left(t - x\right) \]
      4. sub-neg74.6%

        \[\leadsto x + \left(z \cdot \frac{1}{-\color{blue}{\left(a + \left(-z\right)\right)}}\right) \cdot \left(t - x\right) \]
      5. distribute-neg-in74.6%

        \[\leadsto x + \left(z \cdot \frac{1}{\color{blue}{\left(-a\right) + \left(-\left(-z\right)\right)}}\right) \cdot \left(t - x\right) \]
      6. remove-double-neg74.6%

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

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

        \[\leadsto x + \color{blue}{\frac{z \cdot 1}{\left(-a\right) + z}} \cdot \left(t - x\right) \]
      2. *-rgt-identity74.7%

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

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

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

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

    if -230 < a < -2.84999999999999989e-30

    1. Initial program 87.8%

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

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

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

      \[\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}}} \]

    if -2.84999999999999989e-30 < a < -1.90000000000000005e-101 or -3.80000000000000008e-156 < a < 1.59999999999999997e-119

    1. Initial program 69.4%

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

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 81.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+81.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/81.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/81.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-sub81.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--81.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/81.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--81.8%

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

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

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

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

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

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

    if -1.90000000000000005e-101 < a < -3.80000000000000008e-156

    1. Initial program 68.6%

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

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

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

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

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

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

    if 1.59999999999999997e-119 < a < 3.3e54

    1. Initial program 75.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -230:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{z}{z - a}\\ \mathbf{elif}\;a \leq -2.85 \cdot 10^{-30}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-101}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-156}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-119}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+54}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{z}{z - a}\\ \end{array} \]

Alternative 4: 56.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;a \leq -9.6 \cdot 10^{+119}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-101}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-147}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-239}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-273}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+126}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= a -9.6e+119)
     x
     (if (<= a -1.9e-101)
       t_1
       (if (<= a -4.2e-147)
         (* y (/ (- t x) (- a z)))
         (if (<= a -1.8e-239)
           t_1
           (if (<= a 1.7e-273)
             (* (/ y z) (- x t))
             (if (<= a 6e+126) t_1 x))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (a <= -9.6e+119) {
		tmp = x;
	} else if (a <= -1.9e-101) {
		tmp = t_1;
	} else if (a <= -4.2e-147) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= -1.8e-239) {
		tmp = t_1;
	} else if (a <= 1.7e-273) {
		tmp = (y / z) * (x - t);
	} else if (a <= 6e+126) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (a <= (-9.6d+119)) then
        tmp = x
    else if (a <= (-1.9d-101)) then
        tmp = t_1
    else if (a <= (-4.2d-147)) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= (-1.8d-239)) then
        tmp = t_1
    else if (a <= 1.7d-273) then
        tmp = (y / z) * (x - t)
    else if (a <= 6d+126) then
        tmp = t_1
    else
        tmp = x
    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 (a <= -9.6e+119) {
		tmp = x;
	} else if (a <= -1.9e-101) {
		tmp = t_1;
	} else if (a <= -4.2e-147) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= -1.8e-239) {
		tmp = t_1;
	} else if (a <= 1.7e-273) {
		tmp = (y / z) * (x - t);
	} else if (a <= 6e+126) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if a <= -9.6e+119:
		tmp = x
	elif a <= -1.9e-101:
		tmp = t_1
	elif a <= -4.2e-147:
		tmp = y * ((t - x) / (a - z))
	elif a <= -1.8e-239:
		tmp = t_1
	elif a <= 1.7e-273:
		tmp = (y / z) * (x - t)
	elif a <= 6e+126:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (a <= -9.6e+119)
		tmp = x;
	elseif (a <= -1.9e-101)
		tmp = t_1;
	elseif (a <= -4.2e-147)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= -1.8e-239)
		tmp = t_1;
	elseif (a <= 1.7e-273)
		tmp = Float64(Float64(y / z) * Float64(x - t));
	elseif (a <= 6e+126)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (a <= -9.6e+119)
		tmp = x;
	elseif (a <= -1.9e-101)
		tmp = t_1;
	elseif (a <= -4.2e-147)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= -1.8e-239)
		tmp = t_1;
	elseif (a <= 1.7e-273)
		tmp = (y / z) * (x - t);
	elseif (a <= 6e+126)
		tmp = t_1;
	else
		tmp = x;
	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[a, -9.6e+119], x, If[LessEqual[a, -1.9e-101], t$95$1, If[LessEqual[a, -4.2e-147], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.8e-239], t$95$1, If[LessEqual[a, 1.7e-273], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e+126], t$95$1, x]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.9 \cdot 10^{-101}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq -1.8 \cdot 10^{-239}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 6 \cdot 10^{+126}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -9.6e119 or 6.0000000000000005e126 < a

    1. Initial program 71.1%

      \[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 a around inf 57.2%

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

    if -9.6e119 < a < -1.90000000000000005e-101 or -4.2e-147 < a < -1.8000000000000001e-239 or 1.69999999999999996e-273 < a < 6.0000000000000005e126

    1. Initial program 72.2%

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

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

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

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

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

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

    if -1.90000000000000005e-101 < a < -4.2e-147

    1. Initial program 78.7%

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

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

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

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

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

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

    if -1.8000000000000001e-239 < a < 1.69999999999999996e-273

    1. Initial program 69.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot y}{z}} \cdot \left(t - x\right) \]
      2. neg-mul-174.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.6 \cdot 10^{+119}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-101}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-147}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-239}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-273}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+126}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 5: 47.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{z - y}{z}\\ \mathbf{if}\;a \leq -1.75 \cdot 10^{+47}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-101}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-136}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-239}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-274}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+54}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- z y) z))))
   (if (<= a -1.75e+47)
     x
     (if (<= a -1e-101)
       t_1
       (if (<= a -2.9e-136)
         (/ x (/ z y))
         (if (<= a -1.75e-239)
           t_1
           (if (<= a 1.9e-274)
             (* (/ y z) (- x t))
             (if (<= a 4e+54) (/ (- t) (/ z (- y z))) x))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((z - y) / z);
	double tmp;
	if (a <= -1.75e+47) {
		tmp = x;
	} else if (a <= -1e-101) {
		tmp = t_1;
	} else if (a <= -2.9e-136) {
		tmp = x / (z / y);
	} else if (a <= -1.75e-239) {
		tmp = t_1;
	} else if (a <= 1.9e-274) {
		tmp = (y / z) * (x - t);
	} else if (a <= 4e+54) {
		tmp = -t / (z / (y - z));
	} 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) :: t_1
    real(8) :: tmp
    t_1 = t * ((z - y) / z)
    if (a <= (-1.75d+47)) then
        tmp = x
    else if (a <= (-1d-101)) then
        tmp = t_1
    else if (a <= (-2.9d-136)) then
        tmp = x / (z / y)
    else if (a <= (-1.75d-239)) then
        tmp = t_1
    else if (a <= 1.9d-274) then
        tmp = (y / z) * (x - t)
    else if (a <= 4d+54) then
        tmp = -t / (z / (y - z))
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((z - y) / z);
	double tmp;
	if (a <= -1.75e+47) {
		tmp = x;
	} else if (a <= -1e-101) {
		tmp = t_1;
	} else if (a <= -2.9e-136) {
		tmp = x / (z / y);
	} else if (a <= -1.75e-239) {
		tmp = t_1;
	} else if (a <= 1.9e-274) {
		tmp = (y / z) * (x - t);
	} else if (a <= 4e+54) {
		tmp = -t / (z / (y - z));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((z - y) / z)
	tmp = 0
	if a <= -1.75e+47:
		tmp = x
	elif a <= -1e-101:
		tmp = t_1
	elif a <= -2.9e-136:
		tmp = x / (z / y)
	elif a <= -1.75e-239:
		tmp = t_1
	elif a <= 1.9e-274:
		tmp = (y / z) * (x - t)
	elif a <= 4e+54:
		tmp = -t / (z / (y - z))
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(z - y) / z))
	tmp = 0.0
	if (a <= -1.75e+47)
		tmp = x;
	elseif (a <= -1e-101)
		tmp = t_1;
	elseif (a <= -2.9e-136)
		tmp = Float64(x / Float64(z / y));
	elseif (a <= -1.75e-239)
		tmp = t_1;
	elseif (a <= 1.9e-274)
		tmp = Float64(Float64(y / z) * Float64(x - t));
	elseif (a <= 4e+54)
		tmp = Float64(Float64(-t) / Float64(z / Float64(y - z)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((z - y) / z);
	tmp = 0.0;
	if (a <= -1.75e+47)
		tmp = x;
	elseif (a <= -1e-101)
		tmp = t_1;
	elseif (a <= -2.9e-136)
		tmp = x / (z / y);
	elseif (a <= -1.75e-239)
		tmp = t_1;
	elseif (a <= 1.9e-274)
		tmp = (y / z) * (x - t);
	elseif (a <= 4e+54)
		tmp = -t / (z / (y - z));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.75e+47], x, If[LessEqual[a, -1e-101], t$95$1, If[LessEqual[a, -2.9e-136], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.75e-239], t$95$1, If[LessEqual[a, 1.9e-274], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4e+54], N[((-t) / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1 \cdot 10^{-101}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq -1.75 \cdot 10^{-239}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 4 \cdot 10^{+54}:\\
\;\;\;\;\frac{-t}{\frac{z}{y - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.75000000000000008e47 or 4.0000000000000003e54 < a

    1. Initial program 69.5%

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

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

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

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

    if -1.75000000000000008e47 < a < -1.00000000000000005e-101 or -2.89999999999999995e-136 < a < -1.75000000000000003e-239

    1. Initial program 79.5%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{-1 \cdot \left(y - z\right)}{z}} \]
      2. neg-mul-160.6%

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

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

    if -1.00000000000000005e-101 < a < -2.89999999999999995e-136

    1. Initial program 68.5%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t - x}{z}} \]
      3. *-commutative66.6%

        \[\leadsto -\color{blue}{\frac{t - x}{z} \cdot y} \]
      4. distribute-rgt-neg-in66.6%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    12. Simplified83.3%

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

    if -1.75000000000000003e-239 < a < 1.89999999999999992e-274

    1. Initial program 69.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot y}{z}} \cdot \left(t - x\right) \]
      2. neg-mul-174.9%

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

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

    if 1.89999999999999992e-274 < a < 4.0000000000000003e54

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac56.1%

        \[\leadsto \color{blue}{\frac{-t}{\frac{z}{y - z}}} \]
    9. Simplified56.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.75 \cdot 10^{+47}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-101}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-136}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-239}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-274}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+54}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 6: 47.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{z - y}{z}\\ \mathbf{if}\;a \leq -1.95 \cdot 10^{+48}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-101}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-136}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-239}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-274}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+54}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- z y) z))))
   (if (<= a -1.95e+48)
     x
     (if (<= a -1e-101)
       t_1
       (if (<= a -2.9e-136)
         (/ x (/ z y))
         (if (<= a -1.75e-239)
           t_1
           (if (<= a 1.8e-274)
             (* (/ y z) (- x t))
             (if (<= a 5.5e+54) t_1 x))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((z - y) / z);
	double tmp;
	if (a <= -1.95e+48) {
		tmp = x;
	} else if (a <= -1e-101) {
		tmp = t_1;
	} else if (a <= -2.9e-136) {
		tmp = x / (z / y);
	} else if (a <= -1.75e-239) {
		tmp = t_1;
	} else if (a <= 1.8e-274) {
		tmp = (y / z) * (x - t);
	} else if (a <= 5.5e+54) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = t * ((z - y) / z)
    if (a <= (-1.95d+48)) then
        tmp = x
    else if (a <= (-1d-101)) then
        tmp = t_1
    else if (a <= (-2.9d-136)) then
        tmp = x / (z / y)
    else if (a <= (-1.75d-239)) then
        tmp = t_1
    else if (a <= 1.8d-274) then
        tmp = (y / z) * (x - t)
    else if (a <= 5.5d+54) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((z - y) / z);
	double tmp;
	if (a <= -1.95e+48) {
		tmp = x;
	} else if (a <= -1e-101) {
		tmp = t_1;
	} else if (a <= -2.9e-136) {
		tmp = x / (z / y);
	} else if (a <= -1.75e-239) {
		tmp = t_1;
	} else if (a <= 1.8e-274) {
		tmp = (y / z) * (x - t);
	} else if (a <= 5.5e+54) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((z - y) / z)
	tmp = 0
	if a <= -1.95e+48:
		tmp = x
	elif a <= -1e-101:
		tmp = t_1
	elif a <= -2.9e-136:
		tmp = x / (z / y)
	elif a <= -1.75e-239:
		tmp = t_1
	elif a <= 1.8e-274:
		tmp = (y / z) * (x - t)
	elif a <= 5.5e+54:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(z - y) / z))
	tmp = 0.0
	if (a <= -1.95e+48)
		tmp = x;
	elseif (a <= -1e-101)
		tmp = t_1;
	elseif (a <= -2.9e-136)
		tmp = Float64(x / Float64(z / y));
	elseif (a <= -1.75e-239)
		tmp = t_1;
	elseif (a <= 1.8e-274)
		tmp = Float64(Float64(y / z) * Float64(x - t));
	elseif (a <= 5.5e+54)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((z - y) / z);
	tmp = 0.0;
	if (a <= -1.95e+48)
		tmp = x;
	elseif (a <= -1e-101)
		tmp = t_1;
	elseif (a <= -2.9e-136)
		tmp = x / (z / y);
	elseif (a <= -1.75e-239)
		tmp = t_1;
	elseif (a <= 1.8e-274)
		tmp = (y / z) * (x - t);
	elseif (a <= 5.5e+54)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.95e+48], x, If[LessEqual[a, -1e-101], t$95$1, If[LessEqual[a, -2.9e-136], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.75e-239], t$95$1, If[LessEqual[a, 1.8e-274], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.5e+54], t$95$1, x]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1 \cdot 10^{-101}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq -1.75 \cdot 10^{-239}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 5.5 \cdot 10^{+54}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.95e48 or 5.50000000000000026e54 < a

    1. Initial program 69.5%

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

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

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

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

    if -1.95e48 < a < -1.00000000000000005e-101 or -2.89999999999999995e-136 < a < -1.75000000000000003e-239 or 1.79999999999999991e-274 < a < 5.50000000000000026e54

    1. Initial program 74.2%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{-1 \cdot \left(y - z\right)}{z}} \]
      2. neg-mul-157.7%

        \[\leadsto t \cdot \frac{\color{blue}{-\left(y - z\right)}}{z} \]
    9. Simplified57.7%

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

    if -1.00000000000000005e-101 < a < -2.89999999999999995e-136

    1. Initial program 68.5%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t - x}{z}} \]
      3. *-commutative66.6%

        \[\leadsto -\color{blue}{\frac{t - x}{z} \cdot y} \]
      4. distribute-rgt-neg-in66.6%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    12. Simplified83.3%

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

    if -1.75000000000000003e-239 < a < 1.79999999999999991e-274

    1. Initial program 69.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot y}{z}} \cdot \left(t - x\right) \]
      2. neg-mul-174.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.95 \cdot 10^{+48}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-101}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-136}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-239}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-274}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+54}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 7: 37.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{+31}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-291}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-240}:\\ \;\;\;\;\frac{t \cdot \left(-z\right)}{a - z}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-100}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 7000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -2e+31)
   (* (- t x) (/ y a))
   (if (<= y -8e-291)
     t
     (if (<= y 3.1e-240)
       (/ (* t (- z)) (- a z))
       (if (<= y 2.7e-100) t (if (<= y 7000.0) x (/ t (/ (- a z) y))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -2e+31) {
		tmp = (t - x) * (y / a);
	} else if (y <= -8e-291) {
		tmp = t;
	} else if (y <= 3.1e-240) {
		tmp = (t * -z) / (a - z);
	} else if (y <= 2.7e-100) {
		tmp = t;
	} else if (y <= 7000.0) {
		tmp = x;
	} else {
		tmp = t / ((a - z) / 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 (y <= (-2d+31)) then
        tmp = (t - x) * (y / a)
    else if (y <= (-8d-291)) then
        tmp = t
    else if (y <= 3.1d-240) then
        tmp = (t * -z) / (a - z)
    else if (y <= 2.7d-100) then
        tmp = t
    else if (y <= 7000.0d0) then
        tmp = x
    else
        tmp = t / ((a - z) / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -2e+31) {
		tmp = (t - x) * (y / a);
	} else if (y <= -8e-291) {
		tmp = t;
	} else if (y <= 3.1e-240) {
		tmp = (t * -z) / (a - z);
	} else if (y <= 2.7e-100) {
		tmp = t;
	} else if (y <= 7000.0) {
		tmp = x;
	} else {
		tmp = t / ((a - z) / y);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -2e+31:
		tmp = (t - x) * (y / a)
	elif y <= -8e-291:
		tmp = t
	elif y <= 3.1e-240:
		tmp = (t * -z) / (a - z)
	elif y <= 2.7e-100:
		tmp = t
	elif y <= 7000.0:
		tmp = x
	else:
		tmp = t / ((a - z) / y)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -2e+31)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (y <= -8e-291)
		tmp = t;
	elseif (y <= 3.1e-240)
		tmp = Float64(Float64(t * Float64(-z)) / Float64(a - z));
	elseif (y <= 2.7e-100)
		tmp = t;
	elseif (y <= 7000.0)
		tmp = x;
	else
		tmp = Float64(t / Float64(Float64(a - z) / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -2e+31)
		tmp = (t - x) * (y / a);
	elseif (y <= -8e-291)
		tmp = t;
	elseif (y <= 3.1e-240)
		tmp = (t * -z) / (a - z);
	elseif (y <= 2.7e-100)
		tmp = t;
	elseif (y <= 7000.0)
		tmp = x;
	else
		tmp = t / ((a - z) / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2e+31], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8e-291], t, If[LessEqual[y, 3.1e-240], N[(N[(t * (-z)), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e-100], t, If[LessEqual[y, 7000.0], x, N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+31}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\

\mathbf{elif}\;y \leq -8 \cdot 10^{-291}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 3.1 \cdot 10^{-240}:\\
\;\;\;\;\frac{t \cdot \left(-z\right)}{a - z}\\

\mathbf{elif}\;y \leq 2.7 \cdot 10^{-100}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 7000:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.9999999999999999e31

    1. Initial program 71.7%

      \[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 y around -inf 56.0%

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

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

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

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

    if -1.9999999999999999e31 < y < -7.9999999999999997e-291 or 3.10000000000000017e-240 < y < 2.70000000000000016e-100

    1. Initial program 66.8%

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

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

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

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

    if -7.9999999999999997e-291 < y < 3.10000000000000017e-240

    1. Initial program 87.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    8. Step-by-step derivation
      1. mul-1-neg54.9%

        \[\leadsto \color{blue}{-\frac{t \cdot z}{a - z}} \]
    9. Simplified54.9%

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

    if 2.70000000000000016e-100 < y < 7e3

    1. Initial program 72.7%

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

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

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

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

    if 7e3 < y

    1. Initial program 73.8%

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\frac{a - z}{y}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification47.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{+31}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-291}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-240}:\\ \;\;\;\;\frac{t \cdot \left(-z\right)}{a - z}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-100}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 7000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y}}\\ \end{array} \]

Alternative 8: 56.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;a \leq -1.7 \cdot 10^{+120}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-239}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-274}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+126}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= a -1.7e+120)
     x
     (if (<= a -1.75e-239)
       t_1
       (if (<= a 1.9e-274) (* (/ y z) (- x t)) (if (<= a 9.2e+126) t_1 x))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (a <= -1.7e+120) {
		tmp = x;
	} else if (a <= -1.75e-239) {
		tmp = t_1;
	} else if (a <= 1.9e-274) {
		tmp = (y / z) * (x - t);
	} else if (a <= 9.2e+126) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (a <= (-1.7d+120)) then
        tmp = x
    else if (a <= (-1.75d-239)) then
        tmp = t_1
    else if (a <= 1.9d-274) then
        tmp = (y / z) * (x - t)
    else if (a <= 9.2d+126) then
        tmp = t_1
    else
        tmp = x
    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 (a <= -1.7e+120) {
		tmp = x;
	} else if (a <= -1.75e-239) {
		tmp = t_1;
	} else if (a <= 1.9e-274) {
		tmp = (y / z) * (x - t);
	} else if (a <= 9.2e+126) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if a <= -1.7e+120:
		tmp = x
	elif a <= -1.75e-239:
		tmp = t_1
	elif a <= 1.9e-274:
		tmp = (y / z) * (x - t)
	elif a <= 9.2e+126:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (a <= -1.7e+120)
		tmp = x;
	elseif (a <= -1.75e-239)
		tmp = t_1;
	elseif (a <= 1.9e-274)
		tmp = Float64(Float64(y / z) * Float64(x - t));
	elseif (a <= 9.2e+126)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (a <= -1.7e+120)
		tmp = x;
	elseif (a <= -1.75e-239)
		tmp = t_1;
	elseif (a <= 1.9e-274)
		tmp = (y / z) * (x - t);
	elseif (a <= 9.2e+126)
		tmp = t_1;
	else
		tmp = x;
	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[a, -1.7e+120], x, If[LessEqual[a, -1.75e-239], t$95$1, If[LessEqual[a, 1.9e-274], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.2e+126], t$95$1, x]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.75 \cdot 10^{-239}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 9.2 \cdot 10^{+126}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.69999999999999999e120 or 9.2000000000000002e126 < a

    1. Initial program 71.1%

      \[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 a around inf 57.2%

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

    if -1.69999999999999999e120 < a < -1.75000000000000003e-239 or 1.89999999999999992e-274 < a < 9.2000000000000002e126

    1. Initial program 72.5%

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

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

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

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

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

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

    if -1.75000000000000003e-239 < a < 1.89999999999999992e-274

    1. Initial program 69.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot y}{z}} \cdot \left(t - x\right) \]
      2. neg-mul-174.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.7 \cdot 10^{+120}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-239}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-274}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+126}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 75.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{if}\;z \leq -2.25 \cdot 10^{-29}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-14}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+38}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (/ (- x t) (/ z (- y a))))))
   (if (<= z -2.25e-29)
     t_1
     (if (<= z 2.8e-14)
       (+ x (* (- t x) (/ y a)))
       (if (<= z 2.05e+38) (+ x (* (- t x) (/ z (- z a)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + ((x - t) / (z / (y - a)));
	double tmp;
	if (z <= -2.25e-29) {
		tmp = t_1;
	} else if (z <= 2.8e-14) {
		tmp = x + ((t - x) * (y / a));
	} else if (z <= 2.05e+38) {
		tmp = x + ((t - x) * (z / (z - a)));
	} 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 + ((x - t) / (z / (y - a)))
    if (z <= (-2.25d-29)) then
        tmp = t_1
    else if (z <= 2.8d-14) then
        tmp = x + ((t - x) * (y / a))
    else if (z <= 2.05d+38) then
        tmp = x + ((t - x) * (z / (z - a)))
    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 + ((x - t) / (z / (y - a)));
	double tmp;
	if (z <= -2.25e-29) {
		tmp = t_1;
	} else if (z <= 2.8e-14) {
		tmp = x + ((t - x) * (y / a));
	} else if (z <= 2.05e+38) {
		tmp = x + ((t - x) * (z / (z - a)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + ((x - t) / (z / (y - a)))
	tmp = 0
	if z <= -2.25e-29:
		tmp = t_1
	elif z <= 2.8e-14:
		tmp = x + ((t - x) * (y / a))
	elif z <= 2.05e+38:
		tmp = x + ((t - x) * (z / (z - a)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a))))
	tmp = 0.0
	if (z <= -2.25e-29)
		tmp = t_1;
	elseif (z <= 2.8e-14)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	elseif (z <= 2.05e+38)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(z / Float64(z - a))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + ((x - t) / (z / (y - a)));
	tmp = 0.0;
	if (z <= -2.25e-29)
		tmp = t_1;
	elseif (z <= 2.8e-14)
		tmp = x + ((t - x) * (y / a));
	elseif (z <= 2.05e+38)
		tmp = x + ((t - x) * (z / (z - a)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.25e-29], t$95$1, If[LessEqual[z, 2.8e-14], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e+38], N[(x + N[(N[(t - x), $MachinePrecision] * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.2499999999999999e-29 or 2.0500000000000002e38 < z

    1. Initial program 54.2%

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

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

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

      \[\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+63.4%

        \[\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/63.4%

        \[\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/63.4%

        \[\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-sub63.4%

        \[\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--63.4%

        \[\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/63.4%

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

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

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

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

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

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

    if -2.2499999999999999e-29 < z < 2.8000000000000001e-14

    1. Initial program 91.0%

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

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

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

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

    if 2.8000000000000001e-14 < z < 2.0500000000000002e38

    1. Initial program 92.5%

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-\frac{z}{a - z}\right)} \cdot \left(t - x\right) \]
      2. distribute-neg-frac84.8%

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

      \[\leadsto x + \color{blue}{\frac{-z}{a - z}} \cdot \left(t - x\right) \]
    7. Step-by-step derivation
      1. frac-2neg84.8%

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

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

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

        \[\leadsto x + \left(z \cdot \frac{1}{-\color{blue}{\left(a + \left(-z\right)\right)}}\right) \cdot \left(t - x\right) \]
      5. distribute-neg-in84.8%

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

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

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

        \[\leadsto x + \color{blue}{\frac{z \cdot 1}{\left(-a\right) + z}} \cdot \left(t - x\right) \]
      2. *-rgt-identity84.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{-29}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-14}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+38}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \end{array} \]

Alternative 10: 75.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{if}\;z \leq -5.4 \cdot 10^{-32}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-14}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+36}:\\ \;\;\;\;x + z \cdot \frac{x - t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (/ (- x t) (/ z (- y a))))))
   (if (<= z -5.4e-32)
     t_1
     (if (<= z 4.6e-14)
       (+ x (* (- t x) (/ y a)))
       (if (<= z 2e+36) (+ x (* z (/ (- x t) (- a z)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + ((x - t) / (z / (y - a)));
	double tmp;
	if (z <= -5.4e-32) {
		tmp = t_1;
	} else if (z <= 4.6e-14) {
		tmp = x + ((t - x) * (y / a));
	} else if (z <= 2e+36) {
		tmp = x + (z * ((x - t) / (a - z)));
	} 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 + ((x - t) / (z / (y - a)))
    if (z <= (-5.4d-32)) then
        tmp = t_1
    else if (z <= 4.6d-14) then
        tmp = x + ((t - x) * (y / a))
    else if (z <= 2d+36) then
        tmp = x + (z * ((x - t) / (a - z)))
    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 + ((x - t) / (z / (y - a)));
	double tmp;
	if (z <= -5.4e-32) {
		tmp = t_1;
	} else if (z <= 4.6e-14) {
		tmp = x + ((t - x) * (y / a));
	} else if (z <= 2e+36) {
		tmp = x + (z * ((x - t) / (a - z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + ((x - t) / (z / (y - a)))
	tmp = 0
	if z <= -5.4e-32:
		tmp = t_1
	elif z <= 4.6e-14:
		tmp = x + ((t - x) * (y / a))
	elif z <= 2e+36:
		tmp = x + (z * ((x - t) / (a - z)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a))))
	tmp = 0.0
	if (z <= -5.4e-32)
		tmp = t_1;
	elseif (z <= 4.6e-14)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	elseif (z <= 2e+36)
		tmp = Float64(x + Float64(z * Float64(Float64(x - t) / Float64(a - z))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + ((x - t) / (z / (y - a)));
	tmp = 0.0;
	if (z <= -5.4e-32)
		tmp = t_1;
	elseif (z <= 4.6e-14)
		tmp = x + ((t - x) * (y / a));
	elseif (z <= 2e+36)
		tmp = x + (z * ((x - t) / (a - z)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e-32], t$95$1, If[LessEqual[z, 4.6e-14], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+36], N[(x + N[(z * N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 2 \cdot 10^{+36}:\\
\;\;\;\;x + z \cdot \frac{x - t}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.39999999999999962e-32 or 2.00000000000000008e36 < z

    1. Initial program 54.2%

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

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

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

      \[\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+63.4%

        \[\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/63.4%

        \[\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/63.4%

        \[\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-sub63.4%

        \[\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--63.4%

        \[\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/63.4%

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

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

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

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

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

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

    if -5.39999999999999962e-32 < z < 4.59999999999999996e-14

    1. Initial program 91.0%

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

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

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

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

    if 4.59999999999999996e-14 < z < 2.00000000000000008e36

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{-32}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-14}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+36}:\\ \;\;\;\;x + z \cdot \frac{x - t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \end{array} \]

Alternative 11: 37.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\frac{z}{y}}\\ \mathbf{if}\;a \leq -2.7 \cdot 10^{-30}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-101}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-239}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-269}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 5.3 \cdot 10^{+54}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ x (/ z y))))
   (if (<= a -2.7e-30)
     x
     (if (<= a -1.15e-101)
       t
       (if (<= a -9.5e-174)
         t_1
         (if (<= a -1.75e-239)
           t
           (if (<= a 1.25e-269) t_1 (if (<= a 5.3e+54) t x))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x / (z / y);
	double tmp;
	if (a <= -2.7e-30) {
		tmp = x;
	} else if (a <= -1.15e-101) {
		tmp = t;
	} else if (a <= -9.5e-174) {
		tmp = t_1;
	} else if (a <= -1.75e-239) {
		tmp = t;
	} else if (a <= 1.25e-269) {
		tmp = t_1;
	} else if (a <= 5.3e+54) {
		tmp = 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) :: t_1
    real(8) :: tmp
    t_1 = x / (z / y)
    if (a <= (-2.7d-30)) then
        tmp = x
    else if (a <= (-1.15d-101)) then
        tmp = t
    else if (a <= (-9.5d-174)) then
        tmp = t_1
    else if (a <= (-1.75d-239)) then
        tmp = t
    else if (a <= 1.25d-269) then
        tmp = t_1
    else if (a <= 5.3d+54) then
        tmp = 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 t_1 = x / (z / y);
	double tmp;
	if (a <= -2.7e-30) {
		tmp = x;
	} else if (a <= -1.15e-101) {
		tmp = t;
	} else if (a <= -9.5e-174) {
		tmp = t_1;
	} else if (a <= -1.75e-239) {
		tmp = t;
	} else if (a <= 1.25e-269) {
		tmp = t_1;
	} else if (a <= 5.3e+54) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x / (z / y)
	tmp = 0
	if a <= -2.7e-30:
		tmp = x
	elif a <= -1.15e-101:
		tmp = t
	elif a <= -9.5e-174:
		tmp = t_1
	elif a <= -1.75e-239:
		tmp = t
	elif a <= 1.25e-269:
		tmp = t_1
	elif a <= 5.3e+54:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x / Float64(z / y))
	tmp = 0.0
	if (a <= -2.7e-30)
		tmp = x;
	elseif (a <= -1.15e-101)
		tmp = t;
	elseif (a <= -9.5e-174)
		tmp = t_1;
	elseif (a <= -1.75e-239)
		tmp = t;
	elseif (a <= 1.25e-269)
		tmp = t_1;
	elseif (a <= 5.3e+54)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x / (z / y);
	tmp = 0.0;
	if (a <= -2.7e-30)
		tmp = x;
	elseif (a <= -1.15e-101)
		tmp = t;
	elseif (a <= -9.5e-174)
		tmp = t_1;
	elseif (a <= -1.75e-239)
		tmp = t;
	elseif (a <= 1.25e-269)
		tmp = t_1;
	elseif (a <= 5.3e+54)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.7e-30], x, If[LessEqual[a, -1.15e-101], t, If[LessEqual[a, -9.5e-174], t$95$1, If[LessEqual[a, -1.75e-239], t, If[LessEqual[a, 1.25e-269], t$95$1, If[LessEqual[a, 5.3e+54], t, x]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{y}}\\
\mathbf{if}\;a \leq -2.7 \cdot 10^{-30}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.15 \cdot 10^{-101}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq -9.5 \cdot 10^{-174}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -1.75 \cdot 10^{-239}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-269}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 5.3 \cdot 10^{+54}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.69999999999999987e-30 or 5.30000000000000018e54 < a

    1. Initial program 72.4%

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

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

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

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

    if -2.69999999999999987e-30 < a < -1.15e-101 or -9.50000000000000075e-174 < a < -1.75000000000000003e-239 or 1.24999999999999995e-269 < a < 5.30000000000000018e54

    1. Initial program 70.9%

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

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

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

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

    if -1.15e-101 < a < -9.50000000000000075e-174 or -1.75000000000000003e-239 < a < 1.24999999999999995e-269

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t - x}{z}} \]
      3. *-commutative64.7%

        \[\leadsto -\color{blue}{\frac{t - x}{z} \cdot y} \]
      4. distribute-rgt-neg-in64.7%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    12. Simplified51.9%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification49.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.7 \cdot 10^{-30}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-101}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-174}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-239}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-269}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 5.3 \cdot 10^{+54}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 12: 48.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{z - y}{z}\\ \mathbf{if}\;a \leq -6.5 \cdot 10^{+48}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-101}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-136}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+54}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- z y) z))))
   (if (<= a -6.5e+48)
     x
     (if (<= a -1e-101)
       t_1
       (if (<= a -2.8e-136) (/ x (/ z y)) (if (<= a 3.8e+54) t_1 x))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((z - y) / z);
	double tmp;
	if (a <= -6.5e+48) {
		tmp = x;
	} else if (a <= -1e-101) {
		tmp = t_1;
	} else if (a <= -2.8e-136) {
		tmp = x / (z / y);
	} else if (a <= 3.8e+54) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = t * ((z - y) / z)
    if (a <= (-6.5d+48)) then
        tmp = x
    else if (a <= (-1d-101)) then
        tmp = t_1
    else if (a <= (-2.8d-136)) then
        tmp = x / (z / y)
    else if (a <= 3.8d+54) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((z - y) / z);
	double tmp;
	if (a <= -6.5e+48) {
		tmp = x;
	} else if (a <= -1e-101) {
		tmp = t_1;
	} else if (a <= -2.8e-136) {
		tmp = x / (z / y);
	} else if (a <= 3.8e+54) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((z - y) / z)
	tmp = 0
	if a <= -6.5e+48:
		tmp = x
	elif a <= -1e-101:
		tmp = t_1
	elif a <= -2.8e-136:
		tmp = x / (z / y)
	elif a <= 3.8e+54:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(z - y) / z))
	tmp = 0.0
	if (a <= -6.5e+48)
		tmp = x;
	elseif (a <= -1e-101)
		tmp = t_1;
	elseif (a <= -2.8e-136)
		tmp = Float64(x / Float64(z / y));
	elseif (a <= 3.8e+54)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((z - y) / z);
	tmp = 0.0;
	if (a <= -6.5e+48)
		tmp = x;
	elseif (a <= -1e-101)
		tmp = t_1;
	elseif (a <= -2.8e-136)
		tmp = x / (z / y);
	elseif (a <= 3.8e+54)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.5e+48], x, If[LessEqual[a, -1e-101], t$95$1, If[LessEqual[a, -2.8e-136], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.8e+54], t$95$1, x]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1 \cdot 10^{-101}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 3.8 \cdot 10^{+54}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.49999999999999972e48 or 3.8000000000000002e54 < a

    1. Initial program 69.5%

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

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

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

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

    if -6.49999999999999972e48 < a < -1.00000000000000005e-101 or -2.8000000000000001e-136 < a < 3.8000000000000002e54

    1. Initial program 73.4%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{-1 \cdot \left(y - z\right)}{z}} \]
      2. neg-mul-156.8%

        \[\leadsto t \cdot \frac{\color{blue}{-\left(y - z\right)}}{z} \]
    9. Simplified56.8%

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

    if -1.00000000000000005e-101 < a < -2.8000000000000001e-136

    1. Initial program 68.5%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t - x}{z}} \]
      3. *-commutative66.6%

        \[\leadsto -\color{blue}{\frac{t - x}{z} \cdot y} \]
      4. distribute-rgt-neg-in66.6%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    12. Simplified83.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.5 \cdot 10^{+48}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-101}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-136}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+54}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 57.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;t \leq -3.6 \cdot 10^{-94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-183}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+29}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= t -3.6e-94)
     t_1
     (if (<= t -1.6e-183) x (if (<= t 5e+29) (* (- t x) (/ y (- a z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -3.6e-94) {
		tmp = t_1;
	} else if (t <= -1.6e-183) {
		tmp = x;
	} else if (t <= 5e+29) {
		tmp = (t - x) * (y / (a - z));
	} 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) / (a - z))
    if (t <= (-3.6d-94)) then
        tmp = t_1
    else if (t <= (-1.6d-183)) then
        tmp = x
    else if (t <= 5d+29) then
        tmp = (t - x) * (y / (a - z))
    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) / (a - z));
	double tmp;
	if (t <= -3.6e-94) {
		tmp = t_1;
	} else if (t <= -1.6e-183) {
		tmp = x;
	} else if (t <= 5e+29) {
		tmp = (t - x) * (y / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if t <= -3.6e-94:
		tmp = t_1
	elif t <= -1.6e-183:
		tmp = x
	elif t <= 5e+29:
		tmp = (t - x) * (y / (a - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (t <= -3.6e-94)
		tmp = t_1;
	elseif (t <= -1.6e-183)
		tmp = x;
	elseif (t <= 5e+29)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (t <= -3.6e-94)
		tmp = t_1;
	elseif (t <= -1.6e-183)
		tmp = x;
	elseif (t <= 5e+29)
		tmp = (t - x) * (y / (a - z));
	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[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.6e-94], t$95$1, If[LessEqual[t, -1.6e-183], x, If[LessEqual[t, 5e+29], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.6 \cdot 10^{-183}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.6e-94 or 5.0000000000000001e29 < t

    1. Initial program 67.4%

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

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

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

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

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

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

    if -3.6e-94 < t < -1.6000000000000001e-183

    1. Initial program 95.6%

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

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

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

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

    if -1.6000000000000001e-183 < t < 5.0000000000000001e29

    1. Initial program 75.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{-94}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-183}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+29}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 14: 36.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;y \leq -7.5 \cdot 10^{+50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{-101}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 720000000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y (- a z)))))
   (if (<= y -7.5e+50)
     t_1
     (if (<= y 2.15e-101) t (if (<= y 720000000000.0) x t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (y <= -7.5e+50) {
		tmp = t_1;
	} else if (y <= 2.15e-101) {
		tmp = t;
	} else if (y <= 720000000000.0) {
		tmp = 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 / (a - z))
    if (y <= (-7.5d+50)) then
        tmp = t_1
    else if (y <= 2.15d-101) then
        tmp = t
    else if (y <= 720000000000.0d0) then
        tmp = 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 / (a - z));
	double tmp;
	if (y <= -7.5e+50) {
		tmp = t_1;
	} else if (y <= 2.15e-101) {
		tmp = t;
	} else if (y <= 720000000000.0) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / (a - z))
	tmp = 0
	if y <= -7.5e+50:
		tmp = t_1
	elif y <= 2.15e-101:
		tmp = t
	elif y <= 720000000000.0:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (y <= -7.5e+50)
		tmp = t_1;
	elseif (y <= 2.15e-101)
		tmp = t;
	elseif (y <= 720000000000.0)
		tmp = x;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / (a - z));
	tmp = 0.0;
	if (y <= -7.5e+50)
		tmp = t_1;
	elseif (y <= 2.15e-101)
		tmp = t;
	elseif (y <= 720000000000.0)
		tmp = x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.5e+50], t$95$1, If[LessEqual[y, 2.15e-101], t, If[LessEqual[y, 720000000000.0], x, t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 2.15 \cdot 10^{-101}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 720000000000:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.4999999999999999e50 or 7.2e11 < y

    1. Initial program 73.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a - z}} \]
    8. Step-by-step derivation
      1. associate-*r/43.4%

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

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

    if -7.4999999999999999e50 < y < 2.1499999999999999e-101

    1. Initial program 70.4%

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

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

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

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

    if 2.1499999999999999e-101 < y < 7.2e11

    1. Initial program 72.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+50}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{-101}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 720000000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \end{array} \]

Alternative 15: 37.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+31}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-103}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.4:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -1.55e+31)
   (* (- t x) (/ y a))
   (if (<= y 1.05e-103) t (if (<= y 1.4) x (* t (/ y (- a z)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -1.55e+31) {
		tmp = (t - x) * (y / a);
	} else if (y <= 1.05e-103) {
		tmp = t;
	} else if (y <= 1.4) {
		tmp = x;
	} else {
		tmp = t * (y / (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) :: tmp
    if (y <= (-1.55d+31)) then
        tmp = (t - x) * (y / a)
    else if (y <= 1.05d-103) then
        tmp = t
    else if (y <= 1.4d0) then
        tmp = x
    else
        tmp = t * (y / (a - z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -1.55e+31) {
		tmp = (t - x) * (y / a);
	} else if (y <= 1.05e-103) {
		tmp = t;
	} else if (y <= 1.4) {
		tmp = x;
	} else {
		tmp = t * (y / (a - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -1.55e+31:
		tmp = (t - x) * (y / a)
	elif y <= 1.05e-103:
		tmp = t
	elif y <= 1.4:
		tmp = x
	else:
		tmp = t * (y / (a - z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -1.55e+31)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (y <= 1.05e-103)
		tmp = t;
	elseif (y <= 1.4)
		tmp = x;
	else
		tmp = Float64(t * Float64(y / Float64(a - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -1.55e+31)
		tmp = (t - x) * (y / a);
	elseif (y <= 1.05e-103)
		tmp = t;
	elseif (y <= 1.4)
		tmp = x;
	else
		tmp = t * (y / (a - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.55e+31], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e-103], t, If[LessEqual[y, 1.4], x, N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+31}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\

\mathbf{elif}\;y \leq 1.05 \cdot 10^{-103}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 1.4:\\
\;\;\;\;x\\

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


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

    1. Initial program 71.7%

      \[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 y around -inf 56.0%

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

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

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

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

    if -1.5500000000000001e31 < y < 1.05000000000000002e-103

    1. Initial program 70.8%

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

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

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

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

    if 1.05000000000000002e-103 < y < 1.3999999999999999

    1. Initial program 72.7%

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

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

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

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

    if 1.3999999999999999 < y

    1. Initial program 73.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a - z}} \]
    8. Step-by-step derivation
      1. associate-*r/47.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+31}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-103}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.4:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \end{array} \]

Alternative 16: 37.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+31}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 1.82 \cdot 10^{-103}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 52000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -1.55e+31)
   (* (- t x) (/ y a))
   (if (<= y 1.82e-103) t (if (<= y 52000000.0) x (/ t (/ (- a z) y))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -1.55e+31) {
		tmp = (t - x) * (y / a);
	} else if (y <= 1.82e-103) {
		tmp = t;
	} else if (y <= 52000000.0) {
		tmp = x;
	} else {
		tmp = t / ((a - z) / 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 (y <= (-1.55d+31)) then
        tmp = (t - x) * (y / a)
    else if (y <= 1.82d-103) then
        tmp = t
    else if (y <= 52000000.0d0) then
        tmp = x
    else
        tmp = t / ((a - z) / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -1.55e+31) {
		tmp = (t - x) * (y / a);
	} else if (y <= 1.82e-103) {
		tmp = t;
	} else if (y <= 52000000.0) {
		tmp = x;
	} else {
		tmp = t / ((a - z) / y);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -1.55e+31:
		tmp = (t - x) * (y / a)
	elif y <= 1.82e-103:
		tmp = t
	elif y <= 52000000.0:
		tmp = x
	else:
		tmp = t / ((a - z) / y)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -1.55e+31)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (y <= 1.82e-103)
		tmp = t;
	elseif (y <= 52000000.0)
		tmp = x;
	else
		tmp = Float64(t / Float64(Float64(a - z) / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -1.55e+31)
		tmp = (t - x) * (y / a);
	elseif (y <= 1.82e-103)
		tmp = t;
	elseif (y <= 52000000.0)
		tmp = x;
	else
		tmp = t / ((a - z) / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.55e+31], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.82e-103], t, If[LessEqual[y, 52000000.0], x, N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+31}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\

\mathbf{elif}\;y \leq 1.82 \cdot 10^{-103}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 52000000:\\
\;\;\;\;x\\

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


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

    1. Initial program 71.7%

      \[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 y around -inf 56.0%

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

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

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

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

    if -1.5500000000000001e31 < y < 1.8199999999999999e-103

    1. Initial program 70.8%

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

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

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

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

    if 1.8199999999999999e-103 < y < 5.2e7

    1. Initial program 72.7%

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

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

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

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

    if 5.2e7 < y

    1. Initial program 73.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+31}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 1.82 \cdot 10^{-103}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 52000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y}}\\ \end{array} \]

Alternative 17: 67.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{-8} \lor \neg \left(z \leq 5.5 \cdot 10^{-46}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.8000000000000003e-8 or 5.49999999999999983e-46 < z

    1. Initial program 56.4%

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

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

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

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

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

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

    if -5.8000000000000003e-8 < z < 5.49999999999999983e-46

    1. Initial program 94.3%

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

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

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

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

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

Alternative 18: 69.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{-7}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-15}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -7.2e-7)
   (* t (/ (- y z) (- a z)))
   (if (<= z 9.2e-15) (+ x (* (- t x) (/ y a))) (+ t (/ (- x t) (/ z y))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -7.2e-7) {
		tmp = t * ((y - z) / (a - z));
	} else if (z <= 9.2e-15) {
		tmp = x + ((t - x) * (y / a));
	} else {
		tmp = t + ((x - t) / (z / 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 (z <= (-7.2d-7)) then
        tmp = t * ((y - z) / (a - z))
    else if (z <= 9.2d-15) then
        tmp = x + ((t - x) * (y / a))
    else
        tmp = t + ((x - t) / (z / y))
    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.2e-7) {
		tmp = t * ((y - z) / (a - z));
	} else if (z <= 9.2e-15) {
		tmp = x + ((t - x) * (y / a));
	} else {
		tmp = t + ((x - t) / (z / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -7.2e-7:
		tmp = t * ((y - z) / (a - z))
	elif z <= 9.2e-15:
		tmp = x + ((t - x) * (y / a))
	else:
		tmp = t + ((x - t) / (z / y))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -7.2e-7)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	elseif (z <= 9.2e-15)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	else
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -7.2e-7)
		tmp = t * ((y - z) / (a - z));
	elseif (z <= 9.2e-15)
		tmp = x + ((t - x) * (y / a));
	else
		tmp = t + ((x - t) / (z / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.2e-7], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e-15], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{-7}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.19999999999999989e-7

    1. Initial program 52.6%

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

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

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

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

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

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

    if -7.19999999999999989e-7 < z < 9.19999999999999961e-15

    1. Initial program 91.3%

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

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

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

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

    if 9.19999999999999961e-15 < z

    1. Initial program 60.9%

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

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around inf 59.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+59.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/59.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/59.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-sub59.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--59.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/59.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--59.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{-7}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-15}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \end{array} \]

Alternative 19: 38.2% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.75 \cdot 10^{-30}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+54}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2.75e-30) x (if (<= a 3.2e+54) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.75e-30) {
		tmp = x;
	} else if (a <= 3.2e+54) {
		tmp = 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 (a <= (-2.75d-30)) then
        tmp = x
    else if (a <= 3.2d+54) then
        tmp = 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 (a <= -2.75e-30) {
		tmp = x;
	} else if (a <= 3.2e+54) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2.75e-30:
		tmp = x
	elif a <= 3.2e+54:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2.75e-30)
		tmp = x;
	elseif (a <= 3.2e+54)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2.75e-30)
		tmp = x;
	elseif (a <= 3.2e+54)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.75e-30], x, If[LessEqual[a, 3.2e+54], t, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.75 \cdot 10^{-30}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.2 \cdot 10^{+54}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.74999999999999988e-30 or 3.2e54 < a

    1. Initial program 72.4%

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

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

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

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

    if -2.74999999999999988e-30 < a < 3.2e54

    1. Initial program 71.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.75 \cdot 10^{-30}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+54}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 20: 25.0% 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 71.8%

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

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

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

    \[\leadsto \color{blue}{t} \]
  5. Final simplification29.2%

    \[\leadsto t \]

Developer target: 83.8% 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 2023318 
(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))))