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

Percentage Accurate: 68.1% → 90.8%
Time: 15.8s
Alternatives: 18
Speedup: 0.6×

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 18 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.1% 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: 90.8% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 76.6%

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

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

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

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

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

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

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

    1. Initial program 4.1%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{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 2 regimes into one program.
  4. Final simplification91.0%

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

Alternative 2: 88.9% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-271}:\\
\;\;\;\;t\_2\\

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

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

    1. Initial program 67.0%

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

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

      \[\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))) < -1.99999999999999993e-271

    1. Initial program 94.3%

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

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

    1. Initial program 4.1%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{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 simplification90.2%

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

Alternative 3: 90.8% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 76.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.1%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{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 2 regimes into one program.
  4. Final simplification90.9%

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

Alternative 4: 39.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -3.8 \cdot 10^{-119}:\\
\;\;\;\;x + t\\

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

\mathbf{elif}\;a \leq 2.9 \cdot 10^{+76}:\\
\;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.8500000000000001e228 or 2.9000000000000002e76 < a

    1. Initial program 72.1%

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

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

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

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

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

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

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

    if -2.8500000000000001e228 < a < -3.79999999999999975e-119

    1. Initial program 78.0%

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

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

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

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

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

    if -3.79999999999999975e-119 < a < 5.8e-279

    1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified50.3%

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

    if 5.8e-279 < a < 2.9000000000000002e76

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{a \cdot x - a \cdot t}{z}} \]
    9. Step-by-step derivation
      1. mul-1-neg40.7%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(1 - -1 \cdot \frac{a}{z}\right)} \]
    12. Step-by-step derivation
      1. cancel-sign-sub-inv36.9%

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(\frac{a}{z} + 1\right)} \]
    13. Simplified36.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.85 \cdot 10^{+228}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-119}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-279}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+76}:\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 37.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -5.8 \cdot 10^{-118}:\\
\;\;\;\;x + t\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.8500000000000001e228 or 1.1999999999999999e71 < a

    1. Initial program 71.5%

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

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

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

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

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

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

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

    if -2.8500000000000001e228 < a < -5.79999999999999961e-118

    1. Initial program 78.0%

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

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

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

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

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

    if -5.79999999999999961e-118 < a < 1.89999999999999992e-59

    1. Initial program 65.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 84.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+84.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/84.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/84.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-neg84.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-sub84.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-neg84.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--84.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/84.0%

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

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

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

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

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

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

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

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

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

    if 1.89999999999999992e-59 < a < 1.1999999999999999e71

    1. Initial program 71.7%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 68.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{if}\;a \leq -7.2 \cdot 10^{-37}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.20000000000000014e-37 or 2.70000000000000016e88 < a

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.20000000000000014e-37 < a < 8.39999999999999964e-60

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.39999999999999964e-60 < a < 2.70000000000000016e88

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{\left(-y\right) + \left(-\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)}{-\left(a - z\right)} \]
      7. sqr-neg54.5%

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

        \[\leadsto t \cdot \frac{\left(-y\right) + \left(-\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)}{-\left(a - z\right)} \]
      9. add-sqr-sqrt46.5%

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

        \[\leadsto t \cdot \frac{\left(-y\right) + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}{-\left(a - z\right)} \]
      11. sqrt-unprod47.6%

        \[\leadsto t \cdot \frac{\left(-y\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\left(a - z\right)} \]
      12. sqr-neg47.6%

        \[\leadsto t \cdot \frac{\left(-y\right) + \sqrt{\color{blue}{z \cdot z}}}{-\left(a - z\right)} \]
      13. sqrt-unprod22.1%

        \[\leadsto t \cdot \frac{\left(-y\right) + \color{blue}{\sqrt{z} \cdot \sqrt{z}}}{-\left(a - z\right)} \]
      14. add-sqr-sqrt72.8%

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

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

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\color{blue}{\left(-a\right) + \left(-\left(-z\right)\right)}} \]
      17. add-sqr-sqrt50.5%

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

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)} \]
      19. sqr-neg51.2%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\sqrt{\color{blue}{z \cdot z}}\right)} \]
      20. sqrt-unprod9.9%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)} \]
      21. add-sqr-sqrt41.6%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\color{blue}{z}\right)} \]
      22. add-sqr-sqrt31.7%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      23. sqrt-unprod47.9%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      24. sqr-neg47.9%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \sqrt{\color{blue}{z \cdot z}}} \]
      25. sqrt-unprod22.1%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      26. add-sqr-sqrt72.8%

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

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

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

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

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

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

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

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

      \[\leadsto t \cdot \color{blue}{\frac{z - y}{z - a}} \]
    10. Step-by-step derivation
      1. clear-num72.7%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z - a}{z - y}}} \]
      2. un-div-inv72.8%

        \[\leadsto \color{blue}{\frac{t}{\frac{z - a}{z - y}}} \]
    11. Applied egg-rr72.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{-37}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 8.4 \cdot 10^{-60}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+88}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 68.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{if}\;a \leq -7.2 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.2e-40 or 1.1e91 < a

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.2e-40 < a < 2.1999999999999999e-59

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1999999999999999e-59 < a < 1.1e91

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{\left(-y\right) + \left(-\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)}{-\left(a - z\right)} \]
      7. sqr-neg54.5%

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

        \[\leadsto t \cdot \frac{\left(-y\right) + \left(-\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)}{-\left(a - z\right)} \]
      9. add-sqr-sqrt46.5%

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

        \[\leadsto t \cdot \frac{\left(-y\right) + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}{-\left(a - z\right)} \]
      11. sqrt-unprod47.6%

        \[\leadsto t \cdot \frac{\left(-y\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\left(a - z\right)} \]
      12. sqr-neg47.6%

        \[\leadsto t \cdot \frac{\left(-y\right) + \sqrt{\color{blue}{z \cdot z}}}{-\left(a - z\right)} \]
      13. sqrt-unprod22.1%

        \[\leadsto t \cdot \frac{\left(-y\right) + \color{blue}{\sqrt{z} \cdot \sqrt{z}}}{-\left(a - z\right)} \]
      14. add-sqr-sqrt72.8%

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

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

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\color{blue}{\left(-a\right) + \left(-\left(-z\right)\right)}} \]
      17. add-sqr-sqrt50.5%

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

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)} \]
      19. sqr-neg51.2%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\sqrt{\color{blue}{z \cdot z}}\right)} \]
      20. sqrt-unprod9.9%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)} \]
      21. add-sqr-sqrt41.6%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\color{blue}{z}\right)} \]
      22. add-sqr-sqrt31.7%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      23. sqrt-unprod47.9%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      24. sqr-neg47.9%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \sqrt{\color{blue}{z \cdot z}}} \]
      25. sqrt-unprod22.1%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      26. add-sqr-sqrt72.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{-40}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-59}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+91}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 83.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{-151} \lor \neg \left(a \leq 2.6 \cdot 10^{-99}\right):\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{t - x}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.4999999999999994e-151 or 2.60000000000000005e-99 < a

    1. Initial program 74.4%

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

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

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

    if -6.4999999999999994e-151 < a < 2.60000000000000005e-99

    1. Initial program 62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 75.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.04999999999999999e-66 or 3.3000000000000003e-5 < a

    1. Initial program 74.4%

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

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

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

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

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

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

    if -2.04999999999999999e-66 < a < 3.3000000000000003e-5

    1. Initial program 66.1%

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

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

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

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

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

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

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

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

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

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

        \[\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-sub81.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-neg81.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--81.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/81.6%

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

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

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

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

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

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

Alternative 10: 74.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.6000000000000001e-67 or 2.7500000000000001e-5 < a

    1. Initial program 74.4%

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

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

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

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

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

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

    if -4.6000000000000001e-67 < a < 2.7500000000000001e-5

    1. Initial program 66.1%

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

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

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

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

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

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

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

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

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

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

        \[\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-sub81.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-neg81.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--81.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/81.6%

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

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

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

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

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

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

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

Alternative 11: 37.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 3.6 \cdot 10^{-74}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 4.2 \cdot 10^{+71}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.3499999999999999e30 or 4.19999999999999978e71 < a

    1. Initial program 73.2%

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

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

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

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

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

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

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

    if -1.3499999999999999e30 < a < 3.6000000000000002e-74

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

    if 3.6000000000000002e-74 < a < 4.19999999999999978e71

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified37.1%

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

Alternative 12: 64.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{+30} \lor \neg \left(a \leq 1.8 \cdot 10^{+84}\right):\\ \;\;\;\;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 (or (<= a -7e+30) (not (<= a 1.8e+84)))
   (+ 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 ((a <= -7e+30) || !(a <= 1.8e+84)) {
		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 ((a <= (-7d+30)) .or. (.not. (a <= 1.8d+84))) 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 ((a <= -7e+30) || !(a <= 1.8e+84)) {
		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 (a <= -7e+30) or not (a <= 1.8e+84):
		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 ((a <= -7e+30) || !(a <= 1.8e+84))
		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 ((a <= -7e+30) || ~((a <= 1.8e+84)))
		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[Or[LessEqual[a, -7e+30], N[Not[LessEqual[a, 1.8e+84]], $MachinePrecision]], 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}\;a \leq -7 \cdot 10^{+30} \lor \neg \left(a \leq 1.8 \cdot 10^{+84}\right):\\
\;\;\;\;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 2 regimes
  2. if a < -7.00000000000000042e30 or 1.8e84 < a

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.00000000000000042e30 < a < 1.8e84

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{\left(-y\right) + \left(-\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)}{-\left(a - z\right)} \]
      9. add-sqr-sqrt27.5%

        \[\leadsto t \cdot \frac{\left(-y\right) + \left(-\color{blue}{z}\right)}{-\left(a - z\right)} \]
      10. add-sqr-sqrt16.9%

        \[\leadsto t \cdot \frac{\left(-y\right) + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}{-\left(a - z\right)} \]
      11. sqrt-unprod34.9%

        \[\leadsto t \cdot \frac{\left(-y\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\left(a - z\right)} \]
      12. sqr-neg34.9%

        \[\leadsto t \cdot \frac{\left(-y\right) + \sqrt{\color{blue}{z \cdot z}}}{-\left(a - z\right)} \]
      13. sqrt-unprod25.8%

        \[\leadsto t \cdot \frac{\left(-y\right) + \color{blue}{\sqrt{z} \cdot \sqrt{z}}}{-\left(a - z\right)} \]
      14. add-sqr-sqrt62.4%

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

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

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\color{blue}{\left(-a\right) + \left(-\left(-z\right)\right)}} \]
      17. add-sqr-sqrt36.2%

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

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)} \]
      19. sqr-neg35.5%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\sqrt{\color{blue}{z \cdot z}}\right)} \]
      20. sqrt-unprod5.1%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)} \]
      21. add-sqr-sqrt17.4%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\color{blue}{z}\right)} \]
      22. add-sqr-sqrt12.4%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      23. sqrt-unprod32.4%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      24. sqr-neg32.4%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \sqrt{\color{blue}{z \cdot z}}} \]
      25. sqrt-unprod25.8%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      26. add-sqr-sqrt62.4%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 64.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.3 \cdot 10^{+31} \lor \neg \left(a \leq 2.4 \cdot 10^{+75}\right):\\ \;\;\;\;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 (or (<= a -1.3e+31) (not (<= a 2.4e+75)))
   (+ 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 ((a <= -1.3e+31) || !(a <= 2.4e+75)) {
		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 ((a <= (-1.3d+31)) .or. (.not. (a <= 2.4d+75))) 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 ((a <= -1.3e+31) || !(a <= 2.4e+75)) {
		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 (a <= -1.3e+31) or not (a <= 2.4e+75):
		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 ((a <= -1.3e+31) || !(a <= 2.4e+75))
		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 ((a <= -1.3e+31) || ~((a <= 2.4e+75)))
		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[Or[LessEqual[a, -1.3e+31], N[Not[LessEqual[a, 2.4e+75]], $MachinePrecision]], 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}\;a \leq -1.3 \cdot 10^{+31} \lor \neg \left(a \leq 2.4 \cdot 10^{+75}\right):\\
\;\;\;\;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 2 regimes
  2. if a < -1.3e31 or 2.4e75 < a

    1. Initial program 73.4%

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

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

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

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

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

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

    if -1.3e31 < a < 2.4e75

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{\left(-y\right) + \left(-\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)}{-\left(a - z\right)} \]
      9. add-sqr-sqrt27.5%

        \[\leadsto t \cdot \frac{\left(-y\right) + \left(-\color{blue}{z}\right)}{-\left(a - z\right)} \]
      10. add-sqr-sqrt16.9%

        \[\leadsto t \cdot \frac{\left(-y\right) + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}{-\left(a - z\right)} \]
      11. sqrt-unprod34.9%

        \[\leadsto t \cdot \frac{\left(-y\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\left(a - z\right)} \]
      12. sqr-neg34.9%

        \[\leadsto t \cdot \frac{\left(-y\right) + \sqrt{\color{blue}{z \cdot z}}}{-\left(a - z\right)} \]
      13. sqrt-unprod25.8%

        \[\leadsto t \cdot \frac{\left(-y\right) + \color{blue}{\sqrt{z} \cdot \sqrt{z}}}{-\left(a - z\right)} \]
      14. add-sqr-sqrt62.4%

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

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

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\color{blue}{\left(-a\right) + \left(-\left(-z\right)\right)}} \]
      17. add-sqr-sqrt36.2%

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

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)} \]
      19. sqr-neg35.5%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\sqrt{\color{blue}{z \cdot z}}\right)} \]
      20. sqrt-unprod5.1%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)} \]
      21. add-sqr-sqrt17.4%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\color{blue}{z}\right)} \]
      22. add-sqr-sqrt12.4%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      23. sqrt-unprod32.4%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      24. sqr-neg32.4%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \sqrt{\color{blue}{z \cdot z}}} \]
      25. sqrt-unprod25.8%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      26. add-sqr-sqrt62.4%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 61.4% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.6999999999999999e31 or 2.7999999999999998e89 < a

    1. Initial program 73.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t \cdot y}{a} + x} \]
      2. associate-/l*68.7%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    8. Simplified68.7%

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

    if -1.6999999999999999e31 < a < 2.7999999999999998e89

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{\left(-y\right) + \left(-\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)}{-\left(a - z\right)} \]
      9. add-sqr-sqrt27.5%

        \[\leadsto t \cdot \frac{\left(-y\right) + \left(-\color{blue}{z}\right)}{-\left(a - z\right)} \]
      10. add-sqr-sqrt16.9%

        \[\leadsto t \cdot \frac{\left(-y\right) + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}{-\left(a - z\right)} \]
      11. sqrt-unprod34.9%

        \[\leadsto t \cdot \frac{\left(-y\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\left(a - z\right)} \]
      12. sqr-neg34.9%

        \[\leadsto t \cdot \frac{\left(-y\right) + \sqrt{\color{blue}{z \cdot z}}}{-\left(a - z\right)} \]
      13. sqrt-unprod25.8%

        \[\leadsto t \cdot \frac{\left(-y\right) + \color{blue}{\sqrt{z} \cdot \sqrt{z}}}{-\left(a - z\right)} \]
      14. add-sqr-sqrt62.4%

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

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

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\color{blue}{\left(-a\right) + \left(-\left(-z\right)\right)}} \]
      17. add-sqr-sqrt36.2%

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

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)} \]
      19. sqr-neg35.5%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\sqrt{\color{blue}{z \cdot z}}\right)} \]
      20. sqrt-unprod5.1%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)} \]
      21. add-sqr-sqrt17.4%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \left(-\color{blue}{z}\right)} \]
      22. add-sqr-sqrt12.4%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      23. sqrt-unprod32.4%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      24. sqr-neg32.4%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \sqrt{\color{blue}{z \cdot z}}} \]
      25. sqrt-unprod25.8%

        \[\leadsto t \cdot \frac{\left(-y\right) + z}{\left(-a\right) + \color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      26. add-sqr-sqrt62.4%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 56.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{-42} \lor \neg \left(a \leq 1.05 \cdot 10^{+48}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.20000000000000001e-42 or 1.0499999999999999e48 < a

    1. Initial program 73.3%

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

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

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

        \[\leadsto \color{blue}{\frac{t \cdot y}{a} + x} \]
      2. associate-/l*64.6%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    8. Simplified64.6%

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

    if -1.20000000000000001e-42 < a < 1.0499999999999999e48

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 49.4% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.10000000000000005e30 or 1.65000000000000004e90 < a

    1. Initial program 73.6%

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

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

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

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

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

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

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

    if -4.10000000000000005e30 < a < 1.65000000000000004e90

    1. Initial program 68.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(1 - \frac{y}{z}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 17: 38.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.5 \cdot 10^{+30}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{+83}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.5e+30) x (if (<= a 7.8e+83) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.5e+30) {
		tmp = x;
	} else if (a <= 7.8e+83) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-1.5d+30)) then
        tmp = x
    else if (a <= 7.8d+83) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.5e+30) {
		tmp = x;
	} else if (a <= 7.8e+83) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.5e+30:
		tmp = x
	elif a <= 7.8e+83:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.5e+30)
		tmp = x;
	elseif (a <= 7.8e+83)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.5e+30)
		tmp = x;
	elseif (a <= 7.8e+83)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.5e+30], x, If[LessEqual[a, 7.8e+83], t, x]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 7.8 \cdot 10^{+83}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.49999999999999989e30 or 7.8000000000000003e83 < a

    1. Initial program 73.6%

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

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

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

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

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

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

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

    if -1.49999999999999989e30 < a < 7.8000000000000003e83

    1. Initial program 68.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 18: 24.5% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return t;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 70.7%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{t} \]
  7. Add Preprocessing

Developer Target 1: 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 2024165 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))

  (+ x (/ (* (- y z) (- t x)) (- a z))))