Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.3% → 96.1%
Time: 21.4s
Alternatives: 25
Speedup: 0.3×

Specification

?
\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{t - x}{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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(y - z\right) \cdot \frac{t - x}{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 25 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: 80.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{t - x}{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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 96.1% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\

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

\mathbf{elif}\;t_2 \leq 4 \cdot 10^{+286}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)\\

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


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

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

    1. Initial program 3.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 81.4%

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative81.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} \]
      2. associate--l+81.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)} \]
      3. associate-*r/81.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) \]
      4. associate-*r/81.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) \]
      5. div-sub81.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}} \]
      6. distribute-lft-out--81.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{-\color{blue}{x \cdot \left(y - a\right)}}{z} \]
      4. distribute-rgt-neg-in81.4%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 77.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around -inf 99.5%

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

    if 0.5 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.00000000000000013e286

    1. Initial program 97.9%

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

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

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

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

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

Alternative 2: 96.0% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\

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

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+232}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

    1. Initial program 3.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 81.4%

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative81.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} \]
      2. associate--l+81.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)} \]
      3. associate-*r/81.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) \]
      4. associate-*r/81.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) \]
      5. div-sub81.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}} \]
      6. distribute-lft-out--81.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{-\color{blue}{x \cdot \left(y - a\right)}}{z} \]
      4. distribute-rgt-neg-in81.4%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 77.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around -inf 99.5%

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

    if 0.5 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.99999999999999987e232

    1. Initial program 98.8%

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

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

Alternative 3: 93.2% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\

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

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


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

    1. Initial program 92.5%

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

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

    1. Initial program 3.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 81.4%

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative81.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} \]
      2. associate--l+81.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)} \]
      3. associate-*r/81.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) \]
      4. associate-*r/81.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) \]
      5. div-sub81.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}} \]
      6. distribute-lft-out--81.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{-\color{blue}{x \cdot \left(y - a\right)}}{z} \]
      4. distribute-rgt-neg-in81.4%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 77.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around -inf 99.5%

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

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

