Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.4% → 94.2%
Time: 19.5s
Alternatives: 22
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 22 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.4% 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: 94.2% accurate, 0.0× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt[3]{a - z}\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_3 := \frac{z}{t - x}\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{-272}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{{t_1}^{2}}, \frac{t - x}{t_1}, x\right)\\

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

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


\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.99999999999999986e-272

    1. Initial program 93.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}} + x \]
      5. fma-def96.1%

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

        \[\leadsto \mathsf{fma}\left(\frac{y - z}{\color{blue}{{\left(\sqrt[3]{a - z}\right)}^{2}}}, \frac{t - x}{\sqrt[3]{a - z}}, x\right) \]
    3. Applied egg-rr96.1%

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

    if -1.99999999999999986e-272 < (+.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. Step-by-step derivation
      1. *-commutative3.4%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr3.4%

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

      \[\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}} \]
    5. Step-by-step derivation
      1. sub-neg85.3%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

Alternative 2: 94.8% accurate, 0.1× speedup?

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

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

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

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


\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.99999999999999986e-272

    1. Initial program 93.2%

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

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

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

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

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

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

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

    if -1.99999999999999986e-272 < (+.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. Step-by-step derivation
      1. *-commutative3.4%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr3.4%

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

      \[\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}} \]
    5. Step-by-step derivation
      1. sub-neg85.3%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

Alternative 3: 94.8% accurate, 0.3× speedup?

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

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

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


\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.99999999999999986e-272 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 90.8%

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

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

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

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

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

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

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

    if -1.99999999999999986e-272 < (+.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. Step-by-step derivation
      1. *-commutative3.4%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr3.4%

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

      \[\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}} \]
    5. Step-by-step derivation
      1. sub-neg85.3%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 88.2% accurate, 0.3× speedup?

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

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

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


\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)))) < -1e-168 or 2e-205 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 92.7%

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

    if -1e-168 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e-205

    1. Initial program 8.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 85.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. +-commutative85.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+85.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/85.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/85.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-sub85.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--85.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-neg85.4%

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

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

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

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

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

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

Alternative 5: 91.3% accurate, 0.3× speedup?

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

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

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


\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)))) < -5e-243 or 2e-205 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 92.0%

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

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

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

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

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

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

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

    if -5e-243 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e-205

    1. Initial program 3.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 86.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. +-commutative86.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+86.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/86.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/86.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-sub86.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--86.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-neg86.5%

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

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

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

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

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

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

