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

Percentage Accurate: 67.2% → 86.6%
Time: 21.1s
Alternatives: 26
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 26 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: 67.2% accurate, 1.0× speedup?

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

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

Alternative 1: 86.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+65}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq 50000000:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a - z} + x \cdot \left(\left(\frac{z}{a - z} + 1\right) - \frac{y}{a - z}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t}{a - z}, y - z, x + \frac{z - y}{\frac{a - z}{x}}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.5e+65)
   (* t (/ (- y z) (- a z)))
   (if (<= t 50000000.0)
     (+
      (/ (* t (- y z)) (- a z))
      (* x (- (+ (/ z (- a z)) 1.0) (/ y (- a z)))))
     (fma (/ t (- a z)) (- y z) (+ x (/ (- z y) (/ (- a z) x)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.5e+65) {
		tmp = t * ((y - z) / (a - z));
	} else if (t <= 50000000.0) {
		tmp = ((t * (y - z)) / (a - z)) + (x * (((z / (a - z)) + 1.0) - (y / (a - z))));
	} else {
		tmp = fma((t / (a - z)), (y - z), (x + ((z - y) / ((a - z) / x))));
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.5e+65)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	elseif (t <= 50000000.0)
		tmp = Float64(Float64(Float64(t * Float64(y - z)) / Float64(a - z)) + Float64(x * Float64(Float64(Float64(z / Float64(a - z)) + 1.0) - Float64(y / Float64(a - z)))));
	else
		tmp = fma(Float64(t / Float64(a - z)), Float64(y - z), Float64(x + Float64(Float64(z - y) / Float64(Float64(a - z) / x))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.5e+65], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 50000000.0], N[(N[(N[(t * N[(y - z), $MachinePrecision]), $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], N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + N[(x + N[(N[(z - y), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.5000000000000001e65

    1. Initial program 57.4%

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

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

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

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

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

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

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

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

    if -1.5000000000000001e65 < t < 5e7

    1. Initial program 68.1%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in x around -inf 91.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)} \]

    if 5e7 < t

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 87.0% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - z}{a - z}\\ \mathbf{if}\;t \leq -1.95 \cdot 10^{+65}:\\ \;\;\;\;t \cdot t_1\\ \mathbf{elif}\;t \leq 5.3 \cdot 10^{+23}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a - z} + x \cdot \left(\left(\frac{z}{a - z} + 1\right) - \frac{y}{a - z}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t_1, t - x, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- y z) (- a z))))
   (if (<= t -1.95e+65)
     (* t t_1)
     (if (<= t 5.3e+23)
       (+
        (/ (* t (- y z)) (- a z))
        (* x (- (+ (/ z (- a z)) 1.0) (/ y (- a z)))))
       (fma t_1 (- t x) x)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) / (a - z);
	double tmp;
	if (t <= -1.95e+65) {
		tmp = t * t_1;
	} else if (t <= 5.3e+23) {
		tmp = ((t * (y - z)) / (a - z)) + (x * (((z / (a - z)) + 1.0) - (y / (a - z))));
	} else {
		tmp = fma(t_1, (t - x), x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - z) / Float64(a - z))
	tmp = 0.0
	if (t <= -1.95e+65)
		tmp = Float64(t * t_1);
	elseif (t <= 5.3e+23)
		tmp = Float64(Float64(Float64(t * Float64(y - z)) / Float64(a - z)) + Float64(x * Float64(Float64(Float64(z / Float64(a - z)) + 1.0) - Float64(y / Float64(a - z)))));
	else
		tmp = fma(t_1, Float64(t - x), 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]}, If[LessEqual[t, -1.95e+65], N[(t * t$95$1), $MachinePrecision], If[LessEqual[t, 5.3e+23], N[(N[(N[(t * N[(y - z), $MachinePrecision]), $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], N[(t$95$1 * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t_1, t - x, x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.9499999999999999e65

    1. Initial program 57.4%

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

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

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

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

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

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

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

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

    if -1.9499999999999999e65 < t < 5.3000000000000001e23

    1. Initial program 67.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in x around -inf 91.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)} \]

    if 5.3000000000000001e23 < t

    1. Initial program 74.2%

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

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

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

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

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

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

Alternative 3: 86.9% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.8599999999999999e65

    1. Initial program 57.4%

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

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

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

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

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

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

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

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

    if -1.8599999999999999e65 < t < 5e17

    1. Initial program 67.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in x around -inf 91.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)} \]

    if 5e17 < t

    1. Initial program 74.2%

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

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

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

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

Alternative 4: 38.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{t \cdot z}{a}\\ t_2 := \left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{if}\;z \leq -8.6 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-29}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-134}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-109}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+17}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+130}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ (* t z) a))) (t_2 (* (- y a) (/ x z))))
   (if (<= z -8.6e+96)
     t
     (if (<= z -1.25e-29)
       t_2
       (if (<= z -2e-223)
         (* t (/ y (- a z)))
         (if (<= z 1.6e-134)
           t_1
           (if (<= z 8.5e-109)
             (/ (* y x) z)
             (if (<= z 5.8e-14)
               t_1
               (if (<= z 2.4e+17) t_2 (if (<= z 1.7e+130) t_1 t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - ((t * z) / a);
	double t_2 = (y - a) * (x / z);
	double tmp;
	if (z <= -8.6e+96) {
		tmp = t;
	} else if (z <= -1.25e-29) {
		tmp = t_2;
	} else if (z <= -2e-223) {
		tmp = t * (y / (a - z));
	} else if (z <= 1.6e-134) {
		tmp = t_1;
	} else if (z <= 8.5e-109) {
		tmp = (y * x) / z;
	} else if (z <= 5.8e-14) {
		tmp = t_1;
	} else if (z <= 2.4e+17) {
		tmp = t_2;
	} else if (z <= 1.7e+130) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - ((t * z) / a)
    t_2 = (y - a) * (x / z)
    if (z <= (-8.6d+96)) then
        tmp = t
    else if (z <= (-1.25d-29)) then
        tmp = t_2
    else if (z <= (-2d-223)) then
        tmp = t * (y / (a - z))
    else if (z <= 1.6d-134) then
        tmp = t_1
    else if (z <= 8.5d-109) then
        tmp = (y * x) / z
    else if (z <= 5.8d-14) then
        tmp = t_1
    else if (z <= 2.4d+17) then
        tmp = t_2
    else if (z <= 1.7d+130) then
        tmp = t_1
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - ((t * z) / a);
	double t_2 = (y - a) * (x / z);
	double tmp;
	if (z <= -8.6e+96) {
		tmp = t;
	} else if (z <= -1.25e-29) {
		tmp = t_2;
	} else if (z <= -2e-223) {
		tmp = t * (y / (a - z));
	} else if (z <= 1.6e-134) {
		tmp = t_1;
	} else if (z <= 8.5e-109) {
		tmp = (y * x) / z;
	} else if (z <= 5.8e-14) {
		tmp = t_1;
	} else if (z <= 2.4e+17) {
		tmp = t_2;
	} else if (z <= 1.7e+130) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - ((t * z) / a)
	t_2 = (y - a) * (x / z)
	tmp = 0
	if z <= -8.6e+96:
		tmp = t
	elif z <= -1.25e-29:
		tmp = t_2
	elif z <= -2e-223:
		tmp = t * (y / (a - z))
	elif z <= 1.6e-134:
		tmp = t_1
	elif z <= 8.5e-109:
		tmp = (y * x) / z
	elif z <= 5.8e-14:
		tmp = t_1
	elif z <= 2.4e+17:
		tmp = t_2
	elif z <= 1.7e+130:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(t * z) / a))
	t_2 = Float64(Float64(y - a) * Float64(x / z))
	tmp = 0.0
	if (z <= -8.6e+96)
		tmp = t;
	elseif (z <= -1.25e-29)
		tmp = t_2;
	elseif (z <= -2e-223)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (z <= 1.6e-134)
		tmp = t_1;
	elseif (z <= 8.5e-109)
		tmp = Float64(Float64(y * x) / z);
	elseif (z <= 5.8e-14)
		tmp = t_1;
	elseif (z <= 2.4e+17)
		tmp = t_2;
	elseif (z <= 1.7e+130)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - ((t * z) / a);
	t_2 = (y - a) * (x / z);
	tmp = 0.0;
	if (z <= -8.6e+96)
		tmp = t;
	elseif (z <= -1.25e-29)
		tmp = t_2;
	elseif (z <= -2e-223)
		tmp = t * (y / (a - z));
	elseif (z <= 1.6e-134)
		tmp = t_1;
	elseif (z <= 8.5e-109)
		tmp = (y * x) / z;
	elseif (z <= 5.8e-14)
		tmp = t_1;
	elseif (z <= 2.4e+17)
		tmp = t_2;
	elseif (z <= 1.7e+130)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(t * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.6e+96], t, If[LessEqual[z, -1.25e-29], t$95$2, If[LessEqual[z, -2e-223], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-134], t$95$1, If[LessEqual[z, 8.5e-109], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 5.8e-14], t$95$1, If[LessEqual[z, 2.4e+17], t$95$2, If[LessEqual[z, 1.7e+130], t$95$1, t]]]]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;z \leq 8.5 \cdot 10^{-109}:\\
\;\;\;\;\frac{y \cdot x}{z}\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-14}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.7 \cdot 10^{+130}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -8.60000000000000003e96 or 1.7e130 < z

    1. Initial program 32.7%

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

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

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

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

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

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

    if -8.60000000000000003e96 < z < -1.24999999999999996e-29 or 5.8000000000000005e-14 < z < 2.4e17

    1. Initial program 73.7%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.24999999999999996e-29 < z < -1.9999999999999999e-223

    1. Initial program 92.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e-223 < z < 1.6000000000000001e-134 or 8.50000000000000005e-109 < z < 5.8000000000000005e-14 or 2.4e17 < z < 1.7e130

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{z \cdot \left(t - x\right)}{a}} \]
      5. *-commutative44.8%

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

        \[\leadsto x - \color{blue}{\frac{t - x}{\frac{a}{z}}} \]
    9. Simplified48.0%

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

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

    if 1.6000000000000001e-134 < z < 8.50000000000000005e-109

    1. Initial program 99.9%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.6 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-29}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-134}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-109}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-14}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+17}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+130}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 5: 38.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{t \cdot z}{a}\\ \mathbf{if}\;z \leq -1.3 \cdot 10^{+98}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-29}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-221}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-132}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-109}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-13}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+17}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+129}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ (* t z) a))))
   (if (<= z -1.3e+98)
     t
     (if (<= z -2.6e-29)
       (* (- y a) (/ x z))
       (if (<= z -1.75e-221)
         (* t (/ y (- a z)))
         (if (<= z 2.55e-132)
           t_1
           (if (<= z 9e-109)
             (/ (* y x) z)
             (if (<= z 3e-13)
               t_1
               (if (<= z 2.5e+17)
                 (/ (* x (- y a)) z)
                 (if (<= z 7e+129) t_1 t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - ((t * z) / a);
	double tmp;
	if (z <= -1.3e+98) {
		tmp = t;
	} else if (z <= -2.6e-29) {
		tmp = (y - a) * (x / z);
	} else if (z <= -1.75e-221) {
		tmp = t * (y / (a - z));
	} else if (z <= 2.55e-132) {
		tmp = t_1;
	} else if (z <= 9e-109) {
		tmp = (y * x) / z;
	} else if (z <= 3e-13) {
		tmp = t_1;
	} else if (z <= 2.5e+17) {
		tmp = (x * (y - a)) / z;
	} else if (z <= 7e+129) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - ((t * z) / a)
    if (z <= (-1.3d+98)) then
        tmp = t
    else if (z <= (-2.6d-29)) then
        tmp = (y - a) * (x / z)
    else if (z <= (-1.75d-221)) then
        tmp = t * (y / (a - z))
    else if (z <= 2.55d-132) then
        tmp = t_1
    else if (z <= 9d-109) then
        tmp = (y * x) / z
    else if (z <= 3d-13) then
        tmp = t_1
    else if (z <= 2.5d+17) then
        tmp = (x * (y - a)) / z
    else if (z <= 7d+129) then
        tmp = t_1
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - ((t * z) / a);
	double tmp;
	if (z <= -1.3e+98) {
		tmp = t;
	} else if (z <= -2.6e-29) {
		tmp = (y - a) * (x / z);
	} else if (z <= -1.75e-221) {
		tmp = t * (y / (a - z));
	} else if (z <= 2.55e-132) {
		tmp = t_1;
	} else if (z <= 9e-109) {
		tmp = (y * x) / z;
	} else if (z <= 3e-13) {
		tmp = t_1;
	} else if (z <= 2.5e+17) {
		tmp = (x * (y - a)) / z;
	} else if (z <= 7e+129) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - ((t * z) / a)
	tmp = 0
	if z <= -1.3e+98:
		tmp = t
	elif z <= -2.6e-29:
		tmp = (y - a) * (x / z)
	elif z <= -1.75e-221:
		tmp = t * (y / (a - z))
	elif z <= 2.55e-132:
		tmp = t_1
	elif z <= 9e-109:
		tmp = (y * x) / z
	elif z <= 3e-13:
		tmp = t_1
	elif z <= 2.5e+17:
		tmp = (x * (y - a)) / z
	elif z <= 7e+129:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(t * z) / a))
	tmp = 0.0
	if (z <= -1.3e+98)
		tmp = t;
	elseif (z <= -2.6e-29)
		tmp = Float64(Float64(y - a) * Float64(x / z));
	elseif (z <= -1.75e-221)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (z <= 2.55e-132)
		tmp = t_1;
	elseif (z <= 9e-109)
		tmp = Float64(Float64(y * x) / z);
	elseif (z <= 3e-13)
		tmp = t_1;
	elseif (z <= 2.5e+17)
		tmp = Float64(Float64(x * Float64(y - a)) / z);
	elseif (z <= 7e+129)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - ((t * z) / a);
	tmp = 0.0;
	if (z <= -1.3e+98)
		tmp = t;
	elseif (z <= -2.6e-29)
		tmp = (y - a) * (x / z);
	elseif (z <= -1.75e-221)
		tmp = t * (y / (a - z));
	elseif (z <= 2.55e-132)
		tmp = t_1;
	elseif (z <= 9e-109)
		tmp = (y * x) / z;
	elseif (z <= 3e-13)
		tmp = t_1;
	elseif (z <= 2.5e+17)
		tmp = (x * (y - a)) / z;
	elseif (z <= 7e+129)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(t * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+98], t, If[LessEqual[z, -2.6e-29], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.75e-221], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.55e-132], t$95$1, If[LessEqual[z, 9e-109], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 3e-13], t$95$1, If[LessEqual[z, 2.5e+17], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 7e+129], t$95$1, t]]]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;z \leq 9 \cdot 10^{-109}:\\
\;\;\;\;\frac{y \cdot x}{z}\\

\mathbf{elif}\;z \leq 3 \cdot 10^{-13}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 7 \cdot 10^{+129}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -1.3e98 or 6.9999999999999997e129 < z

    1. Initial program 32.7%

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

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

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

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

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

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

    if -1.3e98 < z < -2.6000000000000002e-29

    1. Initial program 70.6%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6000000000000002e-29 < z < -1.7499999999999999e-221

    1. Initial program 92.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7499999999999999e-221 < z < 2.55000000000000003e-132 or 9.0000000000000002e-109 < z < 2.99999999999999984e-13 or 2.5e17 < z < 6.9999999999999997e129

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{z \cdot \left(t - x\right)}{a}} \]
      5. *-commutative44.8%

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

        \[\leadsto x - \color{blue}{\frac{t - x}{\frac{a}{z}}} \]
    9. Simplified48.0%

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

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

    if 2.55000000000000003e-132 < z < 9.0000000000000002e-109

    1. Initial program 99.9%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.99999999999999984e-13 < z < 2.5e17

    1. Initial program 80.7%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--80.3%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+98}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-29}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-221}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-132}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-109}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-13}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+17}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+129}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 6: 69.7% accurate, 0.6× speedup?

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

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

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

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

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