Alternative 4: 91.1% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 91.0%

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

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

    1. Initial program 3.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 81.4%

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative81.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} \]
      2. associate--l+81.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)} \]
      3. associate-*r/81.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) \]
      4. associate-*r/81.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) \]
      5. div-sub81.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}} \]
      6. distribute-lft-out--81.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{-\color{blue}{x \cdot \left(y - a\right)}}{z} \]
      4. distribute-rgt-neg-in81.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 67.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{if}\;z \leq -1.1 \cdot 10^{+202}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{+124}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -7 \cdot 10^{+61}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{-129}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;z \leq -7.7 \cdot 10^{-205}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+30}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+71}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+76}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ t (* (/ x z) (- y a)))))
   (if (<= z -1.1e+202)
     t_2
     (if (<= z -2.55e+124)
       t_1
       (if (<= z -7e+61)
         t_2
         (if (<= z -2.05e-129)
           (- x (* y (/ (- x t) a)))
           (if (<= z -7.7e-205)
             (/ y (/ (- a z) (- t x)))
             (if (<= z 1.95e+30)
               (+ x (/ y (/ a (- t x))))
               (if (<= z 2e+71)
                 t_1
                 (if (<= z 9.8e+76) (+ x (/ (* y t) a)) t_2))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = t + ((x / z) * (y - a));
	double tmp;
	if (z <= -1.1e+202) {
		tmp = t_2;
	} else if (z <= -2.55e+124) {
		tmp = t_1;
	} else if (z <= -7e+61) {
		tmp = t_2;
	} else if (z <= -2.05e-129) {
		tmp = x - (y * ((x - t) / a));
	} else if (z <= -7.7e-205) {
		tmp = y / ((a - z) / (t - x));
	} else if (z <= 1.95e+30) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 2e+71) {
		tmp = t_1;
	} else if (z <= 9.8e+76) {
		tmp = x + ((y * t) / a);
	} else {
		tmp = t_2;
	}
	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 = t * ((y - z) / (a - z))
    t_2 = t + ((x / z) * (y - a))
    if (z <= (-1.1d+202)) then
        tmp = t_2
    else if (z <= (-2.55d+124)) then
        tmp = t_1
    else if (z <= (-7d+61)) then
        tmp = t_2
    else if (z <= (-2.05d-129)) then
        tmp = x - (y * ((x - t) / a))
    else if (z <= (-7.7d-205)) then
        tmp = y / ((a - z) / (t - x))
    else if (z <= 1.95d+30) then
        tmp = x + (y / (a / (t - x)))
    else if (z <= 2d+71) then
        tmp = t_1
    else if (z <= 9.8d+76) then
        tmp = x + ((y * t) / a)
    else
        tmp = t_2
    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 t_2 = t + ((x / z) * (y - a));
	double tmp;
	if (z <= -1.1e+202) {
		tmp = t_2;
	} else if (z <= -2.55e+124) {
		tmp = t_1;
	} else if (z <= -7e+61) {
		tmp = t_2;
	} else if (z <= -2.05e-129) {
		tmp = x - (y * ((x - t) / a));
	} else if (z <= -7.7e-205) {
		tmp = y / ((a - z) / (t - x));
	} else if (z <= 1.95e+30) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 2e+71) {
		tmp = t_1;
	} else if (z <= 9.8e+76) {
		tmp = x + ((y * t) / a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = t + ((x / z) * (y - a))
	tmp = 0
	if z <= -1.1e+202:
		tmp = t_2
	elif z <= -2.55e+124:
		tmp = t_1
	elif z <= -7e+61:
		tmp = t_2
	elif z <= -2.05e-129:
		tmp = x - (y * ((x - t) / a))
	elif z <= -7.7e-205:
		tmp = y / ((a - z) / (t - x))
	elif z <= 1.95e+30:
		tmp = x + (y / (a / (t - x)))
	elif z <= 2e+71:
		tmp = t_1
	elif z <= 9.8e+76:
		tmp = x + ((y * t) / a)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(t + Float64(Float64(x / z) * Float64(y - a)))
	tmp = 0.0
	if (z <= -1.1e+202)
		tmp = t_2;
	elseif (z <= -2.55e+124)
		tmp = t_1;
	elseif (z <= -7e+61)
		tmp = t_2;
	elseif (z <= -2.05e-129)
		tmp = Float64(x - Float64(y * Float64(Float64(x - t) / a)));
	elseif (z <= -7.7e-205)
		tmp = Float64(y / Float64(Float64(a - z) / Float64(t - x)));
	elseif (z <= 1.95e+30)
		tmp = Float64(x + Float64(y / Float64(a / Float64(t - x))));
	elseif (z <= 2e+71)
		tmp = t_1;
	elseif (z <= 9.8e+76)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = t + ((x / z) * (y - a));
	tmp = 0.0;
	if (z <= -1.1e+202)
		tmp = t_2;
	elseif (z <= -2.55e+124)
		tmp = t_1;
	elseif (z <= -7e+61)
		tmp = t_2;
	elseif (z <= -2.05e-129)
		tmp = x - (y * ((x - t) / a));
	elseif (z <= -7.7e-205)
		tmp = y / ((a - z) / (t - x));
	elseif (z <= 1.95e+30)
		tmp = x + (y / (a / (t - x)));
	elseif (z <= 2e+71)
		tmp = t_1;
	elseif (z <= 9.8e+76)
		tmp = x + ((y * t) / a);
	else
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(t + N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+202], t$95$2, If[LessEqual[z, -2.55e+124], t$95$1, If[LessEqual[z, -7e+61], t$95$2, If[LessEqual[z, -2.05e-129], N[(x - N[(y * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.7e-205], N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e+30], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+71], t$95$1, If[LessEqual[z, 9.8e+76], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.55 \cdot 10^{+124}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -7 \cdot 10^{+61}:\\
\;\;\;\;t_2\\

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

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

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

\mathbf{elif}\;z \leq 2 \cdot 10^{+71}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -1.09999999999999989e202 or -2.5499999999999999e124 < z < -7.00000000000000036e61 or 9.80000000000000053e76 < z

    1. Initial program 62.0%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative62.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} \]
      2. associate--l+62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{-\color{blue}{x \cdot \left(y - a\right)}}{z} \]
      4. distribute-rgt-neg-in71.1%

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

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

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

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

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

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

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

        \[\leadsto t - \frac{x \cdot \color{blue}{\left(a - y\right)}}{z} \]
      12. *-commutative71.1%

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

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

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

    if -1.09999999999999989e202 < z < -2.5499999999999999e124 or 1.95000000000000005e30 < z < 2.0000000000000001e71

    1. Initial program 84.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in t around inf 77.2%

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

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

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

    if -7.00000000000000036e61 < z < -2.05e-129

    1. Initial program 99.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 69.6%

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

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

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

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

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

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

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

    if -2.05e-129 < z < -7.7000000000000001e-205

    1. Initial program 85.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in y around inf 81.0%

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative81.0%

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
      3. associate-*r/77.8%

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

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

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

    if -7.7000000000000001e-205 < z < 1.95000000000000005e30

    1. Initial program 93.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 76.2%

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

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

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

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

    if 2.0000000000000001e71 < z < 9.80000000000000053e76

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 100.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+202}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{+124}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -7 \cdot 10^{+61}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{-129}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;z \leq -7.7 \cdot 10^{-205}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+30}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+71}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+76}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \end{array} \]

Alternative 6: 50.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\left(--1\right) - \frac{a}{z}}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -1.42 \cdot 10^{+226}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{+198}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+72}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-258}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.38 \cdot 10^{-272}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-185}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-152}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y}}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+83}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ t (- (- -1.0) (/ a z)))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= z -1.42e+226)
     t
     (if (<= z -8.2e+198)
       (* x (/ (- y a) z))
       (if (<= z -5e+72)
         t_1
         (if (<= z -9.5e-258)
           t_2
           (if (<= z 1.38e-272)
             (+ x (/ (* y t) a))
             (if (<= z 1.6e-185)
               t_2
               (if (<= z 2.5e-152)
                 (/ t (/ (- a z) y))
                 (if (<= z 1.85e+83) t_2 t_1))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t / (-(-1.0) - (a / z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -1.42e+226) {
		tmp = t;
	} else if (z <= -8.2e+198) {
		tmp = x * ((y - a) / z);
	} else if (z <= -5e+72) {
		tmp = t_1;
	} else if (z <= -9.5e-258) {
		tmp = t_2;
	} else if (z <= 1.38e-272) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.6e-185) {
		tmp = t_2;
	} else if (z <= 2.5e-152) {
		tmp = t / ((a - z) / y);
	} else if (z <= 1.85e+83) {
		tmp = t_2;
	} 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 = t / (-(-1.0d0) - (a / z))
    t_2 = x * (1.0d0 - (y / a))
    if (z <= (-1.42d+226)) then
        tmp = t
    else if (z <= (-8.2d+198)) then
        tmp = x * ((y - a) / z)
    else if (z <= (-5d+72)) then
        tmp = t_1
    else if (z <= (-9.5d-258)) then
        tmp = t_2
    else if (z <= 1.38d-272) then
        tmp = x + ((y * t) / a)
    else if (z <= 1.6d-185) then
        tmp = t_2
    else if (z <= 2.5d-152) then
        tmp = t / ((a - z) / y)
    else if (z <= 1.85d+83) then
        tmp = t_2
    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 / (-(-1.0) - (a / z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -1.42e+226) {
		tmp = t;
	} else if (z <= -8.2e+198) {
		tmp = x * ((y - a) / z);
	} else if (z <= -5e+72) {
		tmp = t_1;
	} else if (z <= -9.5e-258) {
		tmp = t_2;
	} else if (z <= 1.38e-272) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.6e-185) {
		tmp = t_2;
	} else if (z <= 2.5e-152) {
		tmp = t / ((a - z) / y);
	} else if (z <= 1.85e+83) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t / (-(-1.0) - (a / z))
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -1.42e+226:
		tmp = t
	elif z <= -8.2e+198:
		tmp = x * ((y - a) / z)
	elif z <= -5e+72:
		tmp = t_1
	elif z <= -9.5e-258:
		tmp = t_2
	elif z <= 1.38e-272:
		tmp = x + ((y * t) / a)
	elif z <= 1.6e-185:
		tmp = t_2
	elif z <= 2.5e-152:
		tmp = t / ((a - z) / y)
	elif z <= 1.85e+83:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t / Float64(Float64(-(-1.0)) - Float64(a / z)))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -1.42e+226)
		tmp = t;
	elseif (z <= -8.2e+198)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= -5e+72)
		tmp = t_1;
	elseif (z <= -9.5e-258)
		tmp = t_2;
	elseif (z <= 1.38e-272)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (z <= 1.6e-185)
		tmp = t_2;
	elseif (z <= 2.5e-152)
		tmp = Float64(t / Float64(Float64(a - z) / y));
	elseif (z <= 1.85e+83)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t / (-(-1.0) - (a / z));
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -1.42e+226)
		tmp = t;
	elseif (z <= -8.2e+198)
		tmp = x * ((y - a) / z);
	elseif (z <= -5e+72)
		tmp = t_1;
	elseif (z <= -9.5e-258)
		tmp = t_2;
	elseif (z <= 1.38e-272)
		tmp = x + ((y * t) / a);
	elseif (z <= 1.6e-185)
		tmp = t_2;
	elseif (z <= 2.5e-152)
		tmp = t / ((a - z) / y);
	elseif (z <= 1.85e+83)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[((--1.0) - N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.42e+226], t, If[LessEqual[z, -8.2e+198], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5e+72], t$95$1, If[LessEqual[z, -9.5e-258], t$95$2, If[LessEqual[z, 1.38e-272], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-185], t$95$2, If[LessEqual[z, 2.5e-152], N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e+83], t$95$2, t$95$1]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -8.2 \cdot 10^{+198}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\

\mathbf{elif}\;z \leq -5 \cdot 10^{+72}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -9.5 \cdot 10^{-258}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-185}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 1.85 \cdot 10^{+83}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -1.42e226

    1. Initial program 76.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 76.1%

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

    if -1.42e226 < z < -8.2000000000000003e198

    1. Initial program 51.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around inf 35.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} + -1 \cdot \frac{a \cdot x}{z} \]
      3. mul-1-neg45.1%

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

        \[\leadsto \frac{y}{z} \cdot x + \left(-\color{blue}{\frac{a}{z} \cdot x}\right) \]
      5. distribute-lft-neg-in77.4%

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-\frac{a}{z}\right) \cdot x} \]
      6. distribute-rgt-in77.4%

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

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

        \[\leadsto x \cdot \color{blue}{\frac{y - a}{z}} \]
    10. Simplified77.4%

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

    if -8.2000000000000003e198 < z < -4.99999999999999992e72 or 1.8500000000000001e83 < z

    1. Initial program 65.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around 0 33.3%

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

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{a - z}{z}}} \]
    6. Step-by-step derivation
      1. mul-1-neg49.5%

        \[\leadsto \frac{t}{\color{blue}{-\frac{a - z}{z}}} \]
      2. div-sub49.5%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} - \frac{z}{z}\right)}} \]
      3. sub-neg49.5%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} + \left(-\frac{z}{z}\right)\right)}} \]
      4. *-inverses49.5%

        \[\leadsto \frac{t}{-\left(\frac{a}{z} + \left(-\color{blue}{1}\right)\right)} \]
      5. metadata-eval49.5%

        \[\leadsto \frac{t}{-\left(\frac{a}{z} + \color{blue}{-1}\right)} \]
    7. Simplified49.5%

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

    if -4.99999999999999992e72 < z < -9.5000000000000009e-258 or 1.37999999999999997e-272 < z < 1.5999999999999999e-185 or 2.4999999999999998e-152 < z < 1.8500000000000001e83

    1. Initial program 94.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around inf 62.2%

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

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

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

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

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

    if -9.5000000000000009e-258 < z < 1.37999999999999997e-272

    1. Initial program 94.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 94.3%

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

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

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

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

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

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

    if 1.5999999999999999e-185 < z < 2.4999999999999998e-152

    1. Initial program 65.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around 0 76.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.42 \cdot 10^{+226}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{+198}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+72}:\\ \;\;\;\;\frac{t}{\left(--1\right) - \frac{a}{z}}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-258}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.38 \cdot 10^{-272}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-185}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-152}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y}}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+83}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\left(--1\right) - \frac{a}{z}}\\ \end{array} \]

