Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.7% → 94.1%
Time: 20.1s
Alternatives: 24
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 24 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: 79.7% 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.1% accurate, 0.0× speedup?

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left({t_3}^{2}, t_1 \cdot t_3, x\right)\\


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

    1. Initial program 91.0%

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

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

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

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

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

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

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

    if -5e-274 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 3e-279

    1. Initial program 3.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3e-279 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e145

    1. Initial program 86.0%

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

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

    if 2e145 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.9999999999999997e303

    1. Initial program 92.2%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(1, \color{blue}{\frac{t}{\frac{a - z}{y - z}}}, -1 \cdot \left(\left(\frac{y}{a - z} - \left(\frac{z}{a - z} + 1\right)\right) \cdot x\right)\right) \]
      4. mul-1-neg94.6%

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

        \[\leadsto \mathsf{fma}\left(1, \frac{t}{\frac{a - z}{y - z}}, -\color{blue}{x \cdot \left(\frac{y}{a - z} - \left(\frac{z}{a - z} + 1\right)\right)}\right) \]
      6. associate--r+94.6%

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

        \[\leadsto \mathsf{fma}\left(1, \frac{t}{\frac{a - z}{y - z}}, -x \cdot \left(\color{blue}{\frac{y - z}{a - z}} - 1\right)\right) \]
    4. Applied egg-rr94.6%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, -\color{blue}{\left(\frac{y - z}{a - z} - 1\right) \cdot x}\right) \]
      6. distribute-rgt-neg-in94.6%

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

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \color{blue}{\left(\frac{y - z}{a - z} + \left(-1\right)\right)} \cdot \left(-x\right)\right) \]
      8. metadata-eval94.6%

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

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

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

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 94.1% accurate, 0.1× speedup?

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

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

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

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

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

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


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

    1. Initial program 89.7%

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

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

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

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

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

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

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

    if -5e-274 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 3e-279

    1. Initial program 3.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3e-279 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e145

    1. Initial program 86.0%

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

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

    if 2e145 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1e281

    1. Initial program 90.7%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(1, \color{blue}{\frac{t}{\frac{a - z}{y - z}}}, -1 \cdot \left(\left(\frac{y}{a - z} - \left(\frac{z}{a - z} + 1\right)\right) \cdot x\right)\right) \]
      4. mul-1-neg93.6%

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

        \[\leadsto \mathsf{fma}\left(1, \frac{t}{\frac{a - z}{y - z}}, -\color{blue}{x \cdot \left(\frac{y}{a - z} - \left(\frac{z}{a - z} + 1\right)\right)}\right) \]
      6. associate--r+93.6%

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

        \[\leadsto \mathsf{fma}\left(1, \frac{t}{\frac{a - z}{y - z}}, -x \cdot \left(\color{blue}{\frac{y - z}{a - z}} - 1\right)\right) \]
    4. Applied egg-rr93.6%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, -\color{blue}{\left(\frac{y - z}{a - z} - 1\right) \cdot x}\right) \]
      6. distribute-rgt-neg-in93.6%

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

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \color{blue}{\left(\frac{y - z}{a - z} + \left(-1\right)\right)} \cdot \left(-x\right)\right) \]
      8. metadata-eval93.6%

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

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

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

Alternative 3: 94.6% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

    1. Initial program 3.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 90.6% accurate, 0.2× speedup?

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

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

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

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

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


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

    1. Initial program 91.1%

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

    if -9.9999999999999991e-199 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 3e-279

    1. Initial program 6.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3e-279 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.00000000000000017e169

    1. Initial program 87.0%

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

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

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

Alternative 5: 90.6% accurate, 0.3× speedup?

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

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

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


\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)))) < -9.9999999999999991e-199 or 5.0000000000000002e-271 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 90.6%

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

    if -9.9999999999999991e-199 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.0000000000000002e-271

    1. Initial program 6.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 88.9% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 90.6%

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

    if -9.9999999999999991e-199 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.0000000000000002e-271

    1. Initial program 6.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 84.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. +-commutative84.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+84.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/84.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/84.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-sub84.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--84.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-neg84.1%

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

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

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

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

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

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

Alternative 7: 56.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := \left(t - x\right) \cdot \frac{y}{a - z}\\ t_3 := x - \frac{y}{\frac{a}{x}}\\ \mathbf{if}\;t \leq -6500000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-5}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-12}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-186}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-287}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-156}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-19}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z))))
        (t_2 (* (- t x) (/ y (- a z))))
        (t_3 (- x (/ y (/ a x)))))
   (if (<= t -6500000000.0)
     t_1
     (if (<= t -4.5e-5)
       t_2
       (if (<= t -5e-12)
         (/ (- t) (/ z (- y z)))
         (if (<= t -2.7e-186)
           x
           (if (<= t 1.3e-287)
             t_3
             (if (<= t 8.5e-156) t_2 (if (<= t 3.2e-19) t_3 t_1)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = (t - x) * (y / (a - z));
	double t_3 = x - (y / (a / x));
	double tmp;
	if (t <= -6500000000.0) {
		tmp = t_1;
	} else if (t <= -4.5e-5) {
		tmp = t_2;
	} else if (t <= -5e-12) {
		tmp = -t / (z / (y - z));
	} else if (t <= -2.7e-186) {
		tmp = x;
	} else if (t <= 1.3e-287) {
		tmp = t_3;
	} else if (t <= 8.5e-156) {
		tmp = t_2;
	} else if (t <= 3.2e-19) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = (t - x) * (y / (a - z))
    t_3 = x - (y / (a / x))
    if (t <= (-6500000000.0d0)) then
        tmp = t_1
    else if (t <= (-4.5d-5)) then
        tmp = t_2
    else if (t <= (-5d-12)) then
        tmp = -t / (z / (y - z))
    else if (t <= (-2.7d-186)) then
        tmp = x
    else if (t <= 1.3d-287) then
        tmp = t_3
    else if (t <= 8.5d-156) then
        tmp = t_2
    else if (t <= 3.2d-19) then
        tmp = t_3
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = (t - x) * (y / (a - z));
	double t_3 = x - (y / (a / x));
	double tmp;
	if (t <= -6500000000.0) {
		tmp = t_1;
	} else if (t <= -4.5e-5) {
		tmp = t_2;
	} else if (t <= -5e-12) {
		tmp = -t / (z / (y - z));
	} else if (t <= -2.7e-186) {
		tmp = x;
	} else if (t <= 1.3e-287) {
		tmp = t_3;
	} else if (t <= 8.5e-156) {
		tmp = t_2;
	} else if (t <= 3.2e-19) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = (t - x) * (y / (a - z))
	t_3 = x - (y / (a / x))
	tmp = 0
	if t <= -6500000000.0:
		tmp = t_1
	elif t <= -4.5e-5:
		tmp = t_2
	elif t <= -5e-12:
		tmp = -t / (z / (y - z))
	elif t <= -2.7e-186:
		tmp = x
	elif t <= 1.3e-287:
		tmp = t_3
	elif t <= 8.5e-156:
		tmp = t_2
	elif t <= 3.2e-19:
		tmp = t_3
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(Float64(t - x) * Float64(y / Float64(a - z)))
	t_3 = Float64(x - Float64(y / Float64(a / x)))
	tmp = 0.0
	if (t <= -6500000000.0)
		tmp = t_1;
	elseif (t <= -4.5e-5)
		tmp = t_2;
	elseif (t <= -5e-12)
		tmp = Float64(Float64(-t) / Float64(z / Float64(y - z)));
	elseif (t <= -2.7e-186)
		tmp = x;
	elseif (t <= 1.3e-287)
		tmp = t_3;
	elseif (t <= 8.5e-156)
		tmp = t_2;
	elseif (t <= 3.2e-19)
		tmp = t_3;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = (t - x) * (y / (a - z));
	t_3 = x - (y / (a / x));
	tmp = 0.0;
	if (t <= -6500000000.0)
		tmp = t_1;
	elseif (t <= -4.5e-5)
		tmp = t_2;
	elseif (t <= -5e-12)
		tmp = -t / (z / (y - z));
	elseif (t <= -2.7e-186)
		tmp = x;
	elseif (t <= 1.3e-287)
		tmp = t_3;
	elseif (t <= 8.5e-156)
		tmp = t_2;
	elseif (t <= 3.2e-19)
		tmp = t_3;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6500000000.0], t$95$1, If[LessEqual[t, -4.5e-5], t$95$2, If[LessEqual[t, -5e-12], N[((-t) / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.7e-186], x, If[LessEqual[t, 1.3e-287], t$95$3, If[LessEqual[t, 8.5e-156], t$95$2, If[LessEqual[t, 3.2e-19], t$95$3, t$95$1]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -4.5 \cdot 10^{-5}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq -2.7 \cdot 10^{-186}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.3 \cdot 10^{-287}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-156}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{-19}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -6.5e9 or 3.19999999999999982e-19 < t

    1. Initial program 86.3%

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

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

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

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

    if -6.5e9 < t < -4.50000000000000028e-5 or 1.3e-287 < t < 8.5e-156

    1. Initial program 72.6%

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

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

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

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

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)}\right) \]
      5. associate-*l/63.0%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}}\right) \]
      6. associate-*r/78.6%

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

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

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

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

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

    if -4.50000000000000028e-5 < t < -4.9999999999999997e-12

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

    if -4.9999999999999997e-12 < t < -2.6999999999999999e-186

    1. Initial program 68.1%

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

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

    if -2.6999999999999999e-186 < t < 1.3e-287 or 8.5e-156 < t < 3.19999999999999982e-19

    1. Initial program 73.6%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot x}{a} + x} \]
    4. Step-by-step derivation
      1. +-commutative53.7%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot x}{a}} \]
      2. mul-1-neg53.7%

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{x}}} \]
    5. Simplified56.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6500000000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-5}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-12}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-186}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-287}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-156}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-19}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 8: 43.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{x - t}{z}\\ t_2 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;a \leq -5.6 \cdot 10^{+119}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-62}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-122}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-268}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{+38}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- x t) z))) (t_2 (* t (- 1.0 (/ y z)))))
   (if (<= a -5.6e+119)
     x
     (if (<= a -2.5e-62)
       (* (- y z) (/ t a))
       (if (<= a -6e-122)
         t_1
         (if (<= a -4.2e-268)
           t_2
           (if (<= a 1.15e-49) t_1 (if (<= a 1.32e+38) t_2 x))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((x - t) / z);
	double t_2 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -5.6e+119) {
		tmp = x;
	} else if (a <= -2.5e-62) {
		tmp = (y - z) * (t / a);
	} else if (a <= -6e-122) {
		tmp = t_1;
	} else if (a <= -4.2e-268) {
		tmp = t_2;
	} else if (a <= 1.15e-49) {
		tmp = t_1;
	} else if (a <= 1.32e+38) {
		tmp = t_2;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((x - t) / z)
    t_2 = t * (1.0d0 - (y / z))
    if (a <= (-5.6d+119)) then
        tmp = x
    else if (a <= (-2.5d-62)) then
        tmp = (y - z) * (t / a)
    else if (a <= (-6d-122)) then
        tmp = t_1
    else if (a <= (-4.2d-268)) then
        tmp = t_2
    else if (a <= 1.15d-49) then
        tmp = t_1
    else if (a <= 1.32d+38) then
        tmp = t_2
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((x - t) / z);
	double t_2 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -5.6e+119) {
		tmp = x;
	} else if (a <= -2.5e-62) {
		tmp = (y - z) * (t / a);
	} else if (a <= -6e-122) {
		tmp = t_1;
	} else if (a <= -4.2e-268) {
		tmp = t_2;
	} else if (a <= 1.15e-49) {
		tmp = t_1;
	} else if (a <= 1.32e+38) {
		tmp = t_2;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((x - t) / z)
	t_2 = t * (1.0 - (y / z))
	tmp = 0
	if a <= -5.6e+119:
		tmp = x
	elif a <= -2.5e-62:
		tmp = (y - z) * (t / a)
	elif a <= -6e-122:
		tmp = t_1
	elif a <= -4.2e-268:
		tmp = t_2
	elif a <= 1.15e-49:
		tmp = t_1
	elif a <= 1.32e+38:
		tmp = t_2
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(x - t) / z))
	t_2 = Float64(t * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (a <= -5.6e+119)
		tmp = x;
	elseif (a <= -2.5e-62)
		tmp = Float64(Float64(y - z) * Float64(t / a));
	elseif (a <= -6e-122)
		tmp = t_1;
	elseif (a <= -4.2e-268)
		tmp = t_2;
	elseif (a <= 1.15e-49)
		tmp = t_1;
	elseif (a <= 1.32e+38)
		tmp = t_2;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((x - t) / z);
	t_2 = t * (1.0 - (y / z));
	tmp = 0.0;
	if (a <= -5.6e+119)
		tmp = x;
	elseif (a <= -2.5e-62)
		tmp = (y - z) * (t / a);
	elseif (a <= -6e-122)
		tmp = t_1;
	elseif (a <= -4.2e-268)
		tmp = t_2;
	elseif (a <= 1.15e-49)
		tmp = t_1;
	elseif (a <= 1.32e+38)
		tmp = t_2;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.6e+119], x, If[LessEqual[a, -2.5e-62], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -6e-122], t$95$1, If[LessEqual[a, -4.2e-268], t$95$2, If[LessEqual[a, 1.15e-49], t$95$1, If[LessEqual[a, 1.32e+38], t$95$2, x]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -6 \cdot 10^{-122}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -4.2 \cdot 10^{-268}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.15 \cdot 10^{-49}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.32 \cdot 10^{+38}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.60000000000000026e119 or 1.32e38 < a

    1. Initial program 89.6%

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

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

    if -5.60000000000000026e119 < a < -2.5000000000000001e-62

    1. Initial program 85.4%

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

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

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

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

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)}\right) \]
      5. associate-*l/70.8%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}}\right) \]
      6. associate-*r/88.9%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \left(t - x\right) \cdot \frac{y - z}{a - z}\right)} \]
    4. Taylor expanded in x around 0 50.8%

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

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

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

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

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

    if -2.5000000000000001e-62 < a < -6.00000000000000009e-122 or -4.19999999999999996e-268 < a < 1.15e-49

    1. Initial program 66.8%

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

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

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

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

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

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

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

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

    if -6.00000000000000009e-122 < a < -4.19999999999999996e-268 or 1.15e-49 < a < 1.32e38

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{+119}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-62}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-122}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-268}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-49}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 64.6% accurate, 0.7× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 5.6 \cdot 10^{+30} \lor \neg \left(y \leq 4.8 \cdot 10^{+97}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.02e155 or 3.29999999999999991e-77 < y < 5.59999999999999966e30 or 4.8e97 < y

    1. Initial program 82.8%

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(y - z\right) \cdot \frac{t - x}{a - z}\right) \]
      4. *-commutative82.9%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)}\right) \]
      5. associate-*l/64.6%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}}\right) \]
      6. associate-*r/84.2%

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

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

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

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

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

    if -1.02e155 < y < -1.9000000000000001e-65

    1. Initial program 84.6%

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

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

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

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

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

    if -1.9000000000000001e-65 < y < 3.29999999999999991e-77

    1. Initial program 71.4%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(1, \color{blue}{\frac{t}{\frac{a - z}{y - z}}}, -1 \cdot \left(\left(\frac{y}{a - z} - \left(\frac{z}{a - z} + 1\right)\right) \cdot x\right)\right) \]
      4. mul-1-neg87.6%

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

        \[\leadsto \mathsf{fma}\left(1, \frac{t}{\frac{a - z}{y - z}}, -\color{blue}{x \cdot \left(\frac{y}{a - z} - \left(\frac{z}{a - z} + 1\right)\right)}\right) \]
      6. associate--r+84.7%

        \[\leadsto \mathsf{fma}\left(1, \frac{t}{\frac{a - z}{y - z}}, -x \cdot \color{blue}{\left(\left(\frac{y}{a - z} - \frac{z}{a - z}\right) - 1\right)}\right) \]
      7. div-sub84.7%

        \[\leadsto \mathsf{fma}\left(1, \frac{t}{\frac{a - z}{y - z}}, -x \cdot \left(\color{blue}{\frac{y - z}{a - z}} - 1\right)\right) \]
    4. Applied egg-rr84.7%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{a - z}, y - z, -x \cdot \left(\frac{y - z}{a - z} - 1\right)\right)} \]
      5. *-commutative80.7%

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, -\color{blue}{\left(\frac{y - z}{a - z} - 1\right) \cdot x}\right) \]
      6. distribute-rgt-neg-in80.7%

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \color{blue}{\left(\frac{y - z}{a - z} - 1\right) \cdot \left(-x\right)}\right) \]
      7. sub-neg80.7%

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \color{blue}{\left(\frac{y - z}{a - z} + \left(-1\right)\right)} \cdot \left(-x\right)\right) \]
      8. metadata-eval80.7%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \left(-1 \cdot \left(\frac{y}{a} + \color{blue}{-1}\right)\right) \cdot x\right) \]
      4. distribute-lft-in68.2%

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

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

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \color{blue}{\left(1 + -1 \cdot \frac{y}{a}\right)} \cdot x\right) \]
      7. *-commutative68.2%

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)}\right) \]
    10. Taylor expanded in y around 0 59.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z} + x} \]
    11. Step-by-step derivation
      1. +-commutative59.8%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot z}{a - z}} \]
      2. mul-1-neg59.8%

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a - z}{z}}} \]
    12. Simplified70.5%

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

    if 5.59999999999999966e30 < y < 4.8e97

    1. Initial program 81.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.02 \cdot 10^{+155}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-65}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{-77}:\\ \;\;\;\;x - \frac{t}{\frac{a - z}{z}}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{+30} \lor \neg \left(y \leq 4.8 \cdot 10^{+97}\right):\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 10: 62.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -7.5 \cdot 10^{-150}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 5 \cdot 10^{-14}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 2.45 \cdot 10^{+58}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+129}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.84999999999999994e93 or 6.4999999999999995e129 < z

    1. Initial program 56.3%

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

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

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

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

    if -1.84999999999999994e93 < z < -7.5000000000000004e-150 or 5.0000000000000002e-14 < z < 2.45000000000000009e58

    1. Initial program 84.3%

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

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

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

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

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)}\right) \]
      5. associate-*l/79.8%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}}\right) \]
      6. associate-*r/86.6%

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

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

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

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

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

    if -7.5000000000000004e-150 < z < 5.0000000000000002e-14 or 2.45000000000000009e58 < z < 6.4999999999999995e129

    1. Initial program 92.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+93}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-150}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-14}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+58}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+129}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 11: 64.3% accurate, 0.7× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 8.8 \cdot 10^{+29}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.00000000000000001e155 or 3.50000000000000013e-77 < y < 8.8000000000000005e29

    1. Initial program 79.0%

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(y - z\right) \cdot \frac{t - x}{a - z}\right) \]
      4. *-commutative79.0%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)}\right) \]
      5. associate-*l/63.1%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}}\right) \]
      6. associate-*r/79.7%

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

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

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

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

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

    if -1.00000000000000001e155 < y < -4.8000000000000003e-65

    1. Initial program 84.6%

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

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

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

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

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

    if -4.8000000000000003e-65 < y < 3.50000000000000013e-77

    1. Initial program 71.4%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(1, \color{blue}{\frac{t}{\frac{a - z}{y - z}}}, -1 \cdot \left(\left(\frac{y}{a - z} - \left(\frac{z}{a - z} + 1\right)\right) \cdot x\right)\right) \]
      4. mul-1-neg87.6%

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

        \[\leadsto \mathsf{fma}\left(1, \frac{t}{\frac{a - z}{y - z}}, -\color{blue}{x \cdot \left(\frac{y}{a - z} - \left(\frac{z}{a - z} + 1\right)\right)}\right) \]
      6. associate--r+84.7%

        \[\leadsto \mathsf{fma}\left(1, \frac{t}{\frac{a - z}{y - z}}, -x \cdot \color{blue}{\left(\left(\frac{y}{a - z} - \frac{z}{a - z}\right) - 1\right)}\right) \]
      7. div-sub84.7%

        \[\leadsto \mathsf{fma}\left(1, \frac{t}{\frac{a - z}{y - z}}, -x \cdot \left(\color{blue}{\frac{y - z}{a - z}} - 1\right)\right) \]
    4. Applied egg-rr84.7%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{a - z}, y - z, -x \cdot \left(\frac{y - z}{a - z} - 1\right)\right)} \]
      5. *-commutative80.7%

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, -\color{blue}{\left(\frac{y - z}{a - z} - 1\right) \cdot x}\right) \]
      6. distribute-rgt-neg-in80.7%

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \color{blue}{\left(\frac{y - z}{a - z} - 1\right) \cdot \left(-x\right)}\right) \]
      7. sub-neg80.7%

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \color{blue}{\left(\frac{y - z}{a - z} + \left(-1\right)\right)} \cdot \left(-x\right)\right) \]
      8. metadata-eval80.7%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \left(-1 \cdot \left(\frac{y}{a} + \color{blue}{-1}\right)\right) \cdot x\right) \]
      4. distribute-lft-in68.2%

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

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

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \color{blue}{\left(1 + -1 \cdot \frac{y}{a}\right)} \cdot x\right) \]
      7. *-commutative68.2%

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)}\right) \]
    10. Taylor expanded in y around 0 59.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z} + x} \]
    11. Step-by-step derivation
      1. +-commutative59.8%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot z}{a - z}} \]
      2. mul-1-neg59.8%

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a - z}{z}}} \]
    12. Simplified70.5%

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

    if 8.8000000000000005e29 < y < 1.19999999999999991e94

    1. Initial program 81.7%

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

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

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

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

    if 1.19999999999999991e94 < y

    1. Initial program 86.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{+155}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-65}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-77}:\\ \;\;\;\;x - \frac{t}{\frac{a - z}{z}}\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{+29}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+94}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\ \end{array} \]

Alternative 12: 64.8% accurate, 0.7× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 3.4 \cdot 10^{+30}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.69999999999999994e155 or 4.99999999999999963e-77 < y < 3.4000000000000002e30

    1. Initial program 79.0%

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(y - z\right) \cdot \frac{t - x}{a - z}\right) \]
      4. *-commutative79.0%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)}\right) \]
      5. associate-*l/63.1%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}}\right) \]
      6. associate-*r/79.7%

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

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

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

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

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

    if -2.69999999999999994e155 < y < -2.49999999999999991e-65

    1. Initial program 84.6%

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

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

    if -2.49999999999999991e-65 < y < 4.99999999999999963e-77

    1. Initial program 71.4%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(1, \color{blue}{\frac{t}{\frac{a - z}{y - z}}}, -1 \cdot \left(\left(\frac{y}{a - z} - \left(\frac{z}{a - z} + 1\right)\right) \cdot x\right)\right) \]
      4. mul-1-neg87.6%

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

        \[\leadsto \mathsf{fma}\left(1, \frac{t}{\frac{a - z}{y - z}}, -\color{blue}{x \cdot \left(\frac{y}{a - z} - \left(\frac{z}{a - z} + 1\right)\right)}\right) \]
      6. associate--r+84.7%

        \[\leadsto \mathsf{fma}\left(1, \frac{t}{\frac{a - z}{y - z}}, -x \cdot \color{blue}{\left(\left(\frac{y}{a - z} - \frac{z}{a - z}\right) - 1\right)}\right) \]
      7. div-sub84.7%

        \[\leadsto \mathsf{fma}\left(1, \frac{t}{\frac{a - z}{y - z}}, -x \cdot \left(\color{blue}{\frac{y - z}{a - z}} - 1\right)\right) \]
    4. Applied egg-rr84.7%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{a - z}, y - z, -x \cdot \left(\frac{y - z}{a - z} - 1\right)\right)} \]
      5. *-commutative80.7%

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, -\color{blue}{\left(\frac{y - z}{a - z} - 1\right) \cdot x}\right) \]
      6. distribute-rgt-neg-in80.7%

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \color{blue}{\left(\frac{y - z}{a - z} - 1\right) \cdot \left(-x\right)}\right) \]
      7. sub-neg80.7%

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \color{blue}{\left(\frac{y - z}{a - z} + \left(-1\right)\right)} \cdot \left(-x\right)\right) \]
      8. metadata-eval80.7%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \left(-1 \cdot \left(\frac{y}{a} + \color{blue}{-1}\right)\right) \cdot x\right) \]
      4. distribute-lft-in68.2%

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

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

        \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \color{blue}{\left(1 + -1 \cdot \frac{y}{a}\right)} \cdot x\right) \]
      7. *-commutative68.2%

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{t}{a - z}, y - z, \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)}\right) \]
    10. Taylor expanded in y around 0 59.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z} + x} \]
    11. Step-by-step derivation
      1. +-commutative59.8%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot z}{a - z}} \]
      2. mul-1-neg59.8%

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a - z}{z}}} \]
    12. Simplified70.5%

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

    if 3.4000000000000002e30 < y < 2.7499999999999999e94

    1. Initial program 81.7%

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

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

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

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

    if 2.7499999999999999e94 < y

    1. Initial program 86.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+155}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-65}:\\ \;\;\;\;x + \left(z - y\right) \cdot \frac{x - t}{a}\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-77}:\\ \;\;\;\;x - \frac{t}{\frac{a - z}{z}}\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{+30}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq 2.75 \cdot 10^{+94}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\ \end{array} \]

Alternative 13: 47.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y}{\frac{a}{x}}\\ \mathbf{if}\;a \leq -4.7 \cdot 10^{+60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.45 \cdot 10^{-231}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{-149}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-119}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-63}:\\ \;\;\;\;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 (- x (/ y (/ a x)))))
   (if (<= a -4.7e+60)
     t_1
     (if (<= a -2.45e-231)
       (* t (- 1.0 (/ y z)))
       (if (<= a 1.06e-149)
         (/ (* y (- x t)) z)
         (if (<= a 1.1e-119)
           t
           (if (<= a 6.8e-63) (* y (/ (- x t) z)) t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y / (a / x));
	double tmp;
	if (a <= -4.7e+60) {
		tmp = t_1;
	} else if (a <= -2.45e-231) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 1.06e-149) {
		tmp = (y * (x - t)) / z;
	} else if (a <= 1.1e-119) {
		tmp = t;
	} else if (a <= 6.8e-63) {
		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 = x - (y / (a / x))
    if (a <= (-4.7d+60)) then
        tmp = t_1
    else if (a <= (-2.45d-231)) then
        tmp = t * (1.0d0 - (y / z))
    else if (a <= 1.06d-149) then
        tmp = (y * (x - t)) / z
    else if (a <= 1.1d-119) then
        tmp = t
    else if (a <= 6.8d-63) 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 = x - (y / (a / x));
	double tmp;
	if (a <= -4.7e+60) {
		tmp = t_1;
	} else if (a <= -2.45e-231) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 1.06e-149) {
		tmp = (y * (x - t)) / z;
	} else if (a <= 1.1e-119) {
		tmp = t;
	} else if (a <= 6.8e-63) {
		tmp = y * ((x - t) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y / (a / x))
	tmp = 0
	if a <= -4.7e+60:
		tmp = t_1
	elif a <= -2.45e-231:
		tmp = t * (1.0 - (y / z))
	elif a <= 1.06e-149:
		tmp = (y * (x - t)) / z
	elif a <= 1.1e-119:
		tmp = t
	elif a <= 6.8e-63:
		tmp = y * ((x - t) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y / Float64(a / x)))
	tmp = 0.0
	if (a <= -4.7e+60)
		tmp = t_1;
	elseif (a <= -2.45e-231)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	elseif (a <= 1.06e-149)
		tmp = Float64(Float64(y * Float64(x - t)) / z);
	elseif (a <= 1.1e-119)
		tmp = t;
	elseif (a <= 6.8e-63)
		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 = x - (y / (a / x));
	tmp = 0.0;
	if (a <= -4.7e+60)
		tmp = t_1;
	elseif (a <= -2.45e-231)
		tmp = t * (1.0 - (y / z));
	elseif (a <= 1.06e-149)
		tmp = (y * (x - t)) / z;
	elseif (a <= 1.1e-119)
		tmp = t;
	elseif (a <= 6.8e-63)
		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[(x - N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.7e+60], t$95$1, If[LessEqual[a, -2.45e-231], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.06e-149], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.1e-119], t, If[LessEqual[a, 6.8e-63], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{a}{x}}\\
\mathbf{if}\;a \leq -4.7 \cdot 10^{+60}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;a \leq 1.1 \cdot 10^{-119}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -4.6999999999999998e60 or 6.79999999999999997e-63 < a

    1. Initial program 86.2%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot x}{a} + x} \]
    4. Step-by-step derivation
      1. +-commutative52.9%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot x}{a}} \]
      2. mul-1-neg52.9%

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

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

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

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

    if -4.6999999999999998e60 < a < -2.45000000000000002e-231

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

    if -2.45000000000000002e-231 < a < 1.05999999999999998e-149

    1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.05999999999999998e-149 < a < 1.1e-119

    1. Initial program 63.9%

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

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

    if 1.1e-119 < a < 6.79999999999999997e-63

    1. Initial program 59.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around 0 34.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/34.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.7 \cdot 10^{+60}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;a \leq -2.45 \cdot 10^{-231}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{-149}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-119}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-63}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \end{array} \]

Alternative 14: 47.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{a}{x}}\\
\mathbf{if}\;a \leq -4.7 \cdot 10^{+60}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;a \leq 9.2 \cdot 10^{-120}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -4.6999999999999998e60 or 1.2199999999999999e-63 < a

    1. Initial program 86.2%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot x}{a} + x} \]
    4. Step-by-step derivation
      1. +-commutative52.9%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot x}{a}} \]
      2. mul-1-neg52.9%

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

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

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

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

    if -4.6999999999999998e60 < a < -6.6000000000000001e-233

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

    if -6.6000000000000001e-233 < a < 8.5000000000000007e-152

    1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.5000000000000007e-152 < a < 9.19999999999999946e-120

    1. Initial program 63.9%

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

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

    if 9.19999999999999946e-120 < a < 1.2199999999999999e-63

    1. Initial program 59.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.7 \cdot 10^{+60}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;a \leq -6.6 \cdot 10^{-233}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-152}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-120}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{-63}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \end{array} \]

Alternative 15: 47.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{a}{x}}\\
\mathbf{if}\;a \leq -3.15 \cdot 10^{+59}:\\
\;\;\;\;t_1\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.15e59 or 6.5000000000000004e-64 < a

    1. Initial program 86.2%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot x}{a} + x} \]
    4. Step-by-step derivation
      1. +-commutative52.9%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot x}{a}} \]
      2. mul-1-neg52.9%

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

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

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

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

    if -3.15e59 < a < -1.80000000000000004e-233

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

    if -1.80000000000000004e-233 < a < 7.5999999999999997e-150

    1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.5999999999999997e-150 < a < 7.99999999999999983e-120

    1. Initial program 63.9%

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

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

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

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

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)}\right) \]
      5. associate-*l/51.7%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}}\right) \]
      6. associate-*r/76.2%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \left(t - x\right) \cdot \frac{y - z}{a - z}\right)} \]
    4. Taylor expanded in x around 0 64.7%

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{t \cdot z}{a - z}} \]
      2. associate-/l*64.1%

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

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

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

    if 7.99999999999999983e-120 < a < 6.5000000000000004e-64

    1. Initial program 59.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.15 \cdot 10^{+59}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-233}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{-150}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-120}:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-64}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \end{array} \]

Alternative 16: 57.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y}{\frac{a}{x}}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;t \leq -3600:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-260}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-162}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-19}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ y (/ a x)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= t -3600.0)
     t_2
     (if (<= t 2.9e-260)
       t_1
       (if (<= t 4.8e-162) (* (/ y z) (- x t)) (if (<= t 2.7e-19) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y / (a / x));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -3600.0) {
		tmp = t_2;
	} else if (t <= 2.9e-260) {
		tmp = t_1;
	} else if (t <= 4.8e-162) {
		tmp = (y / z) * (x - t);
	} else if (t <= 2.7e-19) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - (y / (a / x))
    t_2 = t * ((y - z) / (a - z))
    if (t <= (-3600.0d0)) then
        tmp = t_2
    else if (t <= 2.9d-260) then
        tmp = t_1
    else if (t <= 4.8d-162) then
        tmp = (y / z) * (x - t)
    else if (t <= 2.7d-19) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y / (a / x));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -3600.0) {
		tmp = t_2;
	} else if (t <= 2.9e-260) {
		tmp = t_1;
	} else if (t <= 4.8e-162) {
		tmp = (y / z) * (x - t);
	} else if (t <= 2.7e-19) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y / (a / x))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if t <= -3600.0:
		tmp = t_2
	elif t <= 2.9e-260:
		tmp = t_1
	elif t <= 4.8e-162:
		tmp = (y / z) * (x - t)
	elif t <= 2.7e-19:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y / Float64(a / x)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (t <= -3600.0)
		tmp = t_2;
	elseif (t <= 2.9e-260)
		tmp = t_1;
	elseif (t <= 4.8e-162)
		tmp = Float64(Float64(y / z) * Float64(x - t));
	elseif (t <= 2.7e-19)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y / (a / x));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (t <= -3600.0)
		tmp = t_2;
	elseif (t <= 2.9e-260)
		tmp = t_1;
	elseif (t <= 4.8e-162)
		tmp = (y / z) * (x - t);
	elseif (t <= 2.7e-19)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3600.0], t$95$2, If[LessEqual[t, 2.9e-260], t$95$1, If[LessEqual[t, 4.8e-162], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e-19], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{a}{x}}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;t \leq -3600:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 2.9 \cdot 10^{-260}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2.7 \cdot 10^{-19}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3600 or 2.7000000000000001e-19 < t

    1. Initial program 86.3%

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

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

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

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

    if -3600 < t < 2.8999999999999999e-260 or 4.8000000000000004e-162 < t < 2.7000000000000001e-19

    1. Initial program 73.4%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot x}{a} + x} \]
    4. Step-by-step derivation
      1. +-commutative48.6%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot x}{a}} \]
      2. mul-1-neg48.6%

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

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

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

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

    if 2.8999999999999999e-260 < t < 4.8000000000000004e-162

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3600:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-260}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-162}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-19}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 17: 71.7% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.80000000000000004e47 or 1.54999999999999995e-30 < a

    1. Initial program 87.5%

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

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

    if -1.80000000000000004e47 < a < -7.2e-80

    1. Initial program 79.5%

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

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

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

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

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

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

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

    if -7.2e-80 < a < 1.54999999999999995e-30

    1. Initial program 69.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 78.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. +-commutative78.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+78.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/78.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/78.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-sub79.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--79.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-neg79.3%

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

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

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

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

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

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

Alternative 18: 45.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -6.2 \cdot 10^{-268}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 2.6 \cdot 10^{+38}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.49999999999999959e59 or 2.5999999999999999e38 < a

    1. Initial program 89.6%

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

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

    if -4.49999999999999959e59 < a < -6.1999999999999996e-268 or 3.80000000000000003e-51 < a < 2.5999999999999999e38

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

    if -6.1999999999999996e-268 < a < 3.80000000000000003e-51

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.5 \cdot 10^{+59}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-268}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-51}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 19: 47.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y}{\frac{a}{x}}\\ \mathbf{if}\;a \leq -1.3 \cdot 10^{+60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-268}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-62}:\\ \;\;\;\;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 (- x (/ y (/ a x)))))
   (if (<= a -1.3e+60)
     t_1
     (if (<= a -5.2e-268)
       (* t (- 1.0 (/ y z)))
       (if (<= a 2.3e-62) (* y (/ (- x t) z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y / (a / x));
	double tmp;
	if (a <= -1.3e+60) {
		tmp = t_1;
	} else if (a <= -5.2e-268) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 2.3e-62) {
		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 = x - (y / (a / x))
    if (a <= (-1.3d+60)) then
        tmp = t_1
    else if (a <= (-5.2d-268)) then
        tmp = t * (1.0d0 - (y / z))
    else if (a <= 2.3d-62) 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 = x - (y / (a / x));
	double tmp;
	if (a <= -1.3e+60) {
		tmp = t_1;
	} else if (a <= -5.2e-268) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 2.3e-62) {
		tmp = y * ((x - t) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y / (a / x))
	tmp = 0
	if a <= -1.3e+60:
		tmp = t_1
	elif a <= -5.2e-268:
		tmp = t * (1.0 - (y / z))
	elif a <= 2.3e-62:
		tmp = y * ((x - t) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y / Float64(a / x)))
	tmp = 0.0
	if (a <= -1.3e+60)
		tmp = t_1;
	elseif (a <= -5.2e-268)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	elseif (a <= 2.3e-62)
		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 = x - (y / (a / x));
	tmp = 0.0;
	if (a <= -1.3e+60)
		tmp = t_1;
	elseif (a <= -5.2e-268)
		tmp = t * (1.0 - (y / z));
	elseif (a <= 2.3e-62)
		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[(x - N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.3e+60], t$95$1, If[LessEqual[a, -5.2e-268], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.3e-62], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{a}{x}}\\
\mathbf{if}\;a \leq -1.3 \cdot 10^{+60}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.30000000000000004e60 or 2.3e-62 < a

    1. Initial program 86.2%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot x}{a} + x} \]
    4. Step-by-step derivation
      1. +-commutative52.9%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot x}{a}} \]
      2. mul-1-neg52.9%

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

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

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

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

    if -1.30000000000000004e60 < a < -5.20000000000000005e-268

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

    if -5.20000000000000005e-268 < a < 2.3e-62

    1. Initial program 68.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around 0 55.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/55.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.3 \cdot 10^{+60}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-268}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-62}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \end{array} \]

Alternative 20: 36.2% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -1.3 \cdot 10^{-242}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+37}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.19999999999999985e49 or 6.2000000000000004e37 < a

    1. Initial program 89.8%

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

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

    if -6.19999999999999985e49 < a < -1.30000000000000009e-242 or 1.84999999999999987e-51 < a < 6.2000000000000004e37

    1. Initial program 74.4%

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

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

    if -1.30000000000000009e-242 < a < 1.84999999999999987e-51

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
      4. *-commutative40.7%

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
      6. *-commutative42.1%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{z} \]
      7. associate-*r/43.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{+49}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-242}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-51}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 21: 36.2% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -5.2 \cdot 10^{-248}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.02 \cdot 10^{+38}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.45e50 or 1.02000000000000006e38 < a

    1. Initial program 89.8%

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

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

    if -1.45e50 < a < -5.20000000000000013e-248 or 9.20000000000000007e-51 < a < 1.02000000000000006e38

    1. Initial program 74.4%

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

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

    if -5.20000000000000013e-248 < a < 9.20000000000000007e-51

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    7. Simplified43.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{+50}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-248}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-51}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 22: 41.2% accurate, 1.2× speedup?

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

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

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

\mathbf{elif}\;a \leq 1.42 \cdot 10^{+37}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.00000000000000004e73 or 1.4199999999999999e37 < a

    1. Initial program 90.2%

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

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

    if -7.00000000000000004e73 < a < 3.1999999999999998e-48

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

    if 3.1999999999999998e-48 < a < 1.4199999999999999e37

    1. Initial program 73.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{+73}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-48}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1.42 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 23: 37.9% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;a \leq 1.45 \cdot 10^{+37}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.65e50 or 1.44999999999999989e37 < a

    1. Initial program 89.8%

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

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

    if -1.65e50 < a < 1.44999999999999989e37

    1. Initial program 72.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.65 \cdot 10^{+50}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 24: 24.5% 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 78.8%

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

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

    \[\leadsto t \]

Reproduce

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