\mathbf{elif}\;a \leq 8.2 \cdot 10^{+25} \lor \neg \left(a \leq 1.15 \cdot 10^{+39}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.25000000000000006e60 or 2.39999999999999995e-15 < a < 8.19999999999999933e25 or 1.15000000000000006e39 < a

    1. Initial program 72.1%

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

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

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

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

    if -2.25000000000000006e60 < a < -4.40000000000000024e-44

    1. Initial program 66.1%

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

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

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

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

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

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

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

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

    if -4.40000000000000024e-44 < a < -3.79999999999999983e-59

    1. Initial program 80.1%

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

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

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

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

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

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

    if -3.79999999999999983e-59 < a < 2.39999999999999995e-15

    1. Initial program 65.0%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--81.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.19999999999999933e25 < a < 1.15000000000000006e39

    1. Initial program 44.9%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--86.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-1 \cdot z}{x}}} \]
      2. neg-mul-185.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.25 \cdot 10^{+60}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{-44}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-59}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-15}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+25} \lor \neg \left(a \leq 1.15 \cdot 10^{+39}\right):\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{a - y}{\frac{-z}{x}}\\ \end{array} \]

Alternative 7: 47.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{z - y}{z}\\ t_2 := \left(y - a\right) \cdot \frac{x}{z}\\ t_3 := x - \frac{t \cdot z}{a}\\ \mathbf{if}\;a \leq -1.8 \cdot 10^{+47}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-268}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-151}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-120}:\\ \;\;\;\;\frac{-t}{-1 + \frac{a}{z}}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-51}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+40}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- z y) z)))
        (t_2 (* (- y a) (/ x z)))
        (t_3 (- x (/ (* t z) a))))
   (if (<= a -1.8e+47)
     t_3
     (if (<= a -6e-268)
       t_1
       (if (<= a 1.9e-151)
         (* (/ y z) (- x t))
         (if (<= a 9.5e-120)
           (/ (- t) (+ -1.0 (/ a z)))
           (if (<= a 1.25e-51)
             t_2
             (if (<= a 2.2e+38) t_1 (if (<= a 6e+40) t_2 t_3)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((z - y) / z);
	double t_2 = (y - a) * (x / z);
	double t_3 = x - ((t * z) / a);
	double tmp;
	if (a <= -1.8e+47) {
		tmp = t_3;
	} else if (a <= -6e-268) {
		tmp = t_1;
	} else if (a <= 1.9e-151) {
		tmp = (y / z) * (x - t);
	} else if (a <= 9.5e-120) {
		tmp = -t / (-1.0 + (a / z));
	} else if (a <= 1.25e-51) {
		tmp = t_2;
	} else if (a <= 2.2e+38) {
		tmp = t_1;
	} else if (a <= 6e+40) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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 * ((z - y) / z)
    t_2 = (y - a) * (x / z)
    t_3 = x - ((t * z) / a)
    if (a <= (-1.8d+47)) then
        tmp = t_3
    else if (a <= (-6d-268)) then
        tmp = t_1
    else if (a <= 1.9d-151) then
        tmp = (y / z) * (x - t)
    else if (a <= 9.5d-120) then
        tmp = -t / ((-1.0d0) + (a / z))
    else if (a <= 1.25d-51) then
        tmp = t_2
    else if (a <= 2.2d+38) then
        tmp = t_1
    else if (a <= 6d+40) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((z - y) / z);
	double t_2 = (y - a) * (x / z);
	double t_3 = x - ((t * z) / a);
	double tmp;
	if (a <= -1.8e+47) {
		tmp = t_3;
	} else if (a <= -6e-268) {
		tmp = t_1;
	} else if (a <= 1.9e-151) {
		tmp = (y / z) * (x - t);
	} else if (a <= 9.5e-120) {
		tmp = -t / (-1.0 + (a / z));
	} else if (a <= 1.25e-51) {
		tmp = t_2;
	} else if (a <= 2.2e+38) {
		tmp = t_1;
	} else if (a <= 6e+40) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((z - y) / z)
	t_2 = (y - a) * (x / z)
	t_3 = x - ((t * z) / a)
	tmp = 0
	if a <= -1.8e+47:
		tmp = t_3
	elif a <= -6e-268:
		tmp = t_1
	elif a <= 1.9e-151:
		tmp = (y / z) * (x - t)
	elif a <= 9.5e-120:
		tmp = -t / (-1.0 + (a / z))
	elif a <= 1.25e-51:
		tmp = t_2
	elif a <= 2.2e+38:
		tmp = t_1
	elif a <= 6e+40:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(z - y) / z))
	t_2 = Float64(Float64(y - a) * Float64(x / z))
	t_3 = Float64(x - Float64(Float64(t * z) / a))
	tmp = 0.0
	if (a <= -1.8e+47)
		tmp = t_3;
	elseif (a <= -6e-268)
		tmp = t_1;
	elseif (a <= 1.9e-151)
		tmp = Float64(Float64(y / z) * Float64(x - t));
	elseif (a <= 9.5e-120)
		tmp = Float64(Float64(-t) / Float64(-1.0 + Float64(a / z)));
	elseif (a <= 1.25e-51)
		tmp = t_2;
	elseif (a <= 2.2e+38)
		tmp = t_1;
	elseif (a <= 6e+40)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((z - y) / z);
	t_2 = (y - a) * (x / z);
	t_3 = x - ((t * z) / a);
	tmp = 0.0;
	if (a <= -1.8e+47)
		tmp = t_3;
	elseif (a <= -6e-268)
		tmp = t_1;
	elseif (a <= 1.9e-151)
		tmp = (y / z) * (x - t);
	elseif (a <= 9.5e-120)
		tmp = -t / (-1.0 + (a / z));
	elseif (a <= 1.25e-51)
		tmp = t_2;
	elseif (a <= 2.2e+38)
		tmp = t_1;
	elseif (a <= 6e+40)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(N[(t * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.8e+47], t$95$3, If[LessEqual[a, -6e-268], t$95$1, If[LessEqual[a, 1.9e-151], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e-120], N[((-t) / N[(-1.0 + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e-51], t$95$2, If[LessEqual[a, 2.2e+38], t$95$1, If[LessEqual[a, 6e+40], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-51}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 2.2 \cdot 10^{+38}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 6 \cdot 10^{+40}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.80000000000000004e47 or 6.0000000000000004e40 < a

    1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.80000000000000004e47 < a < -5.9999999999999995e-268 or 1.25000000000000001e-51 < a < 2.20000000000000006e38

    1. Initial program 70.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.9999999999999995e-268 < a < 1.89999999999999985e-151

    1. Initial program 61.9%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--89.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.89999999999999985e-151 < a < 9.49999999999999937e-120

    1. Initial program 51.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - z \cdot \frac{t - x}{a - z}} \]
    7. Taylor expanded in x 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}}} \]
      4. div-sub64.1%

        \[\leadsto \frac{-t}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      5. *-inverses64.1%

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

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

    if 9.49999999999999937e-120 < a < 1.25000000000000001e-51 or 2.20000000000000006e38 < a < 6.0000000000000004e40

    1. Initial program 58.3%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - a}{z} \cdot x} \]
      7. *-commutative58.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{+47}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-268}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-151}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-120}:\\ \;\;\;\;\frac{-t}{-1 + \frac{a}{z}}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-51}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+40}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \end{array} \]