Alternative 6: 61.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -3.75:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -0.041:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-24}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.7 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -6.4999999999999998e36 or -3.75 < z < -0.0410000000000000017

    1. Initial program 65.0%

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

      \[\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. +-commutative67.1%

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

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

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

        \[\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-sub67.1%

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

        \[\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-neg67.1%

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

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

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

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

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

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

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

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

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

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

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

    if -6.4999999999999998e36 < z < -3.75 or -1.7000000000000001e-35 < z < 1.60000000000000006e-24

    1. Initial program 94.3%

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y \cdot \left(t - x\right)}{a} + x\right)\right)} \]
      2. expm1-udef35.4%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y \cdot \left(t - x\right)}{a} + x\right)} - 1} \]
      3. +-commutative35.4%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}}\right)} - 1 \]
      4. associate-/l*37.4%

        \[\leadsto e^{\mathsf{log1p}\left(x + \color{blue}{\frac{y}{\frac{a}{t - x}}}\right)} - 1 \]
    4. Applied egg-rr37.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x + \frac{y}{\frac{a}{t - x}}\right)} - 1} \]
    5. Step-by-step derivation
      1. expm1-def49.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x + \frac{y}{\frac{a}{t - x}}\right)\right)} \]
      2. expm1-log1p81.0%

        \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
      3. associate-/r/80.7%

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

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

    if -0.0410000000000000017 < z < -1.7000000000000001e-35

    1. Initial program 99.2%

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

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

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

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

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

    if 1.60000000000000006e-24 < z < 2.7e95

    1. Initial program 78.9%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{x - t}{z}} \]
    7. Simplified55.1%

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

    if 2.7e95 < z

    1. Initial program 55.1%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \left(\frac{y}{z} - 1\right)} \]
      3. sub-neg62.2%

        \[\leadsto -t \cdot \color{blue}{\left(\frac{y}{z} + \left(-1\right)\right)} \]
      4. metadata-eval62.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+36}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -3.75:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -0.041:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-35}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-24}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 7: 60.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -3.5:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -0.023:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 1.32 \cdot 10^{-21}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.5999999999999999e36 or -3.5 < z < -0.023

    1. Initial program 65.0%

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

      \[\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. +-commutative67.1%

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

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

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

        \[\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-sub67.1%

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

        \[\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-neg67.1%

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

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

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

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

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

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

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

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

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

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

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

    if -1.5999999999999999e36 < z < -3.5 or -1.65e-35 < z < 1.32e-21

    1. Initial program 94.3%

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

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

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

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

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

    if -0.023 < z < -1.65e-35

    1. Initial program 99.2%

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

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

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

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

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

    if 1.32e-21 < z < 2.50000000000000012e95

    1. Initial program 78.9%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{x - t}{z}} \]
    7. Simplified55.1%

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

    if 2.50000000000000012e95 < z

    1. Initial program 55.1%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \left(\frac{y}{z} - 1\right)} \]
      3. sub-neg62.2%

        \[\leadsto -t \cdot \color{blue}{\left(\frac{y}{z} + \left(-1\right)\right)} \]
      4. metadata-eval62.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+36}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -3.5:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq -0.023:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-35}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{-21}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 8: 65.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -2.35 \cdot 10^{+61}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+231}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.05e207

    1. Initial program 53.9%

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

      \[\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. +-commutative71.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.05e207 < z < -2.3499999999999999e61 or 1.4000000000000001e-20 < z < 8.4999999999999994e231

    1. Initial program 69.2%

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

      \[\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. +-commutative63.3%

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

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

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

        \[\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-sub63.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--63.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-neg63.3%

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

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

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

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

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

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

    if -2.3499999999999999e61 < z < -6.9999999999999998e-58 or 8.4999999999999994e231 < z

    1. Initial program 72.7%

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

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

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

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

    if -6.9999999999999998e-58 < z < 1.4000000000000001e-20

    1. Initial program 95.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+207}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -2.35 \cdot 10^{+61}:\\ \;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-58}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-20}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+231}:\\ \;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \end{array} \]