Alternative 7: 49.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y \cdot t}{a}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -2.05 \cdot 10^{+226}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{+196}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -8 \cdot 10^{+75}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-257}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-270}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-194}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-71}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+112}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* y t) a))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= z -2.05e+226)
     t
     (if (<= z -4.4e+196)
       (* x (/ (- y a) z))
       (if (<= z -8e+75)
         t
         (if (<= z -9e-257)
           t_2
           (if (<= z 9.5e-270)
             t_1
             (if (<= z 4.6e-194)
               t_2
               (if (<= z 5.6e-71) t_1 (if (<= z 2.4e+112) t_2 t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y * t) / a);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2.05e+226) {
		tmp = t;
	} else if (z <= -4.4e+196) {
		tmp = x * ((y - a) / z);
	} else if (z <= -8e+75) {
		tmp = t;
	} else if (z <= -9e-257) {
		tmp = t_2;
	} else if (z <= 9.5e-270) {
		tmp = t_1;
	} else if (z <= 4.6e-194) {
		tmp = t_2;
	} else if (z <= 5.6e-71) {
		tmp = t_1;
	} else if (z <= 2.4e+112) {
		tmp = t_2;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + ((y * t) / a)
    t_2 = x * (1.0d0 - (y / a))
    if (z <= (-2.05d+226)) then
        tmp = t
    else if (z <= (-4.4d+196)) then
        tmp = x * ((y - a) / z)
    else if (z <= (-8d+75)) then
        tmp = t
    else if (z <= (-9d-257)) then
        tmp = t_2
    else if (z <= 9.5d-270) then
        tmp = t_1
    else if (z <= 4.6d-194) then
        tmp = t_2
    else if (z <= 5.6d-71) then
        tmp = t_1
    else if (z <= 2.4d+112) then
        tmp = t_2
    else
        tmp = t
    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 * t) / a);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2.05e+226) {
		tmp = t;
	} else if (z <= -4.4e+196) {
		tmp = x * ((y - a) / z);
	} else if (z <= -8e+75) {
		tmp = t;
	} else if (z <= -9e-257) {
		tmp = t_2;
	} else if (z <= 9.5e-270) {
		tmp = t_1;
	} else if (z <= 4.6e-194) {
		tmp = t_2;
	} else if (z <= 5.6e-71) {
		tmp = t_1;
	} else if (z <= 2.4e+112) {
		tmp = t_2;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y * t) / a)
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -2.05e+226:
		tmp = t
	elif z <= -4.4e+196:
		tmp = x * ((y - a) / z)
	elif z <= -8e+75:
		tmp = t
	elif z <= -9e-257:
		tmp = t_2
	elif z <= 9.5e-270:
		tmp = t_1
	elif z <= 4.6e-194:
		tmp = t_2
	elif z <= 5.6e-71:
		tmp = t_1
	elif z <= 2.4e+112:
		tmp = t_2
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y * t) / a))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -2.05e+226)
		tmp = t;
	elseif (z <= -4.4e+196)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= -8e+75)
		tmp = t;
	elseif (z <= -9e-257)
		tmp = t_2;
	elseif (z <= 9.5e-270)
		tmp = t_1;
	elseif (z <= 4.6e-194)
		tmp = t_2;
	elseif (z <= 5.6e-71)
		tmp = t_1;
	elseif (z <= 2.4e+112)
		tmp = t_2;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y * t) / a);
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -2.05e+226)
		tmp = t;
	elseif (z <= -4.4e+196)
		tmp = x * ((y - a) / z);
	elseif (z <= -8e+75)
		tmp = t;
	elseif (z <= -9e-257)
		tmp = t_2;
	elseif (z <= 9.5e-270)
		tmp = t_1;
	elseif (z <= 4.6e-194)
		tmp = t_2;
	elseif (z <= 5.6e-71)
		tmp = t_1;
	elseif (z <= 2.4e+112)
		tmp = t_2;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e+226], t, If[LessEqual[z, -4.4e+196], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8e+75], t, If[LessEqual[z, -9e-257], t$95$2, If[LessEqual[z, 9.5e-270], t$95$1, If[LessEqual[z, 4.6e-194], t$95$2, If[LessEqual[z, 5.6e-71], t$95$1, If[LessEqual[z, 2.4e+112], t$95$2, t]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.4 \cdot 10^{+196}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\

\mathbf{elif}\;z \leq -8 \cdot 10^{+75}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -9 \cdot 10^{-257}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{-270}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 4.6 \cdot 10^{-194}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 5.6 \cdot 10^{-71}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{+112}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.04999999999999993e226 or -4.39999999999999995e196 < z < -7.99999999999999941e75 or 2.4e112 < z

    1. Initial program 66.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 46.5%

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

    if -2.04999999999999993e226 < z < -4.39999999999999995e196

    1. Initial program 58.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around inf 31.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} + -1 \cdot \frac{a \cdot x}{z} \]
      3. mul-1-neg39.0%

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

        \[\leadsto \frac{y}{z} \cdot x + \left(-\color{blue}{\frac{a}{z} \cdot x}\right) \]
      5. distribute-lft-neg-in66.7%

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} - \frac{a}{z}\right)} \]
      8. div-sub66.7%

        \[\leadsto x \cdot \color{blue}{\frac{y - a}{z}} \]
    10. Simplified66.7%

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

    if -7.99999999999999941e75 < z < -9.0000000000000005e-257 or 9.5000000000000006e-270 < z < 4.60000000000000005e-194 or 5.60000000000000001e-71 < z < 2.4e112

    1. Initial program 92.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around inf 59.6%

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

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

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

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

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

    if -9.0000000000000005e-257 < z < 9.5000000000000006e-270 or 4.60000000000000005e-194 < z < 5.60000000000000001e-71

    1. Initial program 90.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 82.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+226}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{+196}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -8 \cdot 10^{+75}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-257}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-270}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-194}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-71}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+112}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 8: 49.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -7.1 \cdot 10^{+227}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{+196}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{+75}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-256}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-274}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-152}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y}}\\ \mathbf{elif}\;z \leq 4.15 \cdot 10^{+111}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= z -7.1e+227)
     t
     (if (<= z -8.8e+196)
       (* x (/ (- y a) z))
       (if (<= z -2.7e+75)
         t
         (if (<= z -6e-256)
           t_1
           (if (<= z 1.05e-274)
             (+ x (/ (* y t) a))
             (if (<= z 1.65e-185)
               t_1
               (if (<= z 5.4e-152)
                 (/ t (/ (- a z) y))
                 (if (<= z 4.15e+111) t_1 t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -7.1e+227) {
		tmp = t;
	} else if (z <= -8.8e+196) {
		tmp = x * ((y - a) / z);
	} else if (z <= -2.7e+75) {
		tmp = t;
	} else if (z <= -6e-256) {
		tmp = t_1;
	} else if (z <= 1.05e-274) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.65e-185) {
		tmp = t_1;
	} else if (z <= 5.4e-152) {
		tmp = t / ((a - z) / y);
	} else if (z <= 4.15e+111) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    if (z <= (-7.1d+227)) then
        tmp = t
    else if (z <= (-8.8d+196)) then
        tmp = x * ((y - a) / z)
    else if (z <= (-2.7d+75)) then
        tmp = t
    else if (z <= (-6d-256)) then
        tmp = t_1
    else if (z <= 1.05d-274) then
        tmp = x + ((y * t) / a)
    else if (z <= 1.65d-185) then
        tmp = t_1
    else if (z <= 5.4d-152) then
        tmp = t / ((a - z) / y)
    else if (z <= 4.15d+111) then
        tmp = t_1
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -7.1e+227) {
		tmp = t;
	} else if (z <= -8.8e+196) {
		tmp = x * ((y - a) / z);
	} else if (z <= -2.7e+75) {
		tmp = t;
	} else if (z <= -6e-256) {
		tmp = t_1;
	} else if (z <= 1.05e-274) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.65e-185) {
		tmp = t_1;
	} else if (z <= 5.4e-152) {
		tmp = t / ((a - z) / y);
	} else if (z <= 4.15e+111) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -7.1e+227:
		tmp = t
	elif z <= -8.8e+196:
		tmp = x * ((y - a) / z)
	elif z <= -2.7e+75:
		tmp = t
	elif z <= -6e-256:
		tmp = t_1
	elif z <= 1.05e-274:
		tmp = x + ((y * t) / a)
	elif z <= 1.65e-185:
		tmp = t_1
	elif z <= 5.4e-152:
		tmp = t / ((a - z) / y)
	elif z <= 4.15e+111:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -7.1e+227)
		tmp = t;
	elseif (z <= -8.8e+196)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= -2.7e+75)
		tmp = t;
	elseif (z <= -6e-256)
		tmp = t_1;
	elseif (z <= 1.05e-274)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (z <= 1.65e-185)
		tmp = t_1;
	elseif (z <= 5.4e-152)
		tmp = Float64(t / Float64(Float64(a - z) / y));
	elseif (z <= 4.15e+111)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -7.1e+227)
		tmp = t;
	elseif (z <= -8.8e+196)
		tmp = x * ((y - a) / z);
	elseif (z <= -2.7e+75)
		tmp = t;
	elseif (z <= -6e-256)
		tmp = t_1;
	elseif (z <= 1.05e-274)
		tmp = x + ((y * t) / a);
	elseif (z <= 1.65e-185)
		tmp = t_1;
	elseif (z <= 5.4e-152)
		tmp = t / ((a - z) / y);
	elseif (z <= 4.15e+111)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.1e+227], t, If[LessEqual[z, -8.8e+196], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.7e+75], t, If[LessEqual[z, -6e-256], t$95$1, If[LessEqual[z, 1.05e-274], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-185], t$95$1, If[LessEqual[z, 5.4e-152], N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.15e+111], t$95$1, t]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -8.8 \cdot 10^{+196}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\

\mathbf{elif}\;z \leq -2.7 \cdot 10^{+75}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -6 \cdot 10^{-256}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{-185}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 4.15 \cdot 10^{+111}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -7.1000000000000002e227 or -8.7999999999999999e196 < z < -2.69999999999999998e75 or 4.14999999999999988e111 < z

    1. Initial program 66.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 46.5%

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

    if -7.1000000000000002e227 < z < -8.7999999999999999e196

    1. Initial program 58.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around inf 31.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} + -1 \cdot \frac{a \cdot x}{z} \]
      3. mul-1-neg39.0%

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

        \[\leadsto \frac{y}{z} \cdot x + \left(-\color{blue}{\frac{a}{z} \cdot x}\right) \]
      5. distribute-lft-neg-in66.7%

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} - \frac{a}{z}\right)} \]
      8. div-sub66.7%

        \[\leadsto x \cdot \color{blue}{\frac{y - a}{z}} \]
    10. Simplified66.7%

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

    if -2.69999999999999998e75 < z < -5.9999999999999996e-256 or 1.04999999999999997e-274 < z < 1.6499999999999999e-185 or 5.39999999999999997e-152 < z < 4.14999999999999988e111

    1. Initial program 93.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around inf 60.6%

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

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

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

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

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

    if -5.9999999999999996e-256 < z < 1.04999999999999997e-274

    1. Initial program 94.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 94.3%

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

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

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

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

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

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

    if 1.6499999999999999e-185 < z < 5.39999999999999997e-152

    1. Initial program 65.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around 0 76.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.1 \cdot 10^{+227}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{+196}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{+75}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-256}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-274}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-185}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-152}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y}}\\ \mathbf{elif}\;z \leq 4.15 \cdot 10^{+111}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 9: 70.5% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;z \leq -1.18 \cdot 10^{+67}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -7.8 \cdot 10^{-179}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 1.85 \cdot 10^{+78}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.09999999999999989e202 or -9.39999999999999958e123 < z < -1.17999999999999998e67 or 1.84999999999999992e78 < z

    1. Initial program 62.0%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative62.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} \]
      2. associate--l+62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{-\color{blue}{x \cdot \left(y - a\right)}}{z} \]
      4. distribute-rgt-neg-in71.1%

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

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

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

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

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

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

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

        \[\leadsto t - \frac{x \cdot \color{blue}{\left(a - y\right)}}{z} \]
      12. *-commutative71.1%

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

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

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

    if -1.09999999999999989e202 < z < -9.39999999999999958e123

    1. Initial program 85.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in t around inf 76.7%

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

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

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

    if -1.17999999999999998e67 < z < -7.8000000000000005e-179 or -7.7000000000000001e-205 < z < 1.84999999999999992e78

    1. Initial program 93.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 70.4%

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

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

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

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

    if -7.8000000000000005e-179 < z < -7.7000000000000001e-205

    1. Initial program 82.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in y around inf 82.7%

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative82.7%

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
      3. associate-*r/85.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+202}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{elif}\;z \leq -9.4 \cdot 10^{+123}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -1.18 \cdot 10^{+67}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-179}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq -7.7 \cdot 10^{-205}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+78}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \end{array} \]

Alternative 10: 57.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;t \leq -3.5 \cdot 10^{+106}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -75000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-88}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-253}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-305}:\\ \;\;\;\;\frac{-x}{\frac{z}{a - y}}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-27}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= t -3.5e+106)
     t_2
     (if (<= t -75000000.0)
       t_1
       (if (<= t -8.2e-88)
         t_2
         (if (<= t -1.75e-253)
           (- x (/ (* x y) a))
           (if (<= t 7.8e-305)
             (/ (- x) (/ z (- a y)))
             (if (<= t 1.3e-27) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -3.5e+106) {
		tmp = t_2;
	} else if (t <= -75000000.0) {
		tmp = t_1;
	} else if (t <= -8.2e-88) {
		tmp = t_2;
	} else if (t <= -1.75e-253) {
		tmp = x - ((x * y) / a);
	} else if (t <= 7.8e-305) {
		tmp = -x / (z / (a - y));
	} else if (t <= 1.3e-27) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 * (1.0d0 - (y / a))
    t_2 = t * ((y - z) / (a - z))
    if (t <= (-3.5d+106)) then
        tmp = t_2
    else if (t <= (-75000000.0d0)) then
        tmp = t_1
    else if (t <= (-8.2d-88)) then
        tmp = t_2
    else if (t <= (-1.75d-253)) then
        tmp = x - ((x * y) / a)
    else if (t <= 7.8d-305) then
        tmp = -x / (z / (a - y))
    else if (t <= 1.3d-27) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -3.5e+106) {
		tmp = t_2;
	} else if (t <= -75000000.0) {
		tmp = t_1;
	} else if (t <= -8.2e-88) {
		tmp = t_2;
	} else if (t <= -1.75e-253) {
		tmp = x - ((x * y) / a);
	} else if (t <= 7.8e-305) {
		tmp = -x / (z / (a - y));
	} else if (t <= 1.3e-27) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if t <= -3.5e+106:
		tmp = t_2
	elif t <= -75000000.0:
		tmp = t_1
	elif t <= -8.2e-88:
		tmp = t_2
	elif t <= -1.75e-253:
		tmp = x - ((x * y) / a)
	elif t <= 7.8e-305:
		tmp = -x / (z / (a - y))
	elif t <= 1.3e-27:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (t <= -3.5e+106)
		tmp = t_2;
	elseif (t <= -75000000.0)
		tmp = t_1;
	elseif (t <= -8.2e-88)
		tmp = t_2;
	elseif (t <= -1.75e-253)
		tmp = Float64(x - Float64(Float64(x * y) / a));
	elseif (t <= 7.8e-305)
		tmp = Float64(Float64(-x) / Float64(z / Float64(a - y)));
	elseif (t <= 1.3e-27)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (t <= -3.5e+106)
		tmp = t_2;
	elseif (t <= -75000000.0)
		tmp = t_1;
	elseif (t <= -8.2e-88)
		tmp = t_2;
	elseif (t <= -1.75e-253)
		tmp = x - ((x * y) / a);
	elseif (t <= 7.8e-305)
		tmp = -x / (z / (a - y));
	elseif (t <= 1.3e-27)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e+106], t$95$2, If[LessEqual[t, -75000000.0], t$95$1, If[LessEqual[t, -8.2e-88], t$95$2, If[LessEqual[t, -1.75e-253], N[(x - N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-305], N[((-x) / N[(z / N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-27], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -75000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -8.2 \cdot 10^{-88}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1.75 \cdot 10^{-253}:\\
\;\;\;\;x - \frac{x \cdot y}{a}\\

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

\mathbf{elif}\;t \leq 1.3 \cdot 10^{-27}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.49999999999999981e106 or -7.5e7 < t < -8.2000000000000002e-88 or 1.30000000000000009e-27 < t

    1. Initial program 89.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in t around inf 75.3%

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

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

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

    if -3.49999999999999981e106 < t < -7.5e7 or 7.8000000000000005e-305 < t < 1.30000000000000009e-27

    1. Initial program 80.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around inf 70.3%

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

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

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

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

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

    if -8.2000000000000002e-88 < t < -1.75000000000000011e-253

    1. Initial program 72.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in t around 0 65.1%

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

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

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

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

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

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

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

    if -1.75000000000000011e-253 < t < 7.8000000000000005e-305

    1. Initial program 39.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around inf 42.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{+106}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -75000000:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-88}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-253}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-305}:\\ \;\;\;\;\frac{-x}{\frac{z}{a - y}}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-27}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 11: 69.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := t + x \cdot \frac{y - a}{z}\\ \mathbf{if}\;z \leq -4.9 \cdot 10^{+197}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{+125}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{+66}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+28}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+77}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ t (* x (/ (- y a) z)))))
   (if (<= z -4.9e+197)
     t_2
     (if (<= z -1.2e+125)
       t_1
       (if (<= z -5.8e+66)
         t_2
         (if (<= z 6.2e+28)
           (+ x (/ y (/ a (- t x))))
           (if (<= z 5.4e+69)
             t_1
             (if (<= z 2e+77) (+ x (/ (* y t) a)) t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = t + (x * ((y - a) / z));
	double tmp;
	if (z <= -4.9e+197) {
		tmp = t_2;
	} else if (z <= -1.2e+125) {
		tmp = t_1;
	} else if (z <= -5.8e+66) {
		tmp = t_2;
	} else if (z <= 6.2e+28) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 5.4e+69) {
		tmp = t_1;
	} else if (z <= 2e+77) {
		tmp = x + ((y * t) / a);
	} else {
		tmp = t_2;
	}
	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 = t * ((y - z) / (a - z))
    t_2 = t + (x * ((y - a) / z))
    if (z <= (-4.9d+197)) then
        tmp = t_2
    else if (z <= (-1.2d+125)) then
        tmp = t_1
    else if (z <= (-5.8d+66)) then
        tmp = t_2
    else if (z <= 6.2d+28) then
        tmp = x + (y / (a / (t - x)))
    else if (z <= 5.4d+69) then
        tmp = t_1
    else if (z <= 2d+77) then
        tmp = x + ((y * t) / a)
    else
        tmp = t_2
    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 t_2 = t + (x * ((y - a) / z));
	double tmp;
	if (z <= -4.9e+197) {
		tmp = t_2;
	} else if (z <= -1.2e+125) {
		tmp = t_1;
	} else if (z <= -5.8e+66) {
		tmp = t_2;
	} else if (z <= 6.2e+28) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 5.4e+69) {
		tmp = t_1;
	} else if (z <= 2e+77) {
		tmp = x + ((y * t) / a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = t + (x * ((y - a) / z))
	tmp = 0
	if z <= -4.9e+197:
		tmp = t_2
	elif z <= -1.2e+125:
		tmp = t_1
	elif z <= -5.8e+66:
		tmp = t_2
	elif z <= 6.2e+28:
		tmp = x + (y / (a / (t - x)))
	elif z <= 5.4e+69:
		tmp = t_1
	elif z <= 2e+77:
		tmp = x + ((y * t) / a)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(t + Float64(x * Float64(Float64(y - a) / z)))
	tmp = 0.0
	if (z <= -4.9e+197)
		tmp = t_2;
	elseif (z <= -1.2e+125)
		tmp = t_1;
	elseif (z <= -5.8e+66)
		tmp = t_2;
	elseif (z <= 6.2e+28)
		tmp = Float64(x + Float64(y / Float64(a / Float64(t - x))));
	elseif (z <= 5.4e+69)
		tmp = t_1;
	elseif (z <= 2e+77)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = t + (x * ((y - a) / z));
	tmp = 0.0;
	if (z <= -4.9e+197)
		tmp = t_2;
	elseif (z <= -1.2e+125)
		tmp = t_1;
	elseif (z <= -5.8e+66)
		tmp = t_2;
	elseif (z <= 6.2e+28)
		tmp = x + (y / (a / (t - x)));
	elseif (z <= 5.4e+69)
		tmp = t_1;
	elseif (z <= 2e+77)
		tmp = x + ((y * t) / a);
	else
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.9e+197], t$95$2, If[LessEqual[z, -1.2e+125], t$95$1, If[LessEqual[z, -5.8e+66], t$95$2, If[LessEqual[z, 6.2e+28], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e+69], t$95$1, If[LessEqual[z, 2e+77], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.2 \cdot 10^{+125}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -5.8 \cdot 10^{+66}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 5.4 \cdot 10^{+69}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.90000000000000026e197 or -1.2e125 < z < -5.79999999999999972e66 or 1.99999999999999997e77 < z

    1. Initial program 62.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 62.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
      9. associate-/l*63.9%

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{\color{blue}{\left(0 - \left(y - a\right)\right)} \cdot x}{z} \]
      5. associate--r-69.6%

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

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

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

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

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

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

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

    if -4.90000000000000026e197 < z < -1.2e125 or 6.2000000000000001e28 < z < 5.3999999999999996e69

    1. Initial program 83.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in t around inf 79.2%

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

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

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

    if -5.79999999999999972e66 < z < 6.2000000000000001e28

    1. Initial program 93.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 68.6%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a} + x} \]
    3. Step-by-step derivation
      1. +-commutative68.6%

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

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

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

    if 5.3999999999999996e69 < z < 1.99999999999999997e77

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 100.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.9 \cdot 10^{+197}:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{+125}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{+66}:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+28}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+69}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+77}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \end{array} \]

Alternative 12: 69.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{if}\;z \leq -1.1 \cdot 10^{+202}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{+123}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{+61}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+29}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{+69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+76}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ t (* (/ x z) (- y a)))))
   (if (<= z -1.1e+202)
     t_2
     (if (<= z -1.55e+123)
       t_1
       (if (<= z -1.25e+61)
         t_2
         (if (<= z 8.8e+29)
           (+ x (/ y (/ a (- t x))))
           (if (<= z 5.6e+69)
             t_1
             (if (<= z 9.8e+76) (+ x (/ (* y t) a)) t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = t + ((x / z) * (y - a));
	double tmp;
	if (z <= -1.1e+202) {
		tmp = t_2;
	} else if (z <= -1.55e+123) {
		tmp = t_1;
	} else if (z <= -1.25e+61) {
		tmp = t_2;
	} else if (z <= 8.8e+29) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 5.6e+69) {
		tmp = t_1;
	} else if (z <= 9.8e+76) {
		tmp = x + ((y * t) / a);
	} else {
		tmp = t_2;
	}
	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 = t * ((y - z) / (a - z))
    t_2 = t + ((x / z) * (y - a))
    if (z <= (-1.1d+202)) then
        tmp = t_2
    else if (z <= (-1.55d+123)) then
        tmp = t_1
    else if (z <= (-1.25d+61)) then
        tmp = t_2
    else if (z <= 8.8d+29) then
        tmp = x + (y / (a / (t - x)))
    else if (z <= 5.6d+69) then
        tmp = t_1
    else if (z <= 9.8d+76) then
        tmp = x + ((y * t) / a)
    else
        tmp = t_2
    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 t_2 = t + ((x / z) * (y - a));
	double tmp;
	if (z <= -1.1e+202) {
		tmp = t_2;
	} else if (z <= -1.55e+123) {
		tmp = t_1;
	} else if (z <= -1.25e+61) {
		tmp = t_2;
	} else if (z <= 8.8e+29) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 5.6e+69) {
		tmp = t_1;
	} else if (z <= 9.8e+76) {
		tmp = x + ((y * t) / a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = t + ((x / z) * (y - a))
	tmp = 0
	if z <= -1.1e+202:
		tmp = t_2
	elif z <= -1.55e+123:
		tmp = t_1
	elif z <= -1.25e+61:
		tmp = t_2
	elif z <= 8.8e+29:
		tmp = x + (y / (a / (t - x)))
	elif z <= 5.6e+69:
		tmp = t_1
	elif z <= 9.8e+76:
		tmp = x + ((y * t) / a)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(t + Float64(Float64(x / z) * Float64(y - a)))
	tmp = 0.0
	if (z <= -1.1e+202)
		tmp = t_2;
	elseif (z <= -1.55e+123)
		tmp = t_1;
	elseif (z <= -1.25e+61)
		tmp = t_2;
	elseif (z <= 8.8e+29)
		tmp = Float64(x + Float64(y / Float64(a / Float64(t - x))));
	elseif (z <= 5.6e+69)
		tmp = t_1;
	elseif (z <= 9.8e+76)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = t + ((x / z) * (y - a));
	tmp = 0.0;
	if (z <= -1.1e+202)
		tmp = t_2;
	elseif (z <= -1.55e+123)
		tmp = t_1;
	elseif (z <= -1.25e+61)
		tmp = t_2;
	elseif (z <= 8.8e+29)
		tmp = x + (y / (a / (t - x)));
	elseif (z <= 5.6e+69)
		tmp = t_1;
	elseif (z <= 9.8e+76)
		tmp = x + ((y * t) / a);
	else
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(t + N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+202], t$95$2, If[LessEqual[z, -1.55e+123], t$95$1, If[LessEqual[z, -1.25e+61], t$95$2, If[LessEqual[z, 8.8e+29], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e+69], t$95$1, If[LessEqual[z, 9.8e+76], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.55 \cdot 10^{+123}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.25 \cdot 10^{+61}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 5.6 \cdot 10^{+69}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.09999999999999989e202 or -1.55000000000000003e123 < z < -1.25000000000000004e61 or 9.80000000000000053e76 < z

    1. Initial program 62.0%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative62.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} \]
      2. associate--l+62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{-\color{blue}{x \cdot \left(y - a\right)}}{z} \]
      4. distribute-rgt-neg-in71.1%

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

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

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

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

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

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

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

        \[\leadsto t - \frac{x \cdot \color{blue}{\left(a - y\right)}}{z} \]
      12. *-commutative71.1%

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

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

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

    if -1.09999999999999989e202 < z < -1.55000000000000003e123 or 8.8000000000000005e29 < z < 5.59999999999999964e69

    1. Initial program 84.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in t around inf 77.2%

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

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

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

    if -1.25000000000000004e61 < z < 8.8000000000000005e29

    1. Initial program 93.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 68.6%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a} + x} \]
    3. Step-by-step derivation
      1. +-commutative68.6%

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

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

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

    if 5.59999999999999964e69 < z < 9.80000000000000053e76

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 100.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+202}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{+123}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{+61}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+29}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{+69}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+76}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \end{array} \]

Alternative 13: 52.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -3.6 \cdot 10^{+69}:\\ \;\;\;\;\frac{t}{\frac{-z}{y - z}}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-255}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-274}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-153}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y}}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+82}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\left(--1\right) - \frac{a}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= z -3.6e+69)
     (/ t (/ (- z) (- y z)))
     (if (<= z -1.25e-255)
       t_1
       (if (<= z 6.5e-274)
         (+ x (/ (* y t) a))
         (if (<= z 1.65e-185)
           t_1
           (if (<= z 5e-153)
             (/ t (/ (- a z) y))
             (if (<= z 8.2e+82) t_1 (/ t (- (- -1.0) (/ a z)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -3.6e+69) {
		tmp = t / (-z / (y - z));
	} else if (z <= -1.25e-255) {
		tmp = t_1;
	} else if (z <= 6.5e-274) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.65e-185) {
		tmp = t_1;
	} else if (z <= 5e-153) {
		tmp = t / ((a - z) / y);
	} else if (z <= 8.2e+82) {
		tmp = t_1;
	} else {
		tmp = t / (-(-1.0) - (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 * (1.0d0 - (y / a))
    if (z <= (-3.6d+69)) then
        tmp = t / (-z / (y - z))
    else if (z <= (-1.25d-255)) then
        tmp = t_1
    else if (z <= 6.5d-274) then
        tmp = x + ((y * t) / a)
    else if (z <= 1.65d-185) then
        tmp = t_1
    else if (z <= 5d-153) then
        tmp = t / ((a - z) / y)
    else if (z <= 8.2d+82) then
        tmp = t_1
    else
        tmp = t / (-(-1.0d0) - (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 * (1.0 - (y / a));
	double tmp;
	if (z <= -3.6e+69) {
		tmp = t / (-z / (y - z));
	} else if (z <= -1.25e-255) {
		tmp = t_1;
	} else if (z <= 6.5e-274) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.65e-185) {
		tmp = t_1;
	} else if (z <= 5e-153) {
		tmp = t / ((a - z) / y);
	} else if (z <= 8.2e+82) {
		tmp = t_1;
	} else {
		tmp = t / (-(-1.0) - (a / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -3.6e+69:
		tmp = t / (-z / (y - z))
	elif z <= -1.25e-255:
		tmp = t_1
	elif z <= 6.5e-274:
		tmp = x + ((y * t) / a)
	elif z <= 1.65e-185:
		tmp = t_1
	elif z <= 5e-153:
		tmp = t / ((a - z) / y)
	elif z <= 8.2e+82:
		tmp = t_1
	else:
		tmp = t / (-(-1.0) - (a / z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -3.6e+69)
		tmp = Float64(t / Float64(Float64(-z) / Float64(y - z)));
	elseif (z <= -1.25e-255)
		tmp = t_1;
	elseif (z <= 6.5e-274)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (z <= 1.65e-185)
		tmp = t_1;
	elseif (z <= 5e-153)
		tmp = Float64(t / Float64(Float64(a - z) / y));
	elseif (z <= 8.2e+82)
		tmp = t_1;
	else
		tmp = Float64(t / Float64(Float64(-(-1.0)) - Float64(a / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -3.6e+69)
		tmp = t / (-z / (y - z));
	elseif (z <= -1.25e-255)
		tmp = t_1;
	elseif (z <= 6.5e-274)
		tmp = x + ((y * t) / a);
	elseif (z <= 1.65e-185)
		tmp = t_1;
	elseif (z <= 5e-153)
		tmp = t / ((a - z) / y);
	elseif (z <= 8.2e+82)
		tmp = t_1;
	else
		tmp = t / (-(-1.0) - (a / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e+69], N[(t / N[((-z) / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.25e-255], t$95$1, If[LessEqual[z, 6.5e-274], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-185], t$95$1, If[LessEqual[z, 5e-153], N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e+82], t$95$1, N[(t / N[((--1.0) - N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-255}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{-185}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 8.2 \cdot 10^{+82}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.6000000000000003e69

    1. Initial program 73.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around 0 30.2%

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{\frac{-1 \cdot z}{y - z}}} \]
      2. mul-1-neg51.4%

        \[\leadsto \frac{t}{\frac{\color{blue}{-z}}{y - z}} \]
    7. Simplified51.4%

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

    if -3.6000000000000003e69 < z < -1.2499999999999999e-255 or 6.49999999999999959e-274 < z < 1.6499999999999999e-185 or 5.00000000000000033e-153 < z < 8.1999999999999999e82

    1. Initial program 94.2%

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

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

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

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

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

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

    if -1.2499999999999999e-255 < z < 6.49999999999999959e-274

    1. Initial program 94.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 94.3%

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

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

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

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

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

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

    if 1.6499999999999999e-185 < z < 5.00000000000000033e-153

    1. Initial program 65.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around 0 76.4%

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

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

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

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

    if 8.1999999999999999e82 < z

    1. Initial program 58.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around 0 33.2%

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

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{a - z}{z}}} \]
    6. Step-by-step derivation
      1. mul-1-neg51.0%

        \[\leadsto \frac{t}{\color{blue}{-\frac{a - z}{z}}} \]
      2. div-sub51.0%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} - \frac{z}{z}\right)}} \]
      3. sub-neg51.0%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} + \left(-\frac{z}{z}\right)\right)}} \]
      4. *-inverses51.0%

        \[\leadsto \frac{t}{-\left(\frac{a}{z} + \left(-\color{blue}{1}\right)\right)} \]
      5. metadata-eval51.0%

        \[\leadsto \frac{t}{-\left(\frac{a}{z} + \color{blue}{-1}\right)} \]
    7. Simplified51.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+69}:\\ \;\;\;\;\frac{t}{\frac{-z}{y - z}}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-255}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-274}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-185}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-153}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y}}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+82}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\left(--1\right) - \frac{a}{z}}\\ \end{array} \]

Alternative 14: 48.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -2.35 \cdot 10^{+226}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{+196}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -6 \cdot 10^{+74}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-153}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{+111}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= z -2.35e+226)
     t
     (if (<= z -8.2e+196)
       (* x (/ (- y a) z))
       (if (<= z -6e+74)
         t
         (if (<= z 1.25e-185)
           t_1
           (if (<= z 2.3e-153) (/ t (/ a y)) (if (<= z 6.4e+111) t_1 t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2.35e+226) {
		tmp = t;
	} else if (z <= -8.2e+196) {
		tmp = x * ((y - a) / z);
	} else if (z <= -6e+74) {
		tmp = t;
	} else if (z <= 1.25e-185) {
		tmp = t_1;
	} else if (z <= 2.3e-153) {
		tmp = t / (a / y);
	} else if (z <= 6.4e+111) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    if (z <= (-2.35d+226)) then
        tmp = t
    else if (z <= (-8.2d+196)) then
        tmp = x * ((y - a) / z)
    else if (z <= (-6d+74)) then
        tmp = t
    else if (z <= 1.25d-185) then
        tmp = t_1
    else if (z <= 2.3d-153) then
        tmp = t / (a / y)
    else if (z <= 6.4d+111) then
        tmp = t_1
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2.35e+226) {
		tmp = t;
	} else if (z <= -8.2e+196) {
		tmp = x * ((y - a) / z);
	} else if (z <= -6e+74) {
		tmp = t;
	} else if (z <= 1.25e-185) {
		tmp = t_1;
	} else if (z <= 2.3e-153) {
		tmp = t / (a / y);
	} else if (z <= 6.4e+111) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -2.35e+226:
		tmp = t
	elif z <= -8.2e+196:
		tmp = x * ((y - a) / z)
	elif z <= -6e+74:
		tmp = t
	elif z <= 1.25e-185:
		tmp = t_1
	elif z <= 2.3e-153:
		tmp = t / (a / y)
	elif z <= 6.4e+111:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -2.35e+226)
		tmp = t;
	elseif (z <= -8.2e+196)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= -6e+74)
		tmp = t;
	elseif (z <= 1.25e-185)
		tmp = t_1;
	elseif (z <= 2.3e-153)
		tmp = Float64(t / Float64(a / y));
	elseif (z <= 6.4e+111)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -2.35e+226)
		tmp = t;
	elseif (z <= -8.2e+196)
		tmp = x * ((y - a) / z);
	elseif (z <= -6e+74)
		tmp = t;
	elseif (z <= 1.25e-185)
		tmp = t_1;
	elseif (z <= 2.3e-153)
		tmp = t / (a / y);
	elseif (z <= 6.4e+111)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.35e+226], t, If[LessEqual[z, -8.2e+196], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6e+74], t, If[LessEqual[z, 1.25e-185], t$95$1, If[LessEqual[z, 2.3e-153], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e+111], t$95$1, t]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -8.2 \cdot 10^{+196}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\

\mathbf{elif}\;z \leq -6 \cdot 10^{+74}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 1.25 \cdot 10^{-185}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 6.4 \cdot 10^{+111}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.34999999999999996e226 or -8.1999999999999993e196 < z < -6e74 or 6.4000000000000002e111 < z

    1. Initial program 66.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 46.5%

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

    if -2.34999999999999996e226 < z < -8.1999999999999993e196

    1. Initial program 58.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around inf 31.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} + -1 \cdot \frac{a \cdot x}{z} \]
      3. mul-1-neg39.0%

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

        \[\leadsto \frac{y}{z} \cdot x + \left(-\color{blue}{\frac{a}{z} \cdot x}\right) \]
      5. distribute-lft-neg-in66.7%

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} - \frac{a}{z}\right)} \]
      8. div-sub66.7%

        \[\leadsto x \cdot \color{blue}{\frac{y - a}{z}} \]
    10. Simplified66.7%

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

    if -6e74 < z < 1.2500000000000001e-185 or 2.29999999999999997e-153 < z < 6.4000000000000002e111

    1. Initial program 93.3%

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

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

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

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

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

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

    if 1.2500000000000001e-185 < z < 2.29999999999999997e-153

    1. Initial program 65.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around 0 76.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.35 \cdot 10^{+226}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{+196}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -6 \cdot 10^{+74}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-185}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-153}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{+111}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 15: 73.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -3.4 \cdot 10^{-179}:\\
\;\;\;\;x + \frac{y - z}{t_1}\\

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

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+28}:\\
\;\;\;\;x + \frac{y}{t_1}\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9.49999999999999959e61 or 4.79999999999999962e28 < z

    1. Initial program 68.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 57.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
      9. associate-/l*59.0%

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

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

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

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

    if -9.49999999999999959e61 < z < -3.3999999999999997e-179

    1. Initial program 97.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 68.9%

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

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

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

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

    if -3.3999999999999997e-179 < z < -7.7000000000000001e-205

    1. Initial program 82.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in y around inf 82.7%

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative82.7%

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
      3. associate-*r/85.3%

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

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

    if -7.7000000000000001e-205 < z < 4.79999999999999962e28

    1. Initial program 93.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 76.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+61}:\\ \;\;\;\;t + \frac{y - a}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-179}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq -7.7 \cdot 10^{-205}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+28}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y - a}{z} \cdot \left(x - t\right)\\ \end{array} \]

Alternative 16: 69.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq 4.6 \cdot 10^{-188}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 520000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.4999999999999996e109

    1. Initial program 92.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in y around 0 58.4%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t - x}{\frac{a - z}{z}}} \]
      5. div-sub82.1%

        \[\leadsto x - \frac{t - x}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      6. *-inverses82.1%

        \[\leadsto x - \frac{t - x}{\frac{a}{z} - \color{blue}{1}} \]
    4. Simplified82.1%

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

    if -4.4999999999999996e109 < a < 4.6e-188 or 2.2499999999999999e-65 < a < 5.2e8

    1. Initial program 71.7%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative69.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} \]
      2. associate--l+69.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)} \]
      3. associate-*r/69.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) \]
      4. associate-*r/69.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) \]
      5. div-sub71.2%

        \[\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}} \]
      6. distribute-lft-out--71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \left(\frac{y}{\frac{z}{t - x}} - \color{blue}{\frac{a}{\frac{z}{t - x}}}\right) \]
      8. div-sub77.7%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
      9. associate-/l*72.1%

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

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

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

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

    if 4.6e-188 < a < 2.2499999999999999e-65

    1. Initial program 79.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in y around inf 67.3%

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative67.3%

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
      3. associate-*r/70.7%

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

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

    if 5.2e8 < a

    1. Initial program 93.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 59.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.5 \cdot 10^{+109}:\\ \;\;\;\;x + \frac{x - t}{-1 + \frac{a}{z}}\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{-188}:\\ \;\;\;\;t + \frac{y - a}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 2.25 \cdot 10^{-65}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;a \leq 520000000:\\ \;\;\;\;t + \frac{y - a}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 17: 67.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{+74}:\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.3000000000000002e74

    1. Initial program 90.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 58.4%

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

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

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

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

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

    if -3.3000000000000002e74 < a < 4.3999999999999999e-188

    1. Initial program 72.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 74.2%

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

        \[\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} \]
      2. associate--l+74.2%

        \[\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)} \]
      3. associate-*r/74.2%

        \[\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) \]
      4. associate-*r/74.2%

        \[\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) \]
      5. div-sub75.3%

        \[\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}} \]
      6. distribute-lft-out--75.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
      9. associate-/l*75.3%

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

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

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

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

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

    if 4.3999999999999999e-188 < a < 1.7999999999999999e-65

    1. Initial program 79.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in y around inf 67.3%

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative67.3%

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
      3. associate-*r/70.7%

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

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

    if 1.7999999999999999e-65 < a < 5.2e12

    1. Initial program 66.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 65.9%

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

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      5. div-sub71.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}} \]
      6. distribute-lft-out--71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
      9. associate-/l*71.8%

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{\color{blue}{\left(0 - \left(y - a\right)\right)} \cdot x}{z} \]
      5. associate--r-65.5%

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

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

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

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

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

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

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

    if 5.2e12 < a

    1. Initial program 93.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 59.1%

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    7. Simplified80.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.3 \cdot 10^{+74}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-188}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-65}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;a \leq 5200000000000:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \end{array} \]

Alternative 18: 36.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.6 \cdot 10^{+46}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 2.8 \cdot 10^{-188}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.60000000000000013e46 or 7.7999999999999997e27 < a

    1. Initial program 90.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 44.2%

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

    if -2.60000000000000013e46 < a < -2.60000000000000002e-54

    1. Initial program 84.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around inf 46.2%

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

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

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

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

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

    if -2.60000000000000002e-54 < a < 2.8000000000000001e-188

    1. Initial program 69.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 43.4%

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

    if 2.8000000000000001e-188 < a < 7.7999999999999997e27

    1. Initial program 74.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around 0 45.5%

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\frac{a}{y - z}}} \]
    6. Step-by-step derivation
      1. div-inv29.8%

        \[\leadsto \color{blue}{t \cdot \frac{1}{\frac{a}{y - z}}} \]
      2. clear-num29.8%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a}} \]
    7. Applied egg-rr29.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{+46}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-54}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-188}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{+27}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 19: 37.0% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -5.4 \cdot 10^{-54}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 2.2 \cdot 10^{-240}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 1150:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.60000000000000021e109 or 1150 < a

    1. Initial program 91.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 44.4%

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

    if -4.60000000000000021e109 < a < -5.40000000000000051e-54 or 2.1999999999999999e-240 < a < 1150

    1. Initial program 76.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around inf 44.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} + -1 \cdot \frac{a \cdot x}{z} \]
      3. mul-1-neg36.9%

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

        \[\leadsto \frac{y}{z} \cdot x + \left(-\color{blue}{\frac{a}{z} \cdot x}\right) \]
      5. distribute-lft-neg-in37.4%

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-\frac{a}{z}\right) \cdot x} \]
      6. distribute-rgt-in39.8%

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

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

        \[\leadsto x \cdot \color{blue}{\frac{y - a}{z}} \]
    10. Simplified39.8%

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

    if -5.40000000000000051e-54 < a < 2.1999999999999999e-240

    1. Initial program 70.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 43.8%

      \[\leadsto \color{blue}{t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification42.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.6 \cdot 10^{+109}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.4 \cdot 10^{-54}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-240}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1150:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 20: 37.6% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;a \leq 3.7 \cdot 10^{-120}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 340:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 4 \cdot 10^{+57}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.3000000000000001e46 or 4.00000000000000019e57 < a

    1. Initial program 90.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 45.3%

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

    if -2.3000000000000001e46 < a < -9.5000000000000006e-55 or 3.70000000000000001e-120 < a < 340

    1. Initial program 76.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around inf 40.9%

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

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

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

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

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

    if -9.5000000000000006e-55 < a < 3.70000000000000001e-120 or 340 < a < 4.00000000000000019e57

    1. Initial program 73.2%

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification41.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+46}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-55}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-120}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 340:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+57}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 21: 61.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{-120} \lor \neg \left(x \leq 8 \cdot 10^{+76}\right):\\
\;\;\;\;x - y \cdot \frac{x - t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.59999999999999973e-120 or 8.0000000000000004e76 < x

    1. Initial program 76.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 46.6%

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    7. Simplified58.8%

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

    if -4.59999999999999973e-120 < x < 8.0000000000000004e76

    1. Initial program 88.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in t around inf 74.2%

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

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

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

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

Alternative 22: 61.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{-120}:\\
\;\;\;\;x - y \cdot \frac{x - t}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.59999999999999973e-120

    1. Initial program 77.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 46.0%

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

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

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

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

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

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

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

    if -4.59999999999999973e-120 < x < 2.9999999999999998e77

    1. Initial program 88.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in t around inf 74.2%

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

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

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

    if 2.9999999999999998e77 < x

    1. Initial program 75.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 51.5%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    4. Simplified61.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.6 \cdot 10^{-120}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;x \leq 3 \cdot 10^{+77}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 23: 36.5% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 3.6 \cdot 10^{-188}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 8.2 \cdot 10^{-22}:\\
\;\;\;\;y \cdot \frac{t}{a}\\

\mathbf{elif}\;a \leq 9 \cdot 10^{+57}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.1e-49 or 8.99999999999999991e57 < a

    1. Initial program 89.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 40.7%

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

    if -3.1e-49 < a < 3.5999999999999997e-188 or 8.1999999999999999e-22 < a < 8.99999999999999991e57

    1. Initial program 71.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 41.3%

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

    if 3.5999999999999997e-188 < a < 8.1999999999999999e-22

    1. Initial program 76.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around 0 40.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.1 \cdot 10^{-49}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-188}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-22}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+57}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 24: 38.6% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;a \leq 1.15 \cdot 10^{+58}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.1e-49 or 1.15000000000000001e58 < a

    1. Initial program 89.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 40.7%

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

    if -3.1e-49 < a < 1.15000000000000001e58

    1. Initial program 73.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 32.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.1 \cdot 10^{-49}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+58}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 25: 25.4% accurate, 13.0× speedup?

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

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

    \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
  2. Taylor expanded in z around inf 21.8%

    \[\leadsto \color{blue}{t} \]
  3. Final simplification21.8%

    \[\leadsto t \]

Reproduce

?
herbie shell --seed 2023171 
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
  :precision binary64
  (+ x (* (- y z) (/ (- t x) (- a z)))))