Alternative 8: 46.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{z - y}{z}\\ t_2 := \left(y - a\right) \cdot \frac{x}{z}\\ t_3 := x - \frac{t \cdot z}{a}\\ \mathbf{if}\;a \leq -1.36 \cdot 10^{+48}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-230}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-152}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-119}:\\ \;\;\;\;\frac{-t}{-1 + \frac{a}{z}}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-52}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{+37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+39}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- z y) z)))
        (t_2 (* (- y a) (/ x z)))
        (t_3 (- x (/ (* t z) a))))
   (if (<= a -1.36e+48)
     t_3
     (if (<= a -2.7e-230)
       t_1
       (if (<= a 3.8e-152)
         (/ (* y (- x t)) z)
         (if (<= a 1.25e-119)
           (/ (- t) (+ -1.0 (/ a z)))
           (if (<= a 1.35e-52)
             t_2
             (if (<= a 3.7e+37) t_1 (if (<= a 2.4e+39) t_2 t_3)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((z - y) / z);
	double t_2 = (y - a) * (x / z);
	double t_3 = x - ((t * z) / a);
	double tmp;
	if (a <= -1.36e+48) {
		tmp = t_3;
	} else if (a <= -2.7e-230) {
		tmp = t_1;
	} else if (a <= 3.8e-152) {
		tmp = (y * (x - t)) / z;
	} else if (a <= 1.25e-119) {
		tmp = -t / (-1.0 + (a / z));
	} else if (a <= 1.35e-52) {
		tmp = t_2;
	} else if (a <= 3.7e+37) {
		tmp = t_1;
	} else if (a <= 2.4e+39) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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 * ((z - y) / z)
    t_2 = (y - a) * (x / z)
    t_3 = x - ((t * z) / a)
    if (a <= (-1.36d+48)) then
        tmp = t_3
    else if (a <= (-2.7d-230)) then
        tmp = t_1
    else if (a <= 3.8d-152) then
        tmp = (y * (x - t)) / z
    else if (a <= 1.25d-119) then
        tmp = -t / ((-1.0d0) + (a / z))
    else if (a <= 1.35d-52) then
        tmp = t_2
    else if (a <= 3.7d+37) then
        tmp = t_1
    else if (a <= 2.4d+39) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((z - y) / z);
	double t_2 = (y - a) * (x / z);
	double t_3 = x - ((t * z) / a);
	double tmp;
	if (a <= -1.36e+48) {
		tmp = t_3;
	} else if (a <= -2.7e-230) {
		tmp = t_1;
	} else if (a <= 3.8e-152) {
		tmp = (y * (x - t)) / z;
	} else if (a <= 1.25e-119) {
		tmp = -t / (-1.0 + (a / z));
	} else if (a <= 1.35e-52) {
		tmp = t_2;
	} else if (a <= 3.7e+37) {
		tmp = t_1;
	} else if (a <= 2.4e+39) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((z - y) / z)
	t_2 = (y - a) * (x / z)
	t_3 = x - ((t * z) / a)
	tmp = 0
	if a <= -1.36e+48:
		tmp = t_3
	elif a <= -2.7e-230:
		tmp = t_1
	elif a <= 3.8e-152:
		tmp = (y * (x - t)) / z
	elif a <= 1.25e-119:
		tmp = -t / (-1.0 + (a / z))
	elif a <= 1.35e-52:
		tmp = t_2
	elif a <= 3.7e+37:
		tmp = t_1
	elif a <= 2.4e+39:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(z - y) / z))
	t_2 = Float64(Float64(y - a) * Float64(x / z))
	t_3 = Float64(x - Float64(Float64(t * z) / a))
	tmp = 0.0
	if (a <= -1.36e+48)
		tmp = t_3;
	elseif (a <= -2.7e-230)
		tmp = t_1;
	elseif (a <= 3.8e-152)
		tmp = Float64(Float64(y * Float64(x - t)) / z);
	elseif (a <= 1.25e-119)
		tmp = Float64(Float64(-t) / Float64(-1.0 + Float64(a / z)));
	elseif (a <= 1.35e-52)
		tmp = t_2;
	elseif (a <= 3.7e+37)
		tmp = t_1;
	elseif (a <= 2.4e+39)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((z - y) / z);
	t_2 = (y - a) * (x / z);
	t_3 = x - ((t * z) / a);
	tmp = 0.0;
	if (a <= -1.36e+48)
		tmp = t_3;
	elseif (a <= -2.7e-230)
		tmp = t_1;
	elseif (a <= 3.8e-152)
		tmp = (y * (x - t)) / z;
	elseif (a <= 1.25e-119)
		tmp = -t / (-1.0 + (a / z));
	elseif (a <= 1.35e-52)
		tmp = t_2;
	elseif (a <= 3.7e+37)
		tmp = t_1;
	elseif (a <= 2.4e+39)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(N[(t * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.36e+48], t$95$3, If[LessEqual[a, -2.7e-230], t$95$1, If[LessEqual[a, 3.8e-152], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.25e-119], N[((-t) / N[(-1.0 + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e-52], t$95$2, If[LessEqual[a, 3.7e+37], t$95$1, If[LessEqual[a, 2.4e+39], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.7 \cdot 10^{-230}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-119}:\\
\;\;\;\;\frac{-t}{-1 + \frac{a}{z}}\\

\mathbf{elif}\;a \leq 1.35 \cdot 10^{-52}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 3.7 \cdot 10^{+37}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 2.4 \cdot 10^{+39}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.3599999999999999e48 or 2.4000000000000001e39 < a

    1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3599999999999999e48 < a < -2.70000000000000011e-230 or 1.35000000000000005e-52 < a < 3.6999999999999999e37

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.70000000000000011e-230 < a < 3.80000000000000012e-152

    1. Initial program 64.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    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. associate-*r/63.7%

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

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

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

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

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

    if 3.80000000000000012e-152 < a < 1.24999999999999998e-119

    1. Initial program 51.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - z \cdot \frac{t - x}{a - z}} \]
    7. Taylor expanded in x 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}}} \]
      4. div-sub64.1%

        \[\leadsto \frac{-t}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      5. *-inverses64.1%

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

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

    if 1.24999999999999998e-119 < a < 1.35000000000000005e-52 or 3.6999999999999999e37 < a < 2.4000000000000001e39

    1. Initial program 58.3%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - a}{z} \cdot x} \]
      7. *-commutative58.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.36 \cdot 10^{+48}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-230}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-152}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-119}:\\ \;\;\;\;\frac{-t}{-1 + \frac{a}{z}}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-52}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{+37}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+39}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \end{array} \]

Alternative 9: 67.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y}{a} \cdot \left(x - t\right)\\ t_2 := t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{if}\;z \leq -3.15 \cdot 10^{-47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-142}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-100}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-13} \lor \neg \left(z \leq 1.18 \cdot 10^{+58}\right) \land z \leq 6.5 \cdot 10^{+129}:\\ \;\;\;\;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)))) (t_2 (+ t (* (/ y z) (- x t)))))
   (if (<= z -3.15e-47)
     t_2
     (if (<= z 2.1e-142)
       t_1
       (if (<= z 7.2e-100)
         (/ (* y (- t x)) (- a z))
         (if (or (<= z 2.1e-13) (and (not (<= z 1.18e+58)) (<= z 6.5e+129)))
           t_1
           t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - ((y / a) * (x - t));
	double t_2 = t + ((y / z) * (x - t));
	double tmp;
	if (z <= -3.15e-47) {
		tmp = t_2;
	} else if (z <= 2.1e-142) {
		tmp = t_1;
	} else if (z <= 7.2e-100) {
		tmp = (y * (t - x)) / (a - z);
	} else if ((z <= 2.1e-13) || (!(z <= 1.18e+58) && (z <= 6.5e+129))) {
		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))
    t_2 = t + ((y / z) * (x - t))
    if (z <= (-3.15d-47)) then
        tmp = t_2
    else if (z <= 2.1d-142) then
        tmp = t_1
    else if (z <= 7.2d-100) then
        tmp = (y * (t - x)) / (a - z)
    else if ((z <= 2.1d-13) .or. (.not. (z <= 1.18d+58)) .and. (z <= 6.5d+129)) 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 - t));
	double t_2 = t + ((y / z) * (x - t));
	double tmp;
	if (z <= -3.15e-47) {
		tmp = t_2;
	} else if (z <= 2.1e-142) {
		tmp = t_1;
	} else if (z <= 7.2e-100) {
		tmp = (y * (t - x)) / (a - z);
	} else if ((z <= 2.1e-13) || (!(z <= 1.18e+58) && (z <= 6.5e+129))) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - ((y / a) * (x - t))
	t_2 = t + ((y / z) * (x - t))
	tmp = 0
	if z <= -3.15e-47:
		tmp = t_2
	elif z <= 2.1e-142:
		tmp = t_1
	elif z <= 7.2e-100:
		tmp = (y * (t - x)) / (a - z)
	elif (z <= 2.1e-13) or (not (z <= 1.18e+58) and (z <= 6.5e+129)):
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(y / a) * Float64(x - t)))
	t_2 = Float64(t + Float64(Float64(y / z) * Float64(x - t)))
	tmp = 0.0
	if (z <= -3.15e-47)
		tmp = t_2;
	elseif (z <= 2.1e-142)
		tmp = t_1;
	elseif (z <= 7.2e-100)
		tmp = Float64(Float64(y * Float64(t - x)) / Float64(a - z));
	elseif ((z <= 2.1e-13) || (!(z <= 1.18e+58) && (z <= 6.5e+129)))
		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));
	t_2 = t + ((y / z) * (x - t));
	tmp = 0.0;
	if (z <= -3.15e-47)
		tmp = t_2;
	elseif (z <= 2.1e-142)
		tmp = t_1;
	elseif (z <= 7.2e-100)
		tmp = (y * (t - x)) / (a - z);
	elseif ((z <= 2.1e-13) || (~((z <= 1.18e+58)) && (z <= 6.5e+129)))
		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[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.15e-47], t$95$2, If[LessEqual[z, 2.1e-142], t$95$1, If[LessEqual[z, 7.2e-100], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 2.1e-13], And[N[Not[LessEqual[z, 1.18e+58]], $MachinePrecision], LessEqual[z, 6.5e+129]]], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-142}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-13} \lor \neg \left(z \leq 1.18 \cdot 10^{+58}\right) \land z \leq 6.5 \cdot 10^{+129}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.1500000000000001e-47 or 2.09999999999999989e-13 < z < 1.18000000000000003e58 or 6.4999999999999995e129 < z

    1. Initial program 48.7%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--82.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.1500000000000001e-47 < z < 2.0999999999999999e-142 or 7.1999999999999997e-100 < z < 2.09999999999999989e-13 or 1.18000000000000003e58 < z < 6.4999999999999995e129

    1. Initial program 85.7%

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

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

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

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

    if 2.0999999999999999e-142 < z < 7.1999999999999997e-100

    1. Initial program 99.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.15 \cdot 10^{-47}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-142}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-100}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-13} \lor \neg \left(z \leq 1.18 \cdot 10^{+58}\right) \land z \leq 6.5 \cdot 10^{+129}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \end{array} \]

Alternative 10: 37.2% accurate, 0.7× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 5.6 \cdot 10^{-138}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.3 \cdot 10^{-108}:\\
\;\;\;\;\frac{y \cdot x}{z}\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+129}:\\
\;\;\;\;x + \frac{z}{\frac{a}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -5.00000000000000025e95 or 7.4999999999999998e129 < z

    1. Initial program 32.7%

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

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

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

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

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

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

    if -5.00000000000000025e95 < z < -3.45e-29

    1. Initial program 70.6%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.45e-29 < z < -3.40000000000000016e-217

    1. Initial program 92.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.40000000000000016e-217 < z < 5.60000000000000002e-138

    1. Initial program 94.4%

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

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

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

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

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

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

    if 5.60000000000000002e-138 < z < 2.29999999999999996e-108

    1. Initial program 99.9%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.29999999999999996e-108 < z < 7.4999999999999998e129

    1. Initial program 71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t - x}{\frac{a}{z}}} \]
    9. Simplified44.2%

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{z \cdot x}{a}} \]
    11. Step-by-step derivation
      1. sub-neg32.9%

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{x}}} \]
    12. Simplified38.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+95}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.45 \cdot 10^{-29}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-217}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-138}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-108}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+129}:\\ \;\;\;\;x + \frac{z}{\frac{a}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 11: 47.6% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -4.5 \cdot 10^{-268}:\\
\;\;\;\;t_1\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.5500000000000001e47 or 3.7999999999999999e37 < a

    1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.5500000000000001e47 < a < -4.5000000000000001e-268 or 3.8000000000000003e-52 < a < 3.7999999999999999e37

    1. Initial program 70.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.5000000000000001e-268 < a < 4.8e-150

    1. Initial program 61.9%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--89.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.8e-150 < a < 8.50000000000000059e-120

    1. Initial program 51.7%

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

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

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

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

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

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

    if 8.50000000000000059e-120 < a < 3.8000000000000003e-52

    1. Initial program 59.2%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}} - \frac{a}{\frac{z}{x}}} \]
      5. div-sub54.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.55 \cdot 10^{+47}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-268}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-150}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-120}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-52}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+37}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \end{array} \]

