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

Percentage Accurate: 68.3% → 88.9%
Time: 14.4s
Alternatives: 21
Speedup: 0.7×

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 21 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 68.3% accurate, 1.0× speedup?

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

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

Alternative 1: 88.9% accurate, 0.1× speedup?

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

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

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

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


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

    1. Initial program 57.2%

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

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

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

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

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

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

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

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

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

    if -2.3500000000000001e73 < t < 1.6e25

    1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6e25 < t

    1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.7% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 70.8%

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

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

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

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

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

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

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

    1. Initial program 3.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 91.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{x - t}{z - a}\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(x - t\right)}{z - a}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-289}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t - x \cdot \frac{a - y}{z}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+287}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- x t) (- z a)))))
        (t_2 (+ x (/ (* (- y z) (- x t)) (- z a)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -1e-289)
       t_2
       (if (<= t_2 0.0)
         (- t (* x (/ (- a y) z)))
         (if (<= t_2 5e+287) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((x - t) / (z - a)));
	double t_2 = x + (((y - z) * (x - t)) / (z - a));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -1e-289) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t - (x * ((a - y) / z));
	} else if (t_2 <= 5e+287) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((x - t) / (z - a)));
	double t_2 = x + (((y - z) * (x - t)) / (z - a));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -1e-289) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t - (x * ((a - y) / z));
	} else if (t_2 <= 5e+287) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) * ((x - t) / (z - a)))
	t_2 = x + (((y - z) * (x - t)) / (z - a))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -1e-289:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = t - (x * ((a - y) / z))
	elif t_2 <= 5e+287:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(x - t) / Float64(z - a))))
	t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(x - t)) / Float64(z - a)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -1e-289)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(t - Float64(x * Float64(Float64(a - y) / z)));
	elseif (t_2 <= 5e+287)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) * ((x - t) / (z - a)));
	t_2 = x + (((y - z) * (x - t)) / (z - a));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -1e-289)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = t - (x * ((a - y) / z));
	elseif (t_2 <= 5e+287)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-289], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t - N[(x * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+287], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-289}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t - x \cdot \frac{a - y}{z}\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+287}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 38.7%

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1e-289 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5e287

    1. Initial program 96.0%

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

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

    1. Initial program 3.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(x - t\right)}{z - a} \leq -\infty:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{x - t}{z - a}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(x - t\right)}{z - a} \leq -1 \cdot 10^{-289}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(x - t\right)}{z - a}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(x - t\right)}{z - a} \leq 0:\\ \;\;\;\;t - x \cdot \frac{a - y}{z}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(x - t\right)}{z - a} \leq 5 \cdot 10^{+287}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(x - t\right)}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{x - t}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 90.7% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 43.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -3.5 \cdot 10^{+69}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-120}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-190}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-107}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-6}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ z (- z a)))))
   (if (<= z -3.5e+69)
     t_1
     (if (<= z -1.05e+28)
       x
       (if (<= z -8.2e-120)
         (* x (/ y z))
         (if (<= z -1.75e-190)
           x
           (if (<= z 9e-107)
             (/ (* y (- t x)) a)
             (if (<= z 8.5e-6) x t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (z / (z - a));
	double tmp;
	if (z <= -3.5e+69) {
		tmp = t_1;
	} else if (z <= -1.05e+28) {
		tmp = x;
	} else if (z <= -8.2e-120) {
		tmp = x * (y / z);
	} else if (z <= -1.75e-190) {
		tmp = x;
	} else if (z <= 9e-107) {
		tmp = (y * (t - x)) / a;
	} else if (z <= 8.5e-6) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (z / (z - a))
    if (z <= (-3.5d+69)) then
        tmp = t_1
    else if (z <= (-1.05d+28)) then
        tmp = x
    else if (z <= (-8.2d-120)) then
        tmp = x * (y / z)
    else if (z <= (-1.75d-190)) then
        tmp = x
    else if (z <= 9d-107) then
        tmp = (y * (t - x)) / a
    else if (z <= 8.5d-6) then
        tmp = x
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (z / (z - a));
	double tmp;
	if (z <= -3.5e+69) {
		tmp = t_1;
	} else if (z <= -1.05e+28) {
		tmp = x;
	} else if (z <= -8.2e-120) {
		tmp = x * (y / z);
	} else if (z <= -1.75e-190) {
		tmp = x;
	} else if (z <= 9e-107) {
		tmp = (y * (t - x)) / a;
	} else if (z <= 8.5e-6) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (z / (z - a))
	tmp = 0
	if z <= -3.5e+69:
		tmp = t_1
	elif z <= -1.05e+28:
		tmp = x
	elif z <= -8.2e-120:
		tmp = x * (y / z)
	elif z <= -1.75e-190:
		tmp = x
	elif z <= 9e-107:
		tmp = (y * (t - x)) / a
	elif z <= 8.5e-6:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(z / Float64(z - a)))
	tmp = 0.0
	if (z <= -3.5e+69)
		tmp = t_1;
	elseif (z <= -1.05e+28)
		tmp = x;
	elseif (z <= -8.2e-120)
		tmp = Float64(x * Float64(y / z));
	elseif (z <= -1.75e-190)
		tmp = x;
	elseif (z <= 9e-107)
		tmp = Float64(Float64(y * Float64(t - x)) / a);
	elseif (z <= 8.5e-6)
		tmp = x;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (z / (z - a));
	tmp = 0.0;
	if (z <= -3.5e+69)
		tmp = t_1;
	elseif (z <= -1.05e+28)
		tmp = x;
	elseif (z <= -8.2e-120)
		tmp = x * (y / z);
	elseif (z <= -1.75e-190)
		tmp = x;
	elseif (z <= 9e-107)
		tmp = (y * (t - x)) / a;
	elseif (z <= 8.5e-6)
		tmp = x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+69], t$95$1, If[LessEqual[z, -1.05e+28], x, If[LessEqual[z, -8.2e-120], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.75e-190], x, If[LessEqual[z, 9e-107], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 8.5e-6], x, t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.05 \cdot 10^{+28}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq -1.75 \cdot 10^{-190}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 8.5 \cdot 10^{-6}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.49999999999999987e69 or 8.4999999999999999e-6 < z

    1. Initial program 40.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{z}{a - z}} \]
      3. distribute-lft-neg-in51.7%

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

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

    if -3.49999999999999987e69 < z < -1.04999999999999995e28 or -8.20000000000000068e-120 < z < -1.75e-190 or 9.00000000000000032e-107 < z < 8.4999999999999999e-6

    1. Initial program 77.9%

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

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

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

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

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

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

    if -1.04999999999999995e28 < z < -8.20000000000000068e-120

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.75e-190 < z < 9.00000000000000032e-107

    1. Initial program 90.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+69}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-120}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-190}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-107}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-6}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 84.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{x - t}{z - a}\\ t_2 := t - x \cdot \frac{a - y}{z}\\ \mathbf{if}\;z \leq -2.6 \cdot 10^{+227}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{+106}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+86}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+105}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- x t) (- z a)))))
        (t_2 (- t (* x (/ (- a y) z)))))
   (if (<= z -2.6e+227)
     t_2
     (if (<= z -7.2e+106)
       t_1
       (if (<= z -2.6e+86)
         (+ t (/ (* (- t x) (- a y)) z))
         (if (<= z 1.9e+105) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((x - t) / (z - a)));
	double t_2 = t - (x * ((a - y) / z));
	double tmp;
	if (z <= -2.6e+227) {
		tmp = t_2;
	} else if (z <= -7.2e+106) {
		tmp = t_1;
	} else if (z <= -2.6e+86) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else if (z <= 1.9e+105) {
		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 - z) * ((x - t) / (z - a)))
    t_2 = t - (x * ((a - y) / z))
    if (z <= (-2.6d+227)) then
        tmp = t_2
    else if (z <= (-7.2d+106)) then
        tmp = t_1
    else if (z <= (-2.6d+86)) then
        tmp = t + (((t - x) * (a - y)) / z)
    else if (z <= 1.9d+105) 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 - z) * ((x - t) / (z - a)));
	double t_2 = t - (x * ((a - y) / z));
	double tmp;
	if (z <= -2.6e+227) {
		tmp = t_2;
	} else if (z <= -7.2e+106) {
		tmp = t_1;
	} else if (z <= -2.6e+86) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else if (z <= 1.9e+105) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) * ((x - t) / (z - a)))
	t_2 = t - (x * ((a - y) / z))
	tmp = 0
	if z <= -2.6e+227:
		tmp = t_2
	elif z <= -7.2e+106:
		tmp = t_1
	elif z <= -2.6e+86:
		tmp = t + (((t - x) * (a - y)) / z)
	elif z <= 1.9e+105:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(x - t) / Float64(z - a))))
	t_2 = Float64(t - Float64(x * Float64(Float64(a - y) / z)))
	tmp = 0.0
	if (z <= -2.6e+227)
		tmp = t_2;
	elseif (z <= -7.2e+106)
		tmp = t_1;
	elseif (z <= -2.6e+86)
		tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z));
	elseif (z <= 1.9e+105)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) * ((x - t) / (z - a)));
	t_2 = t - (x * ((a - y) / z));
	tmp = 0.0;
	if (z <= -2.6e+227)
		tmp = t_2;
	elseif (z <= -7.2e+106)
		tmp = t_1;
	elseif (z <= -2.6e+86)
		tmp = t + (((t - x) * (a - y)) / z);
	elseif (z <= 1.9e+105)
		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 - z), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(x * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+227], t$95$2, If[LessEqual[z, -7.2e+106], t$95$1, If[LessEqual[z, -2.6e+86], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+105], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -7.2 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.9 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.59999999999999982e227 or 1.9e105 < z

    1. Initial program 31.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.59999999999999982e227 < z < -7.2000000000000002e106 or -2.5999999999999998e86 < z < 1.9e105

    1. Initial program 78.5%

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

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

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

    if -7.2000000000000002e106 < z < -2.5999999999999998e86

    1. Initial program 17.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+227}:\\ \;\;\;\;t - x \cdot \frac{a - y}{z}\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{+106}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{x - t}{z - a}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+86}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+105}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{x - t}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t - x \cdot \frac{a - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 40.8% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;z \leq -4 \cdot 10^{-190}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.45 \cdot 10^{-5}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.99999999999999983e69 or 2.45e-5 < z

    1. Initial program 40.1%

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

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

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

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

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

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

    if -2.99999999999999983e69 < z < -1.19999999999999991e28 or -9e-120 < z < -4.0000000000000001e-190 or 8.5000000000000006e-114 < z < 2.45e-5

    1. Initial program 77.9%

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

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

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

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

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

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

    if -1.19999999999999991e28 < z < -9e-120

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000001e-190 < z < 8.5000000000000006e-114

    1. Initial program 90.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+69}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-120}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-190}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-114}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-5}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 41.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.1 \cdot 10^{+69}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-119}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-190}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-108}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-5}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -5.1e+69)
   t
   (if (<= z -1.8e+28)
     x
     (if (<= z -2.2e-119)
       (* x (/ y z))
       (if (<= z -1.3e-190)
         x
         (if (<= z 3.8e-108) (* y (/ (- t x) a)) (if (<= z 2.5e-5) x t)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.1e+69) {
		tmp = t;
	} else if (z <= -1.8e+28) {
		tmp = x;
	} else if (z <= -2.2e-119) {
		tmp = x * (y / z);
	} else if (z <= -1.3e-190) {
		tmp = x;
	} else if (z <= 3.8e-108) {
		tmp = y * ((t - x) / a);
	} else if (z <= 2.5e-5) {
		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 <= (-5.1d+69)) then
        tmp = t
    else if (z <= (-1.8d+28)) then
        tmp = x
    else if (z <= (-2.2d-119)) then
        tmp = x * (y / z)
    else if (z <= (-1.3d-190)) then
        tmp = x
    else if (z <= 3.8d-108) then
        tmp = y * ((t - x) / a)
    else if (z <= 2.5d-5) 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 <= -5.1e+69) {
		tmp = t;
	} else if (z <= -1.8e+28) {
		tmp = x;
	} else if (z <= -2.2e-119) {
		tmp = x * (y / z);
	} else if (z <= -1.3e-190) {
		tmp = x;
	} else if (z <= 3.8e-108) {
		tmp = y * ((t - x) / a);
	} else if (z <= 2.5e-5) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -5.1e+69:
		tmp = t
	elif z <= -1.8e+28:
		tmp = x
	elif z <= -2.2e-119:
		tmp = x * (y / z)
	elif z <= -1.3e-190:
		tmp = x
	elif z <= 3.8e-108:
		tmp = y * ((t - x) / a)
	elif z <= 2.5e-5:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -5.1e+69)
		tmp = t;
	elseif (z <= -1.8e+28)
		tmp = x;
	elseif (z <= -2.2e-119)
		tmp = Float64(x * Float64(y / z));
	elseif (z <= -1.3e-190)
		tmp = x;
	elseif (z <= 3.8e-108)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 2.5e-5)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -5.1e+69)
		tmp = t;
	elseif (z <= -1.8e+28)
		tmp = x;
	elseif (z <= -2.2e-119)
		tmp = x * (y / z);
	elseif (z <= -1.3e-190)
		tmp = x;
	elseif (z <= 3.8e-108)
		tmp = y * ((t - x) / a);
	elseif (z <= 2.5e-5)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.1e+69], t, If[LessEqual[z, -1.8e+28], x, If[LessEqual[z, -2.2e-119], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.3e-190], x, If[LessEqual[z, 3.8e-108], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-5], x, t]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.8 \cdot 10^{+28}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq -1.3 \cdot 10^{-190}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{-5}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.09999999999999999e69 or 2.50000000000000012e-5 < z

    1. Initial program 40.1%

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

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

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

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

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

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

    if -5.09999999999999999e69 < z < -1.8e28 or -2.2000000000000001e-119 < z < -1.2999999999999999e-190 or 3.79999999999999973e-108 < z < 2.50000000000000012e-5

    1. Initial program 77.9%

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

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

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

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

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

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

    if -1.8e28 < z < -2.2000000000000001e-119

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2999999999999999e-190 < z < 3.79999999999999973e-108

    1. Initial program 90.4%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} \]
    8. Simplified52.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.1 \cdot 10^{+69}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-119}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-190}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-108}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-5}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 43.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a}\\ \mathbf{if}\;z \leq -1.6 \cdot 10^{+69}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-140}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-191}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-117}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-5}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) a))))
   (if (<= z -1.6e+69)
     t
     (if (<= z -5.8e+27)
       x
       (if (<= z -6.8e-140)
         t_1
         (if (<= z -1.7e-191)
           x
           (if (<= z 1.5e-117) t_1 (if (<= z 3e-5) x t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / a);
	double tmp;
	if (z <= -1.6e+69) {
		tmp = t;
	} else if (z <= -5.8e+27) {
		tmp = x;
	} else if (z <= -6.8e-140) {
		tmp = t_1;
	} else if (z <= -1.7e-191) {
		tmp = x;
	} else if (z <= 1.5e-117) {
		tmp = t_1;
	} else if (z <= 3e-5) {
		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) :: t_1
    real(8) :: tmp
    t_1 = y * ((t - x) / a)
    if (z <= (-1.6d+69)) then
        tmp = t
    else if (z <= (-5.8d+27)) then
        tmp = x
    else if (z <= (-6.8d-140)) then
        tmp = t_1
    else if (z <= (-1.7d-191)) then
        tmp = x
    else if (z <= 1.5d-117) then
        tmp = t_1
    else if (z <= 3d-5) 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 t_1 = y * ((t - x) / a);
	double tmp;
	if (z <= -1.6e+69) {
		tmp = t;
	} else if (z <= -5.8e+27) {
		tmp = x;
	} else if (z <= -6.8e-140) {
		tmp = t_1;
	} else if (z <= -1.7e-191) {
		tmp = x;
	} else if (z <= 1.5e-117) {
		tmp = t_1;
	} else if (z <= 3e-5) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / a)
	tmp = 0
	if z <= -1.6e+69:
		tmp = t
	elif z <= -5.8e+27:
		tmp = x
	elif z <= -6.8e-140:
		tmp = t_1
	elif z <= -1.7e-191:
		tmp = x
	elif z <= 1.5e-117:
		tmp = t_1
	elif z <= 3e-5:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / a))
	tmp = 0.0
	if (z <= -1.6e+69)
		tmp = t;
	elseif (z <= -5.8e+27)
		tmp = x;
	elseif (z <= -6.8e-140)
		tmp = t_1;
	elseif (z <= -1.7e-191)
		tmp = x;
	elseif (z <= 1.5e-117)
		tmp = t_1;
	elseif (z <= 3e-5)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / a);
	tmp = 0.0;
	if (z <= -1.6e+69)
		tmp = t;
	elseif (z <= -5.8e+27)
		tmp = x;
	elseif (z <= -6.8e-140)
		tmp = t_1;
	elseif (z <= -1.7e-191)
		tmp = x;
	elseif (z <= 1.5e-117)
		tmp = t_1;
	elseif (z <= 3e-5)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+69], t, If[LessEqual[z, -5.8e+27], x, If[LessEqual[z, -6.8e-140], t$95$1, If[LessEqual[z, -1.7e-191], x, If[LessEqual[z, 1.5e-117], t$95$1, If[LessEqual[z, 3e-5], x, t]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -5.8 \cdot 10^{+27}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -6.8 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.7 \cdot 10^{-191}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.5 \cdot 10^{-117}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3 \cdot 10^{-5}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.59999999999999992e69 or 3.00000000000000008e-5 < z

    1. Initial program 40.1%

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

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

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

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

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

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

    if -1.59999999999999992e69 < z < -5.8000000000000002e27 or -6.80000000000000017e-140 < z < -1.69999999999999997e-191 or 1.49999999999999996e-117 < z < 3.00000000000000008e-5

    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*89.0%

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

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

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

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

    if -5.8000000000000002e27 < z < -6.80000000000000017e-140 or -1.69999999999999997e-191 < z < 1.49999999999999996e-117

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 10: 72.3% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.09999999999999999e69 or 4.0999999999999998e34 < z < 6.5e96

    1. Initial program 39.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.09999999999999999e69 < z < 4.0999999999999998e34

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

    if 6.5e96 < z < 3.5000000000000002e104

    1. Initial program 61.5%

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

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

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

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

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

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

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

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

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

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

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

    if 3.5000000000000002e104 < z

    1. Initial program 36.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.1 \cdot 10^{+69}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+34}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+96}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+104}:\\ \;\;\;\;x + z \cdot \frac{t - x}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t - x \cdot \frac{a - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 48.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -1.7 \cdot 10^{-275}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.55 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.7999999999999997e128 or 1.54999999999999994e90 < z

    1. Initial program 34.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{z}{a - z}} \]
      3. distribute-lft-neg-in58.3%

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

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

    if -6.7999999999999997e128 < z < -1.69999999999999984e-275 or 2.80000000000000007e-222 < z < 1.54999999999999994e90

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.69999999999999984e-275 < z < 2.80000000000000007e-222

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+128}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-275}:\\ \;\;\;\;\left(-x\right) \cdot \left(-1 + \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-222}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+90}:\\ \;\;\;\;\left(-x\right) \cdot \left(-1 + \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 45.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -6 \cdot 10^{-65}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\

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

\mathbf{elif}\;z \leq 2.45 \cdot 10^{-5}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.49999999999999994e101 or 2.45e-5 < 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*57.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{z}{a - z}} \]
      3. distribute-lft-neg-in54.0%

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

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

    if -2.49999999999999994e101 < z < -5.99999999999999996e-65

    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*80.3%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t - x}{z}} \]
      3. distribute-lft-neg-in43.8%

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

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

    if -5.99999999999999996e-65 < z < 6.39999999999999973e-102

    1. Initial program 91.7%

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

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

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

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

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

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

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

    if 6.39999999999999973e-102 < z < 2.45e-5

    1. Initial program 79.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+101}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-65}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-102}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-5}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 39.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-191}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-5}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.95000000000000002e69 or 1.59999999999999993e-5 < z

    1. Initial program 40.1%

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

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

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

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

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

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

    if -2.95000000000000002e69 < z < -1.25e-191 or 5.50000000000000029e-105 < z < 1.59999999999999993e-5

    1. Initial program 85.4%

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

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

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

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

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

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

    if -1.25e-191 < z < 5.50000000000000029e-105

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 14: 73.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.62 \cdot 10^{+69} \lor \neg \left(z \leq 5.6 \cdot 10^{+34}\right):\\
\;\;\;\;t - x \cdot \frac{a - y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.62e69 or 5.60000000000000016e34 < z

    1. Initial program 39.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - x \cdot \frac{\color{blue}{a - y}}{z} \]
    11. Simplified72.9%

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

    if -1.62e69 < z < 5.60000000000000016e34

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.62 \cdot 10^{+69} \lor \neg \left(z \leq 5.6 \cdot 10^{+34}\right):\\ \;\;\;\;t - x \cdot \frac{a - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 72.1% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 35.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6499999999999999e69 < z < 1.59999999999999991e35

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

    if 1.59999999999999991e35 < z

    1. Initial program 42.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+69}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+35}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t - x \cdot \frac{a - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 71.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+69} \lor \neg \left(z \leq 2.4 \cdot 10^{-6}\right):\\
\;\;\;\;t - x \cdot \frac{a - y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.0000000000000001e69 or 2.3999999999999999e-6 < z

    1. Initial program 40.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e69 < z < 2.3999999999999999e-6

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 60.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \lor \neg \left(x \leq 2.45 \cdot 10^{+120}\right):\\
\;\;\;\;\left(-x\right) \cdot \left(-1 + \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.79999999999999982 or 2.45000000000000005e120 < x

    1. Initial program 53.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.79999999999999982 < x < 2.45000000000000005e120

    1. Initial program 74.3%

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

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

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

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

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

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

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

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

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

Alternative 18: 66.7% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 35.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.65e69 < z < 5.60000000000000038e-7

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

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

    if 5.60000000000000038e-7 < z

    1. Initial program 44.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 19: 65.6% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 35.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.8000000000000003e69 < z < 3.49999999999999995e-6

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

    if 3.49999999999999995e-6 < z

    1. Initial program 44.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 20: 39.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 3.8 \cdot 10^{+56}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.60000000000000001e74 or 3.79999999999999996e56 < a

    1. Initial program 69.3%

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

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

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

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

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

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

    if -8.60000000000000001e74 < a < 3.79999999999999996e56

    1. Initial program 63.4%

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

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

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

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

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 21: 26.0% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return t;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 65.5%

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

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

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

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

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

    \[\leadsto \color{blue}{t} \]
  6. Add Preprocessing

Developer target: 84.3% accurate, 0.6× 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 2024111 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :alt
  (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))))