Alternative 9: 64.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\frac{a - z}{y - z}}\\ \mathbf{if}\;z \leq -3.3 \cdot 10^{+27}:\\ \;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-126}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-18}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+231}:\\ \;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ t (/ (- a z) (- y z)))))
   (if (<= z -3.3e+27)
     (- t (/ (* x (- a y)) z))
     (if (<= z -1.16e-57)
       t_1
       (if (<= z -3.2e-126)
         (* x (+ (/ (- z y) (- a z)) 1.0))
         (if (<= z 1.02e-18)
           (+ x (/ y (/ a (- t x))))
           (if (<= z 9.5e+231) (- t (/ (* y (- t x)) z)) t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t / ((a - z) / (y - z));
	double tmp;
	if (z <= -3.3e+27) {
		tmp = t - ((x * (a - y)) / z);
	} else if (z <= -1.16e-57) {
		tmp = t_1;
	} else if (z <= -3.2e-126) {
		tmp = x * (((z - y) / (a - z)) + 1.0);
	} else if (z <= 1.02e-18) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 9.5e+231) {
		tmp = t - ((y * (t - x)) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t / ((a - z) / (y - z))
    if (z <= (-3.3d+27)) then
        tmp = t - ((x * (a - y)) / z)
    else if (z <= (-1.16d-57)) then
        tmp = t_1
    else if (z <= (-3.2d-126)) then
        tmp = x * (((z - y) / (a - z)) + 1.0d0)
    else if (z <= 1.02d-18) then
        tmp = x + (y / (a / (t - x)))
    else if (z <= 9.5d+231) then
        tmp = t - ((y * (t - x)) / z)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t / ((a - z) / (y - z));
	double tmp;
	if (z <= -3.3e+27) {
		tmp = t - ((x * (a - y)) / z);
	} else if (z <= -1.16e-57) {
		tmp = t_1;
	} else if (z <= -3.2e-126) {
		tmp = x * (((z - y) / (a - z)) + 1.0);
	} else if (z <= 1.02e-18) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 9.5e+231) {
		tmp = t - ((y * (t - x)) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t / ((a - z) / (y - z))
	tmp = 0
	if z <= -3.3e+27:
		tmp = t - ((x * (a - y)) / z)
	elif z <= -1.16e-57:
		tmp = t_1
	elif z <= -3.2e-126:
		tmp = x * (((z - y) / (a - z)) + 1.0)
	elif z <= 1.02e-18:
		tmp = x + (y / (a / (t - x)))
	elif z <= 9.5e+231:
		tmp = t - ((y * (t - x)) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t / Float64(Float64(a - z) / Float64(y - z)))
	tmp = 0.0
	if (z <= -3.3e+27)
		tmp = Float64(t - Float64(Float64(x * Float64(a - y)) / z));
	elseif (z <= -1.16e-57)
		tmp = t_1;
	elseif (z <= -3.2e-126)
		tmp = Float64(x * Float64(Float64(Float64(z - y) / Float64(a - z)) + 1.0));
	elseif (z <= 1.02e-18)
		tmp = Float64(x + Float64(y / Float64(a / Float64(t - x))));
	elseif (z <= 9.5e+231)
		tmp = Float64(t - Float64(Float64(y * Float64(t - x)) / z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t / ((a - z) / (y - z));
	tmp = 0.0;
	if (z <= -3.3e+27)
		tmp = t - ((x * (a - y)) / z);
	elseif (z <= -1.16e-57)
		tmp = t_1;
	elseif (z <= -3.2e-126)
		tmp = x * (((z - y) / (a - z)) + 1.0);
	elseif (z <= 1.02e-18)
		tmp = x + (y / (a / (t - x)));
	elseif (z <= 9.5e+231)
		tmp = t - ((y * (t - x)) / z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+27], N[(t - N[(N[(x * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.16e-57], t$95$1, If[LessEqual[z, -3.2e-126], N[(x * N[(N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e-18], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+231], N[(t - N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.16 \cdot 10^{-57}:\\
\;\;\;\;t_1\\

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

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

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

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


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

    1. Initial program 64.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 65.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. +-commutative65.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+65.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/65.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/65.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-sub65.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--65.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-neg65.4%

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

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

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

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

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

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

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

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

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

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

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

    if -3.2999999999999998e27 < z < -1.15999999999999996e-57 or 9.5000000000000002e231 < z

    1. Initial program 72.4%

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

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

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

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

    if -1.15999999999999996e-57 < z < -3.2000000000000001e-126

    1. Initial program 99.8%

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

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

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

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

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

    if -3.2000000000000001e-126 < z < 1.02e-18

    1. Initial program 95.2%

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

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

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

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

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

    if 1.02e-18 < z < 9.5000000000000002e231

    1. Initial program 67.5%

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

      \[\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. +-commutative63.8%

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      5. div-sub63.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--63.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-neg63.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+27}:\\ \;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-57}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-126}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-18}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+231}:\\ \;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \end{array} \]

Alternative 10: 47.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+35}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-126}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-59}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.2e+35)
   t
   (if (<= z 1.05e-126)
     (* x (- 1.0 (/ y a)))
     (if (<= z 8e-59)
       (/ y (/ a t))
       (if (<= z 3.8e-20) x (if (<= z 3.1e+95) (* y (/ (- x t) z)) t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.2e+35) {
		tmp = t;
	} else if (z <= 1.05e-126) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 8e-59) {
		tmp = y / (a / t);
	} else if (z <= 3.8e-20) {
		tmp = x;
	} else if (z <= 3.1e+95) {
		tmp = y * ((x - t) / z);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1.2d+35)) then
        tmp = t
    else if (z <= 1.05d-126) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 8d-59) then
        tmp = y / (a / t)
    else if (z <= 3.8d-20) then
        tmp = x
    else if (z <= 3.1d+95) then
        tmp = y * ((x - t) / z)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.2e+35) {
		tmp = t;
	} else if (z <= 1.05e-126) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 8e-59) {
		tmp = y / (a / t);
	} else if (z <= 3.8e-20) {
		tmp = x;
	} else if (z <= 3.1e+95) {
		tmp = y * ((x - t) / z);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.2e+35:
		tmp = t
	elif z <= 1.05e-126:
		tmp = x * (1.0 - (y / a))
	elif z <= 8e-59:
		tmp = y / (a / t)
	elif z <= 3.8e-20:
		tmp = x
	elif z <= 3.1e+95:
		tmp = y * ((x - t) / z)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.2e+35)
		tmp = t;
	elseif (z <= 1.05e-126)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 8e-59)
		tmp = Float64(y / Float64(a / t));
	elseif (z <= 3.8e-20)
		tmp = x;
	elseif (z <= 3.1e+95)
		tmp = Float64(y * Float64(Float64(x - t) / z));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.2e+35)
		tmp = t;
	elseif (z <= 1.05e-126)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 8e-59)
		tmp = y / (a / t);
	elseif (z <= 3.8e-20)
		tmp = x;
	elseif (z <= 3.1e+95)
		tmp = y * ((x - t) / z);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2e+35], t, If[LessEqual[z, 1.05e-126], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-59], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-20], x, If[LessEqual[z, 3.1e+95], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-126}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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

\mathbf{elif}\;z \leq 3.8 \cdot 10^{-20}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 3.1 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.20000000000000007e35 or 3.1000000000000003e95 < z

    1. Initial program 60.2%

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

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

    if -1.20000000000000007e35 < z < 1.0499999999999999e-126

    1. Initial program 93.1%

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

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

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

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

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

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

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

    if 1.0499999999999999e-126 < z < 8.0000000000000002e-59

    1. Initial program 100.0%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    5. Simplified62.7%

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

    if 8.0000000000000002e-59 < z < 3.7999999999999998e-20

    1. Initial program 99.8%

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

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

    if 3.7999999999999998e-20 < z < 3.1000000000000003e95

    1. Initial program 78.9%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{x - t}{z}} \]
    7. Simplified55.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+35}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-126}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-59}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 11: 64.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -5.2 \cdot 10^{+35}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 10^{+232}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.44999999999999996e210

    1. Initial program 53.9%

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

      \[\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. +-commutative71.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.44999999999999996e210 < z < -5.20000000000000013e35 or 1.28e-24 < z < 1.00000000000000006e232

    1. Initial program 69.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 63.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. +-commutative63.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+63.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/63.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/63.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-sub63.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--63.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-neg63.5%

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

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

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

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

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

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

    if -5.20000000000000013e35 < z < 1.28e-24

    1. Initial program 94.0%

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

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

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

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

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

    if 1.00000000000000006e232 < z

    1. Initial program 56.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\left(\frac{y}{z} - 1\right) \cdot t} \]
      2. *-commutative80.6%

        \[\leadsto -\color{blue}{t \cdot \left(\frac{y}{z} - 1\right)} \]
      3. sub-neg80.6%

        \[\leadsto -t \cdot \color{blue}{\left(\frac{y}{z} + \left(-1\right)\right)} \]
      4. metadata-eval80.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+210}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{+35}:\\ \;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\ \mathbf{elif}\;z \leq 1.28 \cdot 10^{-24}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 10^{+232}:\\ \;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 12: 45.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-127}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-53}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{-26}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.4e+37)
   t
   (if (<= z 2.7e-127)
     (* x (- 1.0 (/ y a)))
     (if (<= z 2.1e-53)
       (/ y (/ a t))
       (if (<= z 5.1e-26) x (if (<= z 2.5e+95) (* x (/ y z)) t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.4e+37) {
		tmp = t;
	} else if (z <= 2.7e-127) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 2.1e-53) {
		tmp = y / (a / t);
	} else if (z <= 5.1e-26) {
		tmp = x;
	} else if (z <= 2.5e+95) {
		tmp = x * (y / z);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-2.4d+37)) then
        tmp = t
    else if (z <= 2.7d-127) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 2.1d-53) then
        tmp = y / (a / t)
    else if (z <= 5.1d-26) then
        tmp = x
    else if (z <= 2.5d+95) then
        tmp = x * (y / z)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.4e+37) {
		tmp = t;
	} else if (z <= 2.7e-127) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 2.1e-53) {
		tmp = y / (a / t);
	} else if (z <= 5.1e-26) {
		tmp = x;
	} else if (z <= 2.5e+95) {
		tmp = x * (y / z);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.4e+37:
		tmp = t
	elif z <= 2.7e-127:
		tmp = x * (1.0 - (y / a))
	elif z <= 2.1e-53:
		tmp = y / (a / t)
	elif z <= 5.1e-26:
		tmp = x
	elif z <= 2.5e+95:
		tmp = x * (y / z)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.4e+37)
		tmp = t;
	elseif (z <= 2.7e-127)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 2.1e-53)
		tmp = Float64(y / Float64(a / t));
	elseif (z <= 5.1e-26)
		tmp = x;
	elseif (z <= 2.5e+95)
		tmp = Float64(x * Float64(y / z));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2.4e+37)
		tmp = t;
	elseif (z <= 2.7e-127)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 2.1e-53)
		tmp = y / (a / t);
	elseif (z <= 5.1e-26)
		tmp = x;
	elseif (z <= 2.5e+95)
		tmp = x * (y / z);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.4e+37], t, If[LessEqual[z, 2.7e-127], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-53], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.1e-26], x, If[LessEqual[z, 2.5e+95], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 2.7 \cdot 10^{-127}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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

\mathbf{elif}\;z \leq 5.1 \cdot 10^{-26}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+95}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.4e37 or 2.50000000000000012e95 < z

    1. Initial program 60.2%

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

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

    if -2.4e37 < z < 2.7e-127

    1. Initial program 93.1%

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

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

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

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

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

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

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

    if 2.7e-127 < z < 2.09999999999999977e-53

    1. Initial program 100.0%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    5. Simplified62.7%

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

    if 2.09999999999999977e-53 < z < 5.09999999999999991e-26

    1. Initial program 99.8%

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

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

    if 5.09999999999999991e-26 < z < 2.50000000000000012e95

    1. Initial program 78.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
    6. Step-by-step derivation
      1. expm1-log1p-u12.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y \cdot x}{z}\right)\right)} \]
      2. expm1-udef5.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y \cdot x}{z}\right)} - 1} \]
      3. associate-/l*14.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{\frac{z}{x}}}\right)} - 1 \]
    7. Applied egg-rr14.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y}{\frac{z}{x}}\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def20.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y}{\frac{z}{x}}\right)\right)} \]
      2. expm1-log1p41.9%

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
      3. associate-/r/42.1%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    9. Simplified42.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-127}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-53}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{-26}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 13: 65.3% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.0000000000000001e29

    1. Initial program 64.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 66.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. +-commutative66.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+66.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/66.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/66.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-sub66.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--66.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-neg66.5%

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000001e29 < z < 2.0999999999999999e-19

    1. Initial program 94.0%

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

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

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

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

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

    if 2.0999999999999999e-19 < z < 8.4999999999999994e231

    1. Initial program 67.5%

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

      \[\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. +-commutative63.8%

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      5. div-sub63.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--63.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-neg63.7%

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

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

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

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

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

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

    if 8.4999999999999994e231 < z

    1. Initial program 56.8%

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

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

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

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

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

Alternative 14: 73.3% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.89999999999999995e37

    1. Initial program 64.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 66.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. +-commutative66.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+66.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/66.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/66.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-sub66.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--66.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-neg66.5%

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

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

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

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

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

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

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

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

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

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

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

    if -1.89999999999999995e37 < z < 2.00000000000000004e95

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

    if 2.00000000000000004e95 < z

    1. Initial program 55.1%

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

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

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

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

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

Alternative 15: 50.7% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;z \leq 2.8 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.2000000000000001e37 or 2.7999999999999998e95 < z

    1. Initial program 60.2%

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

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

    if -2.2000000000000001e37 < z < 6.1999999999999998e-19

    1. Initial program 94.0%

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

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

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

    if 6.1999999999999998e-19 < z < 2.7999999999999998e95

    1. Initial program 78.9%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{x - t}{z}} \]
    7. Simplified55.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-19}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 16: 53.5% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.50000000000000025e30 or 3.2000000000000001e95 < z

    1. Initial program 60.2%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z} + t} \]
    7. Step-by-step derivation
      1. +-commutative49.9%

        \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot t}{z}} \]
      2. mul-1-neg49.9%

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

        \[\leadsto \color{blue}{t - \frac{y \cdot t}{z}} \]
      4. associate-/l*56.9%

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

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

    if -5.50000000000000025e30 < z < 5.8000000000000003e-22

    1. Initial program 94.0%

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

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

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

    if 5.8000000000000003e-22 < z < 3.2000000000000001e95

    1. Initial program 78.9%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{x - t}{z}} \]
    7. Simplified55.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+30}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-22}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \end{array} \]

Alternative 17: 53.6% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.6e32

    1. Initial program 64.2%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-t\right) \cdot \left(y - z\right)}}{z} \]
    5. Simplified35.2%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z} + t} \]
    7. Step-by-step derivation
      1. +-commutative50.9%

        \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot t}{z}} \]
      2. mul-1-neg50.9%

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

        \[\leadsto \color{blue}{t - \frac{y \cdot t}{z}} \]
      4. associate-/l*56.1%

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

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

    if -5.6e32 < z < 4.1999999999999998e-19

    1. Initial program 94.0%

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

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

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

    if 4.1999999999999998e-19 < z < 2.50000000000000012e95

    1. Initial program 78.9%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{x - t}{z}} \]
    7. Simplified55.1%

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

    if 2.50000000000000012e95 < z

    1. Initial program 55.1%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \left(\frac{y}{z} - 1\right)} \]
      3. sub-neg62.2%

        \[\leadsto -t \cdot \color{blue}{\left(\frac{y}{z} + \left(-1\right)\right)} \]
      4. metadata-eval62.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{+32}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-19}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 18: 53.4% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.9999999999999997e32

    1. Initial program 64.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 66.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. +-commutative66.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+66.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/66.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/66.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-sub66.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--66.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-neg66.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t - x}}} \]
    7. Simplified61.0%

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

    if -4.9999999999999997e32 < z < 4.09999999999999985e-19

    1. Initial program 94.0%

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

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

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

    if 4.09999999999999985e-19 < z < 2.1e95

    1. Initial program 78.9%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{x - t}{z}} \]
    7. Simplified55.1%

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

    if 2.1e95 < z

    1. Initial program 55.1%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \left(\frac{y}{z} - 1\right)} \]
      3. sub-neg62.2%

        \[\leadsto -t \cdot \color{blue}{\left(\frac{y}{z} + \left(-1\right)\right)} \]
      4. metadata-eval62.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+32}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{-19}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 19: 37.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-58}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-19}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.9 \cdot 10^{+95}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.40000000000000011e-58 or 1.9e95 < z

    1. Initial program 65.4%

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

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

    if -4.40000000000000011e-58 < z < 1.20000000000000011e-19

    1. Initial program 95.5%

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

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

    if 1.20000000000000011e-19 < z < 1.9e95

    1. Initial program 78.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
    6. Step-by-step derivation
      1. expm1-log1p-u12.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y \cdot x}{z}\right)\right)} \]
      2. expm1-udef5.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y \cdot x}{z}\right)} - 1} \]
      3. associate-/l*14.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{\frac{z}{x}}}\right)} - 1 \]
    7. Applied egg-rr14.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y}{\frac{z}{x}}\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def20.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y}{\frac{z}{x}}\right)\right)} \]
      2. expm1-log1p41.9%

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
      3. associate-/r/42.1%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    9. Simplified42.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{-58}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-19}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 20: 34.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.42:\\
\;\;\;\;t\\

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+95}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -0.419999999999999984 or 2.50000000000000012e95 < z

    1. Initial program 63.4%

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

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

    if -0.419999999999999984 < z < 5e-31

    1. Initial program 94.2%

      \[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. Taylor expanded in a around inf 39.4%

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

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

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

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

    if 5e-31 < z < 2.50000000000000012e95

    1. Initial program 79.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
    6. Step-by-step derivation
      1. expm1-log1p-u12.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y \cdot x}{z}\right)\right)} \]
      2. expm1-udef5.7%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y \cdot x}{z}\right)} - 1} \]
      3. associate-/l*14.1%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{\frac{z}{x}}}\right)} - 1 \]
    7. Applied egg-rr14.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y}{\frac{z}{x}}\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def20.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y}{\frac{z}{x}}\right)\right)} \]
      2. expm1-log1p40.8%

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
      3. associate-/r/40.9%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    9. Simplified40.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.42:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-31}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 21: 38.2% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{+110}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 7.5 \cdot 10^{+106}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.5e110 or 7.50000000000000058e106 < a

    1. Initial program 94.0%

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

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

    if -7.5e110 < a < 7.50000000000000058e106

    1. Initial program 73.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.5 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 22: 24.7% 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 79.5%

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

    \[\leadsto \color{blue}{t} \]
  3. Final simplification25.3%

    \[\leadsto t \]

Reproduce

?
herbie shell --seed 2023224 
(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)))))