Alternative 12: 56.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := y \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;y \leq -6.4 \cdot 10^{+143}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-250}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-113}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+30} \lor \neg \left(y \leq 1.4 \cdot 10^{+95}\right):\\ \;\;\;\;t_2\\ \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 (* y (/ (- t x) (- a z)))))
   (if (<= y -6.4e+143)
     t_2
     (if (<= y 5e-250)
       t_1
       (if (<= y 1.4e-113)
         (- x (/ (* t z) a))
         (if (or (<= y 9.5e+30) (not (<= y 1.4e+95))) t_2 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 = y * ((t - x) / (a - z));
	double tmp;
	if (y <= -6.4e+143) {
		tmp = t_2;
	} else if (y <= 5e-250) {
		tmp = t_1;
	} else if (y <= 1.4e-113) {
		tmp = x - ((t * z) / a);
	} else if ((y <= 9.5e+30) || !(y <= 1.4e+95)) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = y * ((t - x) / (a - z))
    if (y <= (-6.4d+143)) then
        tmp = t_2
    else if (y <= 5d-250) then
        tmp = t_1
    else if (y <= 1.4d-113) then
        tmp = x - ((t * z) / a)
    else if ((y <= 9.5d+30) .or. (.not. (y <= 1.4d+95))) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = y * ((t - x) / (a - z));
	double tmp;
	if (y <= -6.4e+143) {
		tmp = t_2;
	} else if (y <= 5e-250) {
		tmp = t_1;
	} else if (y <= 1.4e-113) {
		tmp = x - ((t * z) / a);
	} else if ((y <= 9.5e+30) || !(y <= 1.4e+95)) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = y * ((t - x) / (a - z))
	tmp = 0
	if y <= -6.4e+143:
		tmp = t_2
	elif y <= 5e-250:
		tmp = t_1
	elif y <= 1.4e-113:
		tmp = x - ((t * z) / a)
	elif (y <= 9.5e+30) or not (y <= 1.4e+95):
		tmp = t_2
	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(y * Float64(Float64(t - x) / Float64(a - z)))
	tmp = 0.0
	if (y <= -6.4e+143)
		tmp = t_2;
	elseif (y <= 5e-250)
		tmp = t_1;
	elseif (y <= 1.4e-113)
		tmp = Float64(x - Float64(Float64(t * z) / a));
	elseif ((y <= 9.5e+30) || !(y <= 1.4e+95))
		tmp = t_2;
	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 = y * ((t - x) / (a - z));
	tmp = 0.0;
	if (y <= -6.4e+143)
		tmp = t_2;
	elseif (y <= 5e-250)
		tmp = t_1;
	elseif (y <= 1.4e-113)
		tmp = x - ((t * z) / a);
	elseif ((y <= 9.5e+30) || ~((y <= 1.4e+95)))
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.4e+143], t$95$2, If[LessEqual[y, 5e-250], t$95$1, If[LessEqual[y, 1.4e-113], N[(x - N[(N[(t * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 9.5e+30], N[Not[LessEqual[y, 1.4e+95]], $MachinePrecision]], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 5 \cdot 10^{-250}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 9.5 \cdot 10^{+30} \lor \neg \left(y \leq 1.4 \cdot 10^{+95}\right):\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.40000000000000033e143 or 1.4e-113 < y < 9.5000000000000003e30 or 1.3999999999999999e95 < y

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

    if -6.40000000000000033e143 < y < 5.00000000000000027e-250 or 9.5000000000000003e30 < y < 1.3999999999999999e95

    1. Initial program 71.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if 5.00000000000000027e-250 < y < 1.4e-113

    1. Initial program 65.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative65.8%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/78.1%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def78.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified78.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in y around 0 56.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{\left(t - x\right) \cdot z}{a - z} + x} \]
    5. Step-by-step derivation
      1. +-commutative56.6%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(t - x\right) \cdot z}{a - z}} \]
      2. *-commutative56.6%

        \[\leadsto x + -1 \cdot \frac{\color{blue}{z \cdot \left(t - x\right)}}{a - z} \]
      3. mul-1-neg56.6%

        \[\leadsto x + \color{blue}{\left(-\frac{z \cdot \left(t - x\right)}{a - z}\right)} \]
      4. associate-*r/65.5%

        \[\leadsto x + \left(-\color{blue}{z \cdot \frac{t - x}{a - z}}\right) \]
      5. unsub-neg65.5%

        \[\leadsto \color{blue}{x - z \cdot \frac{t - x}{a - z}} \]
    6. Simplified65.5%

      \[\leadsto \color{blue}{x - z \cdot \frac{t - x}{a - z}} \]
    7. Taylor expanded in a around inf 43.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{\left(t - x\right) \cdot z}{a} + x} \]
    8. Step-by-step derivation
      1. +-commutative43.9%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(t - x\right) \cdot z}{a}} \]
      2. *-commutative43.9%

        \[\leadsto x + -1 \cdot \frac{\color{blue}{z \cdot \left(t - x\right)}}{a} \]
      3. mul-1-neg43.9%

        \[\leadsto x + \color{blue}{\left(-\frac{z \cdot \left(t - x\right)}{a}\right)} \]
      4. unsub-neg43.9%

        \[\leadsto \color{blue}{x - \frac{z \cdot \left(t - x\right)}{a}} \]
      5. *-commutative43.9%

        \[\leadsto x - \frac{\color{blue}{\left(t - x\right) \cdot z}}{a} \]
      6. associate-/l*52.3%

        \[\leadsto x - \color{blue}{\frac{t - x}{\frac{a}{z}}} \]
    9. Simplified52.3%

      \[\leadsto \color{blue}{x - \frac{t - x}{\frac{a}{z}}} \]
    10. Taylor expanded in t around inf 50.6%

      \[\leadsto x - \color{blue}{\frac{t \cdot z}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.4 \cdot 10^{+143}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-250}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-113}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+30} \lor \neg \left(y \leq 1.4 \cdot 10^{+95}\right):\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 13: 63.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a - z}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ t_3 := x - \frac{y}{a} \cdot \left(x - t\right)\\ \mathbf{if}\;z \leq -7.8 \cdot 10^{+93}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-87}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-13}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 5.6 \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 (* y (/ (- t x) (- a z))))
        (t_2 (* t (/ (- y z) (- a z))))
        (t_3 (- x (* (/ y a) (- x t)))))
   (if (<= z -7.8e+93)
     t_2
     (if (<= z -1.05e-87)
       t_1
       (if (<= z 9.5e-13)
         t_3
         (if (<= z 5.6e+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 = y * ((t - x) / (a - z));
	double t_2 = t * ((y - z) / (a - z));
	double t_3 = x - ((y / a) * (x - t));
	double tmp;
	if (z <= -7.8e+93) {
		tmp = t_2;
	} else if (z <= -1.05e-87) {
		tmp = t_1;
	} else if (z <= 9.5e-13) {
		tmp = t_3;
	} else if (z <= 5.6e+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 = y * ((t - x) / (a - z))
    t_2 = t * ((y - z) / (a - z))
    t_3 = x - ((y / a) * (x - t))
    if (z <= (-7.8d+93)) then
        tmp = t_2
    else if (z <= (-1.05d-87)) then
        tmp = t_1
    else if (z <= 9.5d-13) then
        tmp = t_3
    else if (z <= 5.6d+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 = y * ((t - x) / (a - z));
	double t_2 = t * ((y - z) / (a - z));
	double t_3 = x - ((y / a) * (x - t));
	double tmp;
	if (z <= -7.8e+93) {
		tmp = t_2;
	} else if (z <= -1.05e-87) {
		tmp = t_1;
	} else if (z <= 9.5e-13) {
		tmp = t_3;
	} else if (z <= 5.6e+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 = y * ((t - x) / (a - z))
	t_2 = t * ((y - z) / (a - z))
	t_3 = x - ((y / a) * (x - t))
	tmp = 0
	if z <= -7.8e+93:
		tmp = t_2
	elif z <= -1.05e-87:
		tmp = t_1
	elif z <= 9.5e-13:
		tmp = t_3
	elif z <= 5.6e+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(y * Float64(Float64(t - x) / Float64(a - z)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_3 = Float64(x - Float64(Float64(y / a) * Float64(x - t)))
	tmp = 0.0
	if (z <= -7.8e+93)
		tmp = t_2;
	elseif (z <= -1.05e-87)
		tmp = t_1;
	elseif (z <= 9.5e-13)
		tmp = t_3;
	elseif (z <= 5.6e+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 = y * ((t - x) / (a - z));
	t_2 = t * ((y - z) / (a - z));
	t_3 = x - ((y / a) * (x - t));
	tmp = 0.0;
	if (z <= -7.8e+93)
		tmp = t_2;
	elseif (z <= -1.05e-87)
		tmp = t_1;
	elseif (z <= 9.5e-13)
		tmp = t_3;
	elseif (z <= 5.6e+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[(y * N[(N[(t - x), $MachinePrecision] / 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[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.8e+93], t$95$2, If[LessEqual[z, -1.05e-87], t$95$1, If[LessEqual[z, 9.5e-13], t$95$3, If[LessEqual[z, 5.6e+58], t$95$1, If[LessEqual[z, 6.5e+129], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a - z}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
t_3 := x - \frac{y}{a} \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{+93}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -1.05 \cdot 10^{-87}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{-13}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 5.6 \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 < -7.8000000000000005e93 or 6.4999999999999995e129 < z

    1. Initial program 32.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative32.7%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/66.2%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def66.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified66.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in t around inf 64.9%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    5. Step-by-step derivation
      1. div-sub64.9%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    6. Simplified64.9%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if -7.8000000000000005e93 < z < -1.05000000000000004e-87 or 9.49999999999999991e-13 < z < 5.5999999999999996e58

    1. Initial program 78.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative78.2%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/83.3%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def83.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified83.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in y around inf 60.8%

      \[\leadsto \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y} \]
    5. Step-by-step derivation
      1. div-sub60.8%

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative60.8%

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Simplified60.8%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]

    if -1.05000000000000004e-87 < z < 9.49999999999999991e-13 or 5.5999999999999996e58 < z < 6.4999999999999995e129

    1. Initial program 87.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/95.0%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified95.0%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 77.2%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification69.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+93}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-87}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-13}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{+58}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+129}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 14: 35.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6.3 \cdot 10^{+122}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-58}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-175}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{-115}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-51}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -6.3e+122)
   x
   (if (<= a -1.6e-58)
     (* t (/ (- y z) a))
     (if (<= a -1.55e-175)
       t
       (if (<= a 4.3e-115)
         (/ (* y x) z)
         (if (<= a 3.2e-51) (* (- y a) (/ x z)) (if (<= a 6.6e+37) t x)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -6.3e+122) {
		tmp = x;
	} else if (a <= -1.6e-58) {
		tmp = t * ((y - z) / a);
	} else if (a <= -1.55e-175) {
		tmp = t;
	} else if (a <= 4.3e-115) {
		tmp = (y * x) / z;
	} else if (a <= 3.2e-51) {
		tmp = (y - a) * (x / z);
	} else if (a <= 6.6e+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.3d+122)) then
        tmp = x
    else if (a <= (-1.6d-58)) then
        tmp = t * ((y - z) / a)
    else if (a <= (-1.55d-175)) then
        tmp = t
    else if (a <= 4.3d-115) then
        tmp = (y * x) / z
    else if (a <= 3.2d-51) then
        tmp = (y - a) * (x / z)
    else if (a <= 6.6d+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.3e+122) {
		tmp = x;
	} else if (a <= -1.6e-58) {
		tmp = t * ((y - z) / a);
	} else if (a <= -1.55e-175) {
		tmp = t;
	} else if (a <= 4.3e-115) {
		tmp = (y * x) / z;
	} else if (a <= 3.2e-51) {
		tmp = (y - a) * (x / z);
	} else if (a <= 6.6e+37) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -6.3e+122:
		tmp = x
	elif a <= -1.6e-58:
		tmp = t * ((y - z) / a)
	elif a <= -1.55e-175:
		tmp = t
	elif a <= 4.3e-115:
		tmp = (y * x) / z
	elif a <= 3.2e-51:
		tmp = (y - a) * (x / z)
	elif a <= 6.6e+37:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -6.3e+122)
		tmp = x;
	elseif (a <= -1.6e-58)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (a <= -1.55e-175)
		tmp = t;
	elseif (a <= 4.3e-115)
		tmp = Float64(Float64(y * x) / z);
	elseif (a <= 3.2e-51)
		tmp = Float64(Float64(y - a) * Float64(x / z));
	elseif (a <= 6.6e+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.3e+122)
		tmp = x;
	elseif (a <= -1.6e-58)
		tmp = t * ((y - z) / a);
	elseif (a <= -1.55e-175)
		tmp = t;
	elseif (a <= 4.3e-115)
		tmp = (y * x) / z;
	elseif (a <= 3.2e-51)
		tmp = (y - a) * (x / z);
	elseif (a <= 6.6e+37)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.3e+122], x, If[LessEqual[a, -1.6e-58], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.55e-175], t, If[LessEqual[a, 4.3e-115], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 3.2e-51], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.6e+37], t, x]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.3 \cdot 10^{+122}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.6 \cdot 10^{-58}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\

\mathbf{elif}\;a \leq -1.55 \cdot 10^{-175}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 4.3 \cdot 10^{-115}:\\
\;\;\;\;\frac{y \cdot x}{z}\\

\mathbf{elif}\;a \leq 3.2 \cdot 10^{-51}:\\
\;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\

\mathbf{elif}\;a \leq 6.6 \cdot 10^{+37}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -6.3000000000000001e122 or 6.6000000000000002e37 < a

    1. Initial program 68.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative68.6%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/89.3%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def89.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified89.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in a around inf 56.3%

      \[\leadsto \color{blue}{x} \]

    if -6.3000000000000001e122 < a < -1.6e-58

    1. Initial program 73.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative73.2%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/88.2%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def88.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified88.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in t around inf 58.6%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    5. Step-by-step derivation
      1. div-sub58.6%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    6. Simplified58.6%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Taylor expanded in a around inf 43.1%

      \[\leadsto t \cdot \color{blue}{\frac{y - z}{a}} \]

    if -1.6e-58 < a < -1.54999999999999999e-175 or 3.2e-51 < a < 6.6000000000000002e37

    1. Initial program 68.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative68.8%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/84.3%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def84.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified84.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 39.7%

      \[\leadsto \color{blue}{t} \]

    if -1.54999999999999999e-175 < a < 4.3000000000000004e-115

    1. Initial program 67.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative67.4%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/78.9%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def78.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified78.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 83.1%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative83.1%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*84.0%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--84.0%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg84.0%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac84.0%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*83.1%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative83.1%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--83.1%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg83.1%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--83.1%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative83.1%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*84.0%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified84.0%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 43.2%

      \[\leadsto \color{blue}{\frac{\left(y - a\right) \cdot x}{z}} \]
    8. Taylor expanded in y around inf 43.3%

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]

    if 4.3000000000000004e-115 < a < 3.2e-51

    1. Initial program 51.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative51.5%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/58.8%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def58.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified58.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 57.8%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative57.8%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*69.2%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--69.2%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg69.2%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac69.2%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*57.8%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative57.8%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--57.8%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg57.8%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--57.8%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative57.8%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*69.2%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified69.2%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 45.8%

      \[\leadsto \color{blue}{\frac{\left(y - a\right) \cdot x}{z}} \]
    8. Taylor expanded in y around 0 45.8%

      \[\leadsto \color{blue}{\frac{y \cdot x}{z} + -1 \cdot \frac{a \cdot x}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*57.4%

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} + -1 \cdot \frac{a \cdot x}{z} \]
      2. mul-1-neg57.4%

        \[\leadsto \frac{y}{\frac{z}{x}} + \color{blue}{\left(-\frac{a \cdot x}{z}\right)} \]
      3. associate-/l*57.2%

        \[\leadsto \frac{y}{\frac{z}{x}} + \left(-\color{blue}{\frac{a}{\frac{z}{x}}}\right) \]
      4. sub-neg57.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}} - \frac{a}{\frac{z}{x}}} \]
      5. div-sub57.2%

        \[\leadsto \color{blue}{\frac{y - a}{\frac{z}{x}}} \]
      6. associate-/r/57.4%

        \[\leadsto \color{blue}{\frac{y - a}{z} \cdot x} \]
      7. *-commutative57.4%

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
      8. associate-*r/45.8%

        \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
      9. *-commutative45.8%

        \[\leadsto \frac{\color{blue}{\left(y - a\right) \cdot x}}{z} \]
      10. associate-*r/57.4%

        \[\leadsto \color{blue}{\left(y - a\right) \cdot \frac{x}{z}} \]
    10. Simplified57.4%

      \[\leadsto \color{blue}{\left(y - a\right) \cdot \frac{x}{z}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification47.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.3 \cdot 10^{+122}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-58}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-175}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{-115}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-51}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 68.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.22 \cdot 10^{-47} \lor \neg \left(z \leq 1.36 \cdot 10^{-14}\right) \land \left(z \leq 1.3 \cdot 10^{+59} \lor \neg \left(z \leq 6.5 \cdot 10^{+129}\right)\right):\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -1.22e-47)
         (and (not (<= z 1.36e-14)) (or (<= z 1.3e+59) (not (<= z 6.5e+129)))))
   (+ t (* (/ y z) (- x t)))
   (- x (* (/ y a) (- x t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.22e-47) || (!(z <= 1.36e-14) && ((z <= 1.3e+59) || !(z <= 6.5e+129)))) {
		tmp = t + ((y / z) * (x - t));
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-1.22d-47)) .or. (.not. (z <= 1.36d-14)) .and. (z <= 1.3d+59) .or. (.not. (z <= 6.5d+129))) then
        tmp = t + ((y / z) * (x - t))
    else
        tmp = x - ((y / a) * (x - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.22e-47) || (!(z <= 1.36e-14) && ((z <= 1.3e+59) || !(z <= 6.5e+129)))) {
		tmp = t + ((y / z) * (x - t));
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.22e-47) or (not (z <= 1.36e-14) and ((z <= 1.3e+59) or not (z <= 6.5e+129))):
		tmp = t + ((y / z) * (x - t))
	else:
		tmp = x - ((y / a) * (x - t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1.22e-47) || (!(z <= 1.36e-14) && ((z <= 1.3e+59) || !(z <= 6.5e+129))))
		tmp = Float64(t + Float64(Float64(y / z) * Float64(x - t)));
	else
		tmp = Float64(x - Float64(Float64(y / a) * Float64(x - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -1.22e-47) || (~((z <= 1.36e-14)) && ((z <= 1.3e+59) || ~((z <= 6.5e+129)))))
		tmp = t + ((y / z) * (x - t));
	else
		tmp = x - ((y / a) * (x - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.22e-47], And[N[Not[LessEqual[z, 1.36e-14]], $MachinePrecision], Or[LessEqual[z, 1.3e+59], N[Not[LessEqual[z, 6.5e+129]], $MachinePrecision]]]], N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{-47} \lor \neg \left(z \leq 1.36 \cdot 10^{-14}\right) \land \left(z \leq 1.3 \cdot 10^{+59} \lor \neg \left(z \leq 6.5 \cdot 10^{+129}\right)\right):\\
\;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\

\mathbf{else}:\\
\;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.2199999999999999e-47 or 1.36e-14 < z < 1.3e59 or 6.4999999999999995e129 < z

    1. Initial program 48.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative48.7%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/72.1%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def72.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified72.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 68.0%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative68.0%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*82.4%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--82.4%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg82.4%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac82.4%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*68.0%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative68.0%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--67.2%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg67.2%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--68.0%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative68.0%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*82.4%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified82.4%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in y around inf 64.6%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    8. Step-by-step derivation
      1. associate-/l*75.6%

        \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{t - x}}} \]
      2. associate-/r/74.9%

        \[\leadsto t - \color{blue}{\frac{y}{z} \cdot \left(t - x\right)} \]
    9. Simplified74.9%

      \[\leadsto t - \color{blue}{\frac{y}{z} \cdot \left(t - x\right)} \]

    if -1.2199999999999999e-47 < z < 1.36e-14 or 1.3e59 < z < 6.4999999999999995e129

    1. Initial program 87.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/94.7%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified94.7%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 76.2%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification75.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.22 \cdot 10^{-47} \lor \neg \left(z \leq 1.36 \cdot 10^{-14}\right) \land \left(z \leq 1.3 \cdot 10^{+59} \lor \neg \left(z \leq 6.5 \cdot 10^{+129}\right)\right):\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \]

Alternative 16: 88.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{+131}:\\ \;\;\;\;t + \frac{a - y}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq 6.1 \cdot 10^{+162}:\\ \;\;\;\;x + \frac{y - z}{a - z} \cdot \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{a - y}{\frac{-z}{x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -6.4e+131)
   (+ t (/ (- a y) (/ z (- t x))))
   (if (<= z 6.1e+162)
     (+ x (* (/ (- y z) (- a z)) (- t x)))
     (+ t (/ (- a y) (/ (- z) x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.4e+131) {
		tmp = t + ((a - y) / (z / (t - x)));
	} else if (z <= 6.1e+162) {
		tmp = x + (((y - z) / (a - z)) * (t - x));
	} else {
		tmp = t + ((a - y) / (-z / x));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-6.4d+131)) then
        tmp = t + ((a - y) / (z / (t - x)))
    else if (z <= 6.1d+162) then
        tmp = x + (((y - z) / (a - z)) * (t - x))
    else
        tmp = t + ((a - y) / (-z / x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.4e+131) {
		tmp = t + ((a - y) / (z / (t - x)));
	} else if (z <= 6.1e+162) {
		tmp = x + (((y - z) / (a - z)) * (t - x));
	} else {
		tmp = t + ((a - y) / (-z / x));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -6.4e+131:
		tmp = t + ((a - y) / (z / (t - x)))
	elif z <= 6.1e+162:
		tmp = x + (((y - z) / (a - z)) * (t - x))
	else:
		tmp = t + ((a - y) / (-z / x))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -6.4e+131)
		tmp = Float64(t + Float64(Float64(a - y) / Float64(z / Float64(t - x))));
	elseif (z <= 6.1e+162)
		tmp = Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * Float64(t - x)));
	else
		tmp = Float64(t + Float64(Float64(a - y) / Float64(Float64(-z) / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -6.4e+131)
		tmp = t + ((a - y) / (z / (t - x)));
	elseif (z <= 6.1e+162)
		tmp = x + (((y - z) / (a - z)) * (t - x));
	else
		tmp = t + ((a - y) / (-z / x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.4e+131], N[(t + N[(N[(a - y), $MachinePrecision] / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.1e+162], N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(a - y), $MachinePrecision] / N[((-z) / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{+131}:\\
\;\;\;\;t + \frac{a - y}{\frac{z}{t - x}}\\

\mathbf{elif}\;z \leq 6.1 \cdot 10^{+162}:\\
\;\;\;\;x + \frac{y - z}{a - z} \cdot \left(t - x\right)\\

\mathbf{else}:\\
\;\;\;\;t + \frac{a - y}{\frac{-z}{x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.4000000000000004e131

    1. Initial program 29.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative29.5%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/53.6%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def53.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified53.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 69.1%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative69.1%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*94.3%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--94.3%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg94.3%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac94.3%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*69.1%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative69.1%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--69.1%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg69.1%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--69.1%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative69.1%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*94.3%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified94.3%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]

    if -6.4000000000000004e131 < z < 6.0999999999999998e162

    1. Initial program 79.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/90.9%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified90.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]

    if 6.0999999999999998e162 < z

    1. Initial program 28.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative28.1%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/64.2%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def64.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified64.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 72.8%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative72.8%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*90.9%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--90.9%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg90.9%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac90.9%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*72.8%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative72.8%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--68.5%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg68.5%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--72.8%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative72.8%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*90.9%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified90.9%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 90.9%

      \[\leadsto t - \frac{y - a}{\color{blue}{-1 \cdot \frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-*r/90.9%

        \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-1 \cdot z}{x}}} \]
      2. neg-mul-190.9%

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    9. Simplified90.9%

      \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-z}{x}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{+131}:\\ \;\;\;\;t + \frac{a - y}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq 6.1 \cdot 10^{+162}:\\ \;\;\;\;x + \frac{y - z}{a - z} \cdot \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{a - y}{\frac{-z}{x}}\\ \end{array} \]

Alternative 17: 49.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{z - y}{z}\\ t_2 := x - \frac{t \cdot z}{a}\\ \mathbf{if}\;a \leq -1.26 \cdot 10^{+48}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-120}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 10^{-51}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 3.85 \cdot 10^{+37}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- z y) z))) (t_2 (- x (/ (* t z) a))))
   (if (<= a -1.26e+48)
     t_2
     (if (<= a 8.5e-120)
       t_1
       (if (<= a 1e-51) (* (- y a) (/ x z)) (if (<= a 3.85e+37) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((z - y) / z);
	double t_2 = x - ((t * z) / a);
	double tmp;
	if (a <= -1.26e+48) {
		tmp = t_2;
	} else if (a <= 8.5e-120) {
		tmp = t_1;
	} else if (a <= 1e-51) {
		tmp = (y - a) * (x / z);
	} else if (a <= 3.85e+37) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * ((z - y) / z)
    t_2 = x - ((t * z) / a)
    if (a <= (-1.26d+48)) then
        tmp = t_2
    else if (a <= 8.5d-120) then
        tmp = t_1
    else if (a <= 1d-51) then
        tmp = (y - a) * (x / z)
    else if (a <= 3.85d+37) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((z - y) / z);
	double t_2 = x - ((t * z) / a);
	double tmp;
	if (a <= -1.26e+48) {
		tmp = t_2;
	} else if (a <= 8.5e-120) {
		tmp = t_1;
	} else if (a <= 1e-51) {
		tmp = (y - a) * (x / z);
	} else if (a <= 3.85e+37) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((z - y) / z)
	t_2 = x - ((t * z) / a)
	tmp = 0
	if a <= -1.26e+48:
		tmp = t_2
	elif a <= 8.5e-120:
		tmp = t_1
	elif a <= 1e-51:
		tmp = (y - a) * (x / z)
	elif a <= 3.85e+37:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(z - y) / z))
	t_2 = Float64(x - Float64(Float64(t * z) / a))
	tmp = 0.0
	if (a <= -1.26e+48)
		tmp = t_2;
	elseif (a <= 8.5e-120)
		tmp = t_1;
	elseif (a <= 1e-51)
		tmp = Float64(Float64(y - a) * Float64(x / z));
	elseif (a <= 3.85e+37)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((z - y) / z);
	t_2 = x - ((t * z) / a);
	tmp = 0.0;
	if (a <= -1.26e+48)
		tmp = t_2;
	elseif (a <= 8.5e-120)
		tmp = t_1;
	elseif (a <= 1e-51)
		tmp = (y - a) * (x / z);
	elseif (a <= 3.85e+37)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(t * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.26e+48], t$95$2, If[LessEqual[a, 8.5e-120], t$95$1, If[LessEqual[a, 1e-51], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.85e+37], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{z - y}{z}\\
t_2 := x - \frac{t \cdot z}{a}\\
\mathbf{if}\;a \leq -1.26 \cdot 10^{+48}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 8.5 \cdot 10^{-120}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 10^{-51}:\\
\;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\

\mathbf{elif}\;a \leq 3.85 \cdot 10^{+37}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.26000000000000001e48 or 3.85000000000000011e37 < a

    1. Initial program 70.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative70.5%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/89.5%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def89.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified89.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in y around 0 54.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{\left(t - x\right) \cdot z}{a - z} + x} \]
    5. Step-by-step derivation
      1. +-commutative54.7%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(t - x\right) \cdot z}{a - z}} \]
      2. *-commutative54.7%

        \[\leadsto x + -1 \cdot \frac{\color{blue}{z \cdot \left(t - x\right)}}{a - z} \]
      3. mul-1-neg54.7%

        \[\leadsto x + \color{blue}{\left(-\frac{z \cdot \left(t - x\right)}{a - z}\right)} \]
      4. associate-*r/62.6%

        \[\leadsto x + \left(-\color{blue}{z \cdot \frac{t - x}{a - z}}\right) \]
      5. unsub-neg62.6%

        \[\leadsto \color{blue}{x - z \cdot \frac{t - x}{a - z}} \]
    6. Simplified62.6%

      \[\leadsto \color{blue}{x - z \cdot \frac{t - x}{a - z}} \]
    7. Taylor expanded in a around inf 50.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{\left(t - x\right) \cdot z}{a} + x} \]
    8. Step-by-step derivation
      1. +-commutative50.2%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(t - x\right) \cdot z}{a}} \]
      2. *-commutative50.2%

        \[\leadsto x + -1 \cdot \frac{\color{blue}{z \cdot \left(t - x\right)}}{a} \]
      3. mul-1-neg50.2%

        \[\leadsto x + \color{blue}{\left(-\frac{z \cdot \left(t - x\right)}{a}\right)} \]
      4. unsub-neg50.2%

        \[\leadsto \color{blue}{x - \frac{z \cdot \left(t - x\right)}{a}} \]
      5. *-commutative50.2%

        \[\leadsto x - \frac{\color{blue}{\left(t - x\right) \cdot z}}{a} \]
      6. associate-/l*57.9%

        \[\leadsto x - \color{blue}{\frac{t - x}{\frac{a}{z}}} \]
    9. Simplified57.9%

      \[\leadsto \color{blue}{x - \frac{t - x}{\frac{a}{z}}} \]
    10. Taylor expanded in t around inf 57.6%

      \[\leadsto x - \color{blue}{\frac{t \cdot z}{a}} \]

    if -1.26000000000000001e48 < a < 8.50000000000000059e-120 or 1e-51 < a < 3.85000000000000011e37

    1. Initial program 67.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative67.1%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/81.4%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def81.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified81.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in t around inf 59.5%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    5. Step-by-step derivation
      1. div-sub59.5%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    6. Simplified59.5%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Taylor expanded in a around 0 50.4%

      \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \frac{y - z}{z}\right)} \]
    8. Step-by-step derivation
      1. associate-*r/50.4%

        \[\leadsto t \cdot \color{blue}{\frac{-1 \cdot \left(y - z\right)}{z}} \]
      2. neg-mul-150.4%

        \[\leadsto t \cdot \frac{\color{blue}{-\left(y - z\right)}}{z} \]
    9. Simplified50.4%

      \[\leadsto t \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]

    if 8.50000000000000059e-120 < a < 1e-51

    1. Initial program 59.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative59.2%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/65.3%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def65.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified65.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 54.4%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative54.4%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*64.0%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--64.0%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg64.0%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac64.0%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*54.4%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative54.4%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--54.4%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg54.4%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--54.4%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative54.4%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*64.0%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified64.0%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 44.4%

      \[\leadsto \color{blue}{\frac{\left(y - a\right) \cdot x}{z}} \]
    8. Taylor expanded in y around 0 44.4%

      \[\leadsto \color{blue}{\frac{y \cdot x}{z} + -1 \cdot \frac{a \cdot x}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*54.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} + -1 \cdot \frac{a \cdot x}{z} \]
      2. mul-1-neg54.2%

        \[\leadsto \frac{y}{\frac{z}{x}} + \color{blue}{\left(-\frac{a \cdot x}{z}\right)} \]
      3. associate-/l*54.0%

        \[\leadsto \frac{y}{\frac{z}{x}} + \left(-\color{blue}{\frac{a}{\frac{z}{x}}}\right) \]
      4. sub-neg54.0%

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}} - \frac{a}{\frac{z}{x}}} \]
      5. div-sub54.0%

        \[\leadsto \color{blue}{\frac{y - a}{\frac{z}{x}}} \]
      6. associate-/r/54.2%

        \[\leadsto \color{blue}{\frac{y - a}{z} \cdot x} \]
      7. *-commutative54.2%

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
      8. associate-*r/44.4%

        \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
      9. *-commutative44.4%

        \[\leadsto \frac{\color{blue}{\left(y - a\right) \cdot x}}{z} \]
      10. associate-*r/54.2%

        \[\leadsto \color{blue}{\left(y - a\right) \cdot \frac{x}{z}} \]
    10. Simplified54.2%

      \[\leadsto \color{blue}{\left(y - a\right) \cdot \frac{x}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.26 \cdot 10^{+48}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-120}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 10^{-51}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 3.85 \cdot 10^{+37}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t \cdot z}{a}\\ \end{array} \]

Alternative 18: 75.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.5 \lor \neg \left(z \leq 9.6 \cdot 10^{+129}\right):\\ \;\;\;\;t + \frac{a - y}{\frac{-z}{x}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a - z} \cdot \left(x - t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -0.5) (not (<= z 9.6e+129)))
   (+ t (/ (- a y) (/ (- z) x)))
   (- x (* (/ y (- a z)) (- x t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -0.5) || !(z <= 9.6e+129)) {
		tmp = t + ((a - y) / (-z / x));
	} else {
		tmp = x - ((y / (a - z)) * (x - t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-0.5d0)) .or. (.not. (z <= 9.6d+129))) then
        tmp = t + ((a - y) / (-z / x))
    else
        tmp = x - ((y / (a - z)) * (x - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -0.5) || !(z <= 9.6e+129)) {
		tmp = t + ((a - y) / (-z / x));
	} else {
		tmp = x - ((y / (a - z)) * (x - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -0.5) or not (z <= 9.6e+129):
		tmp = t + ((a - y) / (-z / x))
	else:
		tmp = x - ((y / (a - z)) * (x - t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -0.5) || !(z <= 9.6e+129))
		tmp = Float64(t + Float64(Float64(a - y) / Float64(Float64(-z) / x)));
	else
		tmp = Float64(x - Float64(Float64(y / Float64(a - z)) * Float64(x - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -0.5) || ~((z <= 9.6e+129)))
		tmp = t + ((a - y) / (-z / x));
	else
		tmp = x - ((y / (a - z)) * (x - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -0.5], N[Not[LessEqual[z, 9.6e+129]], $MachinePrecision]], N[(t + N[(N[(a - y), $MachinePrecision] / N[((-z) / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.5 \lor \neg \left(z \leq 9.6 \cdot 10^{+129}\right):\\
\;\;\;\;t + \frac{a - y}{\frac{-z}{x}}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{y}{a - z} \cdot \left(x - t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.5 or 9.5999999999999995e129 < z

    1. Initial program 39.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative39.3%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/68.0%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def68.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified68.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 67.0%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative67.0%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*84.4%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--84.4%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg84.4%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac84.4%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*67.0%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative67.0%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--66.0%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg66.0%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--67.0%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative67.0%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*84.4%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified84.4%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 80.0%

      \[\leadsto t - \frac{y - a}{\color{blue}{-1 \cdot \frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-*r/80.0%

        \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-1 \cdot z}{x}}} \]
      2. neg-mul-180.0%

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    9. Simplified80.0%

      \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-z}{x}}} \]

    if -0.5 < z < 9.5999999999999995e129

    1. Initial program 86.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/93.4%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified93.4%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Step-by-step derivation
      1. clear-num93.4%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \cdot \left(t - x\right) \]
      2. associate-/r/93.4%

        \[\leadsto x + \color{blue}{\left(\frac{1}{a - z} \cdot \left(y - z\right)\right)} \cdot \left(t - x\right) \]
    5. Applied egg-rr93.4%

      \[\leadsto x + \color{blue}{\left(\frac{1}{a - z} \cdot \left(y - z\right)\right)} \cdot \left(t - x\right) \]
    6. Taylor expanded in y around inf 85.3%

      \[\leadsto x + \color{blue}{\frac{y}{a - z}} \cdot \left(t - x\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification83.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.5 \lor \neg \left(z \leq 9.6 \cdot 10^{+129}\right):\\ \;\;\;\;t + \frac{a - y}{\frac{-z}{x}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a - z} \cdot \left(x - t\right)\\ \end{array} \]

Alternative 19: 78.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.08 \cdot 10^{-23} \lor \neg \left(z \leq 8.5 \cdot 10^{+129}\right):\\ \;\;\;\;t + \frac{a - y}{\frac{z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a - z} \cdot \left(x - t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -1.08e-23) (not (<= z 8.5e+129)))
   (+ t (/ (- a y) (/ z (- t x))))
   (- x (* (/ y (- a z)) (- x t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.08e-23) || !(z <= 8.5e+129)) {
		tmp = t + ((a - y) / (z / (t - x)));
	} else {
		tmp = x - ((y / (a - z)) * (x - t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-1.08d-23)) .or. (.not. (z <= 8.5d+129))) then
        tmp = t + ((a - y) / (z / (t - x)))
    else
        tmp = x - ((y / (a - z)) * (x - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.08e-23) || !(z <= 8.5e+129)) {
		tmp = t + ((a - y) / (z / (t - x)));
	} else {
		tmp = x - ((y / (a - z)) * (x - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.08e-23) or not (z <= 8.5e+129):
		tmp = t + ((a - y) / (z / (t - x)))
	else:
		tmp = x - ((y / (a - z)) * (x - t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1.08e-23) || !(z <= 8.5e+129))
		tmp = Float64(t + Float64(Float64(a - y) / Float64(z / Float64(t - x))));
	else
		tmp = Float64(x - Float64(Float64(y / Float64(a - z)) * Float64(x - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -1.08e-23) || ~((z <= 8.5e+129)))
		tmp = t + ((a - y) / (z / (t - x)));
	else
		tmp = x - ((y / (a - z)) * (x - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.08e-23], N[Not[LessEqual[z, 8.5e+129]], $MachinePrecision]], N[(t + N[(N[(a - y), $MachinePrecision] / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.08 \cdot 10^{-23} \lor \neg \left(z \leq 8.5 \cdot 10^{+129}\right):\\
\;\;\;\;t + \frac{a - y}{\frac{z}{t - x}}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{y}{a - z} \cdot \left(x - t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.08000000000000003e-23 or 8.5000000000000001e129 < z

    1. Initial program 39.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative39.9%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/68.3%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def68.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified68.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 67.4%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative67.4%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*84.5%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--84.5%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg84.5%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac84.5%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*67.4%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative67.4%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--66.3%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg66.3%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--67.4%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative67.4%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*84.5%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified84.5%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]

    if -1.08000000000000003e-23 < z < 8.5000000000000001e129

    1. Initial program 86.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/93.4%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified93.4%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Step-by-step derivation
      1. clear-num93.4%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \cdot \left(t - x\right) \]
      2. associate-/r/93.3%

        \[\leadsto x + \color{blue}{\left(\frac{1}{a - z} \cdot \left(y - z\right)\right)} \cdot \left(t - x\right) \]
    5. Applied egg-rr93.3%

      \[\leadsto x + \color{blue}{\left(\frac{1}{a - z} \cdot \left(y - z\right)\right)} \cdot \left(t - x\right) \]
    6. Taylor expanded in y around inf 85.6%

      \[\leadsto x + \color{blue}{\frac{y}{a - z}} \cdot \left(t - x\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification85.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.08 \cdot 10^{-23} \lor \neg \left(z \leq 8.5 \cdot 10^{+129}\right):\\ \;\;\;\;t + \frac{a - y}{\frac{z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a - z} \cdot \left(x - t\right)\\ \end{array} \]

Alternative 20: 35.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{+123}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-59}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-176}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-51}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;a \leq 3.85 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1e+123)
   x
   (if (<= a -6e-59)
     (* t (/ (- y z) a))
     (if (<= a -1.65e-176)
       t
       (if (<= a 2.8e-51) (/ (* y x) z) (if (<= a 3.85e+37) t x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1e+123) {
		tmp = x;
	} else if (a <= -6e-59) {
		tmp = t * ((y - z) / a);
	} else if (a <= -1.65e-176) {
		tmp = t;
	} else if (a <= 2.8e-51) {
		tmp = (y * x) / z;
	} else if (a <= 3.85e+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 <= (-1d+123)) then
        tmp = x
    else if (a <= (-6d-59)) then
        tmp = t * ((y - z) / a)
    else if (a <= (-1.65d-176)) then
        tmp = t
    else if (a <= 2.8d-51) then
        tmp = (y * x) / z
    else if (a <= 3.85d+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 <= -1e+123) {
		tmp = x;
	} else if (a <= -6e-59) {
		tmp = t * ((y - z) / a);
	} else if (a <= -1.65e-176) {
		tmp = t;
	} else if (a <= 2.8e-51) {
		tmp = (y * x) / z;
	} else if (a <= 3.85e+37) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1e+123:
		tmp = x
	elif a <= -6e-59:
		tmp = t * ((y - z) / a)
	elif a <= -1.65e-176:
		tmp = t
	elif a <= 2.8e-51:
		tmp = (y * x) / z
	elif a <= 3.85e+37:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1e+123)
		tmp = x;
	elseif (a <= -6e-59)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (a <= -1.65e-176)
		tmp = t;
	elseif (a <= 2.8e-51)
		tmp = Float64(Float64(y * x) / z);
	elseif (a <= 3.85e+37)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1e+123)
		tmp = x;
	elseif (a <= -6e-59)
		tmp = t * ((y - z) / a);
	elseif (a <= -1.65e-176)
		tmp = t;
	elseif (a <= 2.8e-51)
		tmp = (y * x) / z;
	elseif (a <= 3.85e+37)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1e+123], x, If[LessEqual[a, -6e-59], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.65e-176], t, If[LessEqual[a, 2.8e-51], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 3.85e+37], t, x]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+123}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -6 \cdot 10^{-59}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\

\mathbf{elif}\;a \leq -1.65 \cdot 10^{-176}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 2.8 \cdot 10^{-51}:\\
\;\;\;\;\frac{y \cdot x}{z}\\

\mathbf{elif}\;a \leq 3.85 \cdot 10^{+37}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -9.99999999999999978e122 or 3.85000000000000011e37 < a

    1. Initial program 68.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative68.6%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/89.3%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def89.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified89.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in a around inf 56.3%

      \[\leadsto \color{blue}{x} \]

    if -9.99999999999999978e122 < a < -6.0000000000000002e-59

    1. Initial program 73.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative73.2%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/88.2%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def88.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified88.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in t around inf 58.6%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    5. Step-by-step derivation
      1. div-sub58.6%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    6. Simplified58.6%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Taylor expanded in a around inf 43.1%

      \[\leadsto t \cdot \color{blue}{\frac{y - z}{a}} \]

    if -6.0000000000000002e-59 < a < -1.65000000000000006e-176 or 2.8e-51 < a < 3.85000000000000011e37

    1. Initial program 68.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative68.8%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/84.3%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def84.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified84.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 39.7%

      \[\leadsto \color{blue}{t} \]

    if -1.65000000000000006e-176 < a < 2.8e-51

    1. Initial program 64.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative64.5%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/75.3%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def75.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified75.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 78.5%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative78.5%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*81.3%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--81.3%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg81.3%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac81.3%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*78.5%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative78.5%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--78.5%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg78.5%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--78.5%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative78.5%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*81.3%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified81.3%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 43.7%

      \[\leadsto \color{blue}{\frac{\left(y - a\right) \cdot x}{z}} \]
    8. Taylor expanded in y around inf 40.5%

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification46.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{+123}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-59}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-176}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-51}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;a \leq 3.85 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 21: 54.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{-5}:\\ \;\;\;\;\frac{-y}{\frac{a - z}{x}}\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{+48}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -2.9e-5)
   (/ (- y) (/ (- a z) x))
   (if (<= x 1.5e+48) (* t (/ (- y z) (- a z))) (* (- y a) (/ x z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -2.9e-5) {
		tmp = -y / ((a - z) / x);
	} else if (x <= 1.5e+48) {
		tmp = t * ((y - z) / (a - z));
	} else {
		tmp = (y - a) * (x / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (x <= (-2.9d-5)) then
        tmp = -y / ((a - z) / x)
    else if (x <= 1.5d+48) then
        tmp = t * ((y - z) / (a - z))
    else
        tmp = (y - a) * (x / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -2.9e-5) {
		tmp = -y / ((a - z) / x);
	} else if (x <= 1.5e+48) {
		tmp = t * ((y - z) / (a - z));
	} else {
		tmp = (y - a) * (x / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -2.9e-5:
		tmp = -y / ((a - z) / x)
	elif x <= 1.5e+48:
		tmp = t * ((y - z) / (a - z))
	else:
		tmp = (y - a) * (x / z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -2.9e-5)
		tmp = Float64(Float64(-y) / Float64(Float64(a - z) / x));
	elseif (x <= 1.5e+48)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	else
		tmp = Float64(Float64(y - a) * Float64(x / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (x <= -2.9e-5)
		tmp = -y / ((a - z) / x);
	elseif (x <= 1.5e+48)
		tmp = t * ((y - z) / (a - z));
	else
		tmp = (y - a) * (x / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.9e-5], N[((-y) / N[(N[(a - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.5e+48], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{-5}:\\
\;\;\;\;\frac{-y}{\frac{a - z}{x}}\\

\mathbf{elif}\;x \leq 1.5 \cdot 10^{+48}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

\mathbf{else}:\\
\;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.9e-5

    1. Initial program 58.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative58.2%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/80.2%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def80.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified80.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in y around -inf 46.2%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    5. Taylor expanded in t around 0 41.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot x}{a - z}} \]
    6. Step-by-step derivation
      1. mul-1-neg41.7%

        \[\leadsto \color{blue}{-\frac{y \cdot x}{a - z}} \]
      2. associate-/l*47.7%

        \[\leadsto -\color{blue}{\frac{y}{\frac{a - z}{x}}} \]
      3. distribute-neg-frac47.7%

        \[\leadsto \color{blue}{\frac{-y}{\frac{a - z}{x}}} \]
    7. Simplified47.7%

      \[\leadsto \color{blue}{\frac{-y}{\frac{a - z}{x}}} \]

    if -2.9e-5 < x < 1.5e48

    1. Initial program 79.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative79.2%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/90.3%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def90.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified90.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in t around inf 66.2%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    5. Step-by-step derivation
      1. div-sub66.2%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    6. Simplified66.2%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if 1.5e48 < x

    1. Initial program 51.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative51.6%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/70.4%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def70.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified70.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 45.5%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative45.5%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*60.2%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--60.2%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg60.2%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac60.2%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*45.5%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative45.5%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--45.4%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg45.4%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--45.5%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative45.5%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*60.2%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified60.2%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 35.6%

      \[\leadsto \color{blue}{\frac{\left(y - a\right) \cdot x}{z}} \]
    8. Taylor expanded in y around 0 35.4%

      \[\leadsto \color{blue}{\frac{y \cdot x}{z} + -1 \cdot \frac{a \cdot x}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*41.8%

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} + -1 \cdot \frac{a \cdot x}{z} \]
      2. mul-1-neg41.8%

        \[\leadsto \frac{y}{\frac{z}{x}} + \color{blue}{\left(-\frac{a \cdot x}{z}\right)} \]
      3. associate-/l*41.7%

        \[\leadsto \frac{y}{\frac{z}{x}} + \left(-\color{blue}{\frac{a}{\frac{z}{x}}}\right) \]
      4. sub-neg41.7%

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}} - \frac{a}{\frac{z}{x}}} \]
      5. div-sub43.7%

        \[\leadsto \color{blue}{\frac{y - a}{\frac{z}{x}}} \]
      6. associate-/r/42.1%

        \[\leadsto \color{blue}{\frac{y - a}{z} \cdot x} \]
      7. *-commutative42.1%

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
      8. associate-*r/35.6%

        \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
      9. *-commutative35.6%

        \[\leadsto \frac{\color{blue}{\left(y - a\right) \cdot x}}{z} \]
      10. associate-*r/43.8%

        \[\leadsto \color{blue}{\left(y - a\right) \cdot \frac{x}{z}} \]
    10. Simplified43.8%

      \[\leadsto \color{blue}{\left(y - a\right) \cdot \frac{x}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification56.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{-5}:\\ \;\;\;\;\frac{-y}{\frac{a - z}{x}}\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{+48}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \end{array} \]

Alternative 22: 35.4% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.9 \cdot 10^{+49}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-176}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-52}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -3.9e+49)
   x
   (if (<= a -8.6e-176)
     t
     (if (<= a 5.4e-52) (/ (* y x) z) (if (<= a 1.5e+38) t x)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.9e+49) {
		tmp = x;
	} else if (a <= -8.6e-176) {
		tmp = t;
	} else if (a <= 5.4e-52) {
		tmp = (y * x) / z;
	} else if (a <= 1.5e+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 <= (-3.9d+49)) then
        tmp = x
    else if (a <= (-8.6d-176)) then
        tmp = t
    else if (a <= 5.4d-52) then
        tmp = (y * x) / z
    else if (a <= 1.5d+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 <= -3.9e+49) {
		tmp = x;
	} else if (a <= -8.6e-176) {
		tmp = t;
	} else if (a <= 5.4e-52) {
		tmp = (y * x) / z;
	} else if (a <= 1.5e+38) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -3.9e+49:
		tmp = x
	elif a <= -8.6e-176:
		tmp = t
	elif a <= 5.4e-52:
		tmp = (y * x) / z
	elif a <= 1.5e+38:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -3.9e+49)
		tmp = x;
	elseif (a <= -8.6e-176)
		tmp = t;
	elseif (a <= 5.4e-52)
		tmp = Float64(Float64(y * x) / z);
	elseif (a <= 1.5e+38)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -3.9e+49)
		tmp = x;
	elseif (a <= -8.6e-176)
		tmp = t;
	elseif (a <= 5.4e-52)
		tmp = (y * x) / z;
	elseif (a <= 1.5e+38)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.9e+49], x, If[LessEqual[a, -8.6e-176], t, If[LessEqual[a, 5.4e-52], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.5e+38], t, x]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.9 \cdot 10^{+49}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -8.6 \cdot 10^{-176}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 5.4 \cdot 10^{-52}:\\
\;\;\;\;\frac{y \cdot x}{z}\\

\mathbf{elif}\;a \leq 1.5 \cdot 10^{+38}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.9000000000000001e49 or 1.5000000000000001e38 < a

    1. Initial program 70.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative70.5%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/89.5%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def89.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified89.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in a around inf 51.4%

      \[\leadsto \color{blue}{x} \]

    if -3.9000000000000001e49 < a < -8.60000000000000025e-176 or 5.40000000000000019e-52 < a < 1.5000000000000001e38

    1. Initial program 68.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative68.1%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/84.7%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def84.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified84.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 37.2%

      \[\leadsto \color{blue}{t} \]

    if -8.60000000000000025e-176 < a < 5.40000000000000019e-52

    1. Initial program 64.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative64.5%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/75.3%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def75.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified75.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 78.5%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative78.5%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*81.3%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--81.3%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg81.3%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac81.3%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*78.5%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative78.5%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--78.5%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg78.5%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--78.5%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative78.5%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*81.3%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified81.3%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 43.7%

      \[\leadsto \color{blue}{\frac{\left(y - a\right) \cdot x}{z}} \]
    8. Taylor expanded in y around inf 40.5%

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.9 \cdot 10^{+49}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-176}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-52}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 23: 35.7% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{-32}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-202}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+129}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.2e-32)
   t
   (if (<= z -1.8e-202) (* t (/ y a)) (if (<= z 7e+129) x t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.2e-32) {
		tmp = t;
	} else if (z <= -1.8e-202) {
		tmp = t * (y / a);
	} else if (z <= 7e+129) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-3.2d-32)) then
        tmp = t
    else if (z <= (-1.8d-202)) then
        tmp = t * (y / a)
    else if (z <= 7d+129) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.2e-32) {
		tmp = t;
	} else if (z <= -1.8e-202) {
		tmp = t * (y / a);
	} else if (z <= 7e+129) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.2e-32:
		tmp = t
	elif z <= -1.8e-202:
		tmp = t * (y / a)
	elif z <= 7e+129:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.2e-32)
		tmp = t;
	elseif (z <= -1.8e-202)
		tmp = Float64(t * Float64(y / a));
	elseif (z <= 7e+129)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.2e-32)
		tmp = t;
	elseif (z <= -1.8e-202)
		tmp = t * (y / a);
	elseif (z <= 7e+129)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e-32], t, If[LessEqual[z, -1.8e-202], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+129], x, t]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{-32}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -1.8 \cdot 10^{-202}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq 7 \cdot 10^{+129}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.2000000000000002e-32 or 6.9999999999999997e129 < z

    1. Initial program 41.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative41.6%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/69.2%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def69.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified69.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 48.5%

      \[\leadsto \color{blue}{t} \]

    if -3.2000000000000002e-32 < z < -1.8000000000000001e-202

    1. Initial program 91.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative91.0%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/97.3%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def97.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified97.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in t around inf 59.5%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    5. Step-by-step derivation
      1. div-sub59.5%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    6. Simplified59.5%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Taylor expanded in z around 0 40.8%

      \[\leadsto t \cdot \color{blue}{\frac{y}{a}} \]

    if -1.8000000000000001e-202 < z < 6.9999999999999997e129

    1. Initial program 85.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative85.1%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/92.2%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def92.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified92.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in a around inf 39.0%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{-32}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-202}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+129}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 24: 35.1% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -4.6 \cdot 10^{+82}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-48}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -4.6e+82)
   x
   (if (<= a 3.2e-48) (* x (/ y z)) (if (<= a 3.3e+37) t x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -4.6e+82) {
		tmp = x;
	} else if (a <= 3.2e-48) {
		tmp = x * (y / z);
	} else if (a <= 3.3e+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 <= (-4.6d+82)) then
        tmp = x
    else if (a <= 3.2d-48) then
        tmp = x * (y / z)
    else if (a <= 3.3d+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 <= -4.6e+82) {
		tmp = x;
	} else if (a <= 3.2e-48) {
		tmp = x * (y / z);
	} else if (a <= 3.3e+37) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -4.6e+82:
		tmp = x
	elif a <= 3.2e-48:
		tmp = x * (y / z)
	elif a <= 3.3e+37:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -4.6e+82)
		tmp = x;
	elseif (a <= 3.2e-48)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= 3.3e+37)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -4.6e+82)
		tmp = x;
	elseif (a <= 3.2e-48)
		tmp = x * (y / z);
	elseif (a <= 3.3e+37)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.6e+82], x, If[LessEqual[a, 3.2e-48], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.3e+37], t, x]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.6 \cdot 10^{+82}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.2 \cdot 10^{-48}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

\mathbf{elif}\;a \leq 3.3 \cdot 10^{+37}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.59999999999999976e82 or 3.3000000000000001e37 < a

    1. Initial program 70.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative70.7%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/89.9%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def89.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified89.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in a around inf 53.9%

      \[\leadsto \color{blue}{x} \]

    if -4.59999999999999976e82 < a < 3.1999999999999998e-48

    1. Initial program 65.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative65.7%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/79.2%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def79.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified79.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 71.3%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative71.3%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*77.1%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--77.1%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg77.1%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac77.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*71.3%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative71.3%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--70.6%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg70.6%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--71.3%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative71.3%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*77.1%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified77.1%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 34.6%

      \[\leadsto \color{blue}{\frac{\left(y - a\right) \cdot x}{z}} \]
    8. Taylor expanded in y around inf 31.8%

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*35.1%

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
      2. associate-/r/34.3%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    10. Simplified34.3%

      \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]

    if 3.1999999999999998e-48 < a < 3.3000000000000001e37

    1. Initial program 69.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative69.5%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/82.4%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def82.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified82.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 40.6%

      \[\leadsto \color{blue}{t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification41.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.6 \cdot 10^{+82}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-48}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 25: 36.7% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.75 \cdot 10^{+93}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+129}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.75e+93) t (if (<= z 6.5e+129) x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.75e+93) {
		tmp = t;
	} else if (z <= 6.5e+129) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-3.75d+93)) then
        tmp = t
    else if (z <= 6.5d+129) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.75e+93) {
		tmp = t;
	} else if (z <= 6.5e+129) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.75e+93:
		tmp = t
	elif z <= 6.5e+129:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.75e+93)
		tmp = t;
	elseif (z <= 6.5e+129)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.75e+93)
		tmp = t;
	elseif (z <= 6.5e+129)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.75e+93], t, If[LessEqual[z, 6.5e+129], x, t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.75 \cdot 10^{+93}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+129}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.7500000000000001e93 or 6.4999999999999995e129 < z

    1. Initial program 32.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative32.7%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/66.2%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def66.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified66.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 57.6%

      \[\leadsto \color{blue}{t} \]

    if -3.7500000000000001e93 < z < 6.4999999999999995e129

    1. Initial program 84.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative84.3%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/91.4%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def91.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified91.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in a around inf 33.3%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.75 \cdot 10^{+93}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+129}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 26: 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 67.8%

    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
  2. Step-by-step derivation
    1. +-commutative67.8%

      \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
    2. associate-*l/83.3%

      \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
    3. fma-def83.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
  3. Simplified83.3%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
  4. Taylor expanded in z around inf 24.6%

    \[\leadsto \color{blue}{t} \]
  5. Final simplification24.6%

    \[\leadsto t \]

Developer target: 83.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- t (* (/ y z) (- t x)))))
   (if (< z -1.2536131056095036e+188)
     t_1
     (if (< z 4.446702369113811e+64)
       (+ x (/ (- y z) (/ (- a z) (- t x))))
       t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t - ((y / z) * (t - x))
    if (z < (-1.2536131056095036d+188)) then
        tmp = t_1
    else if (z < 4.446702369113811d+64) then
        tmp = x + ((y - z) / ((a - z) / (t - x)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t - ((y / z) * (t - x))
	tmp = 0
	if z < -1.2536131056095036e+188:
		tmp = t_1
	elif z < 4.446702369113811e+64:
		tmp = x + ((y - z) / ((a - z) / (t - x)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x)))
	tmp = 0.0
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t - ((y / z) * (t - x));
	tmp = 0.0;
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023240 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

  (+ x (/ (* (- y z) (- t x)) (- a z))))