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

Percentage Accurate: 67.5% → 89.8%
Time: 18.2s
Alternatives: 25
Speedup: 1.0×

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

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

Initial Program: 67.5% 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: 89.8% accurate, 0.1× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot 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))) < -1.9999999999999999e-240

    1. Initial program 79.1%

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

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

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

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

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

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

    1. Initial program 6.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 77.4%

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

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

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

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

Alternative 2: 89.8% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t + \frac{x \cdot \left(y - a\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.9999999999999999e-240 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 78.3%

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

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

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

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

    1. Initial program 6.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 57.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;t \leq -1.42 \cdot 10^{-43}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-117}:\\ \;\;\;\;t\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-259}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-237}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-190}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{+36}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= t -1.42e-43)
     t_2
     (if (<= t -1.7e-116)
       t_1
       (if (<= t -4.8e-117)
         t
         (if (<= t -2.5e-259)
           (* (- t x) (/ y (- a z)))
           (if (<= t 5.5e-237)
             t_1
             (if (<= t 6.5e-190)
               (/ (* x (- y a)) z)
               (if (<= t 2.35e+36) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -1.42e-43) {
		tmp = t_2;
	} else if (t <= -1.7e-116) {
		tmp = t_1;
	} else if (t <= -4.8e-117) {
		tmp = t;
	} else if (t <= -2.5e-259) {
		tmp = (t - x) * (y / (a - z));
	} else if (t <= 5.5e-237) {
		tmp = t_1;
	} else if (t <= 6.5e-190) {
		tmp = (x * (y - a)) / z;
	} else if (t <= 2.35e+36) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    t_2 = t * ((y - z) / (a - z))
    if (t <= (-1.42d-43)) then
        tmp = t_2
    else if (t <= (-1.7d-116)) then
        tmp = t_1
    else if (t <= (-4.8d-117)) then
        tmp = t
    else if (t <= (-2.5d-259)) then
        tmp = (t - x) * (y / (a - z))
    else if (t <= 5.5d-237) then
        tmp = t_1
    else if (t <= 6.5d-190) then
        tmp = (x * (y - a)) / z
    else if (t <= 2.35d+36) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -1.42e-43) {
		tmp = t_2;
	} else if (t <= -1.7e-116) {
		tmp = t_1;
	} else if (t <= -4.8e-117) {
		tmp = t;
	} else if (t <= -2.5e-259) {
		tmp = (t - x) * (y / (a - z));
	} else if (t <= 5.5e-237) {
		tmp = t_1;
	} else if (t <= 6.5e-190) {
		tmp = (x * (y - a)) / z;
	} else if (t <= 2.35e+36) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if t <= -1.42e-43:
		tmp = t_2
	elif t <= -1.7e-116:
		tmp = t_1
	elif t <= -4.8e-117:
		tmp = t
	elif t <= -2.5e-259:
		tmp = (t - x) * (y / (a - z))
	elif t <= 5.5e-237:
		tmp = t_1
	elif t <= 6.5e-190:
		tmp = (x * (y - a)) / z
	elif t <= 2.35e+36:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (t <= -1.42e-43)
		tmp = t_2;
	elseif (t <= -1.7e-116)
		tmp = t_1;
	elseif (t <= -4.8e-117)
		tmp = t;
	elseif (t <= -2.5e-259)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	elseif (t <= 5.5e-237)
		tmp = t_1;
	elseif (t <= 6.5e-190)
		tmp = Float64(Float64(x * Float64(y - a)) / z);
	elseif (t <= 2.35e+36)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (t <= -1.42e-43)
		tmp = t_2;
	elseif (t <= -1.7e-116)
		tmp = t_1;
	elseif (t <= -4.8e-117)
		tmp = t;
	elseif (t <= -2.5e-259)
		tmp = (t - x) * (y / (a - z));
	elseif (t <= 5.5e-237)
		tmp = t_1;
	elseif (t <= 6.5e-190)
		tmp = (x * (y - a)) / z;
	elseif (t <= 2.35e+36)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.42e-43], t$95$2, If[LessEqual[t, -1.7e-116], t$95$1, If[LessEqual[t, -4.8e-117], t, If[LessEqual[t, -2.5e-259], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e-237], t$95$1, If[LessEqual[t, 6.5e-190], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 2.35e+36], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.7 \cdot 10^{-116}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -4.8 \cdot 10^{-117}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;t \leq 5.5 \cdot 10^{-237}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2.35 \cdot 10^{+36}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.41999999999999993e-43 or 2.34999999999999994e36 < t

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

    if -1.41999999999999993e-43 < t < -1.69999999999999996e-116 or -2.49999999999999989e-259 < t < 5.49999999999999981e-237 or 6.4999999999999997e-190 < t < 2.34999999999999994e36

    1. Initial program 79.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{y \cdot x}{a}} \]
    8. Step-by-step derivation
      1. mul-1-neg56.0%

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

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

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

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

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

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

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

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

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

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

    if -1.69999999999999996e-116 < t < -4.80000000000000028e-117

    1. Initial program 4.2%

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

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

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

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

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

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

    if -4.80000000000000028e-117 < t < -2.49999999999999989e-259

    1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.49999999999999981e-237 < t < 6.4999999999999997e-190

    1. Initial program 51.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.42 \cdot 10^{-43}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-116}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-117}:\\ \;\;\;\;t\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-259}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-237}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-190}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{+36}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 4: 70.6% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;z \leq -0.027:\\
\;\;\;\;x - \frac{z - y}{\frac{a}{t}}\\

\mathbf{elif}\;z \leq -1.8 \cdot 10^{-33} \lor \neg \left(z \leq 2.4 \cdot 10^{-22}\right):\\
\;\;\;\;t_1\\

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


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

    1. Initial program 24.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{y - a}{\color{blue}{-\frac{z}{x}}} \]
      2. distribute-neg-frac85.9%

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

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

    if -4.4999999999999997e134 < z < -3.5999999999999999e67

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.5999999999999999e67 < z < -1.9e14 or -0.0269999999999999997 < z < -1.80000000000000017e-33 or 2.40000000000000002e-22 < z

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9e14 < z < -0.0269999999999999997

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

    if -1.80000000000000017e-33 < z < 2.40000000000000002e-22

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+134}:\\ \;\;\;\;t + \frac{a - y}{-\frac{z}{x}}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{+67}:\\ \;\;\;\;x - \left(y - z\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{+14}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq -0.027:\\ \;\;\;\;x - \frac{z - y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-33} \lor \neg \left(z \leq 2.4 \cdot 10^{-22}\right):\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z - y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 5: 70.3% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;z \leq -8 \cdot 10^{+16}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq -4.5 \cdot 10^{-33} \lor \neg \left(z \leq 2.8 \cdot 10^{-22}\right):\\
\;\;\;\;t_1\\

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


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

    1. Initial program 24.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{y - a}{\color{blue}{-\frac{z}{x}}} \]
      2. distribute-neg-frac85.9%

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

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

    if -2.2e134 < z < -4e65

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4e65 < z < -8e16 or -5.5000000000000003e-8 < z < -4.49999999999999991e-33 or 2.79999999999999995e-22 < z

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8e16 < z < -5.5000000000000003e-8

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

    if -4.49999999999999991e-33 < z < 2.79999999999999995e-22

    1. Initial program 90.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+134}:\\ \;\;\;\;t + \frac{a - y}{-\frac{z}{x}}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+65}:\\ \;\;\;\;x - \left(y - z\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -8 \cdot 10^{+16}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-8}:\\ \;\;\;\;x - \frac{z - y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-33} \lor \neg \left(z \leq 2.8 \cdot 10^{-22}\right):\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]

Alternative 6: 57.2% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;x \leq -30500:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

\mathbf{elif}\;x \leq 2.7:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 1.8 \cdot 10^{+95}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;x \leq 4 \cdot 10^{+100}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.39999999999999994e156 or 4.00000000000000006e100 < x

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.39999999999999994e156 < x < -1.3e39

    1. Initial program 39.8%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{z}{t - x}}} \]
      3. distribute-neg-frac51.5%

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

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

    if -1.3e39 < x < -30500

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified69.5%

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

    if -30500 < x < 2.7000000000000002 or 1.79999999999999989e95 < x < 4.00000000000000006e100

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

    if 2.7000000000000002 < x < 1.79999999999999989e95

    1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t} + x \]
  3. Recombined 5 regimes into one program.
  4. Final simplification66.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.4 \cdot 10^{+156}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -1.3 \cdot 10^{+39}:\\ \;\;\;\;\frac{-y}{\frac{z}{t - x}}\\ \mathbf{elif}\;x \leq -30500:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq 2.7:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{+95}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+100}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 7: 58.4% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;x \leq -45000:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

\mathbf{elif}\;x \leq 230:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 5.3 \cdot 10^{+93}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;x \leq 4.5 \cdot 10^{+101}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -7.49999999999999976e164 or 4.5000000000000002e101 < x

    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. associate-*l/84.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(1 - \frac{y}{a}\right)} \cdot x \]
      3. *-commutative61.0%

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

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

    if -7.49999999999999976e164 < x < -8.50000000000000014e36

    1. Initial program 42.2%

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

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

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

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

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

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

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

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

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

    if -8.50000000000000014e36 < x < -45000

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified69.5%

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

    if -45000 < x < 230 or 5.3000000000000004e93 < x < 4.5000000000000002e101

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

    if 230 < x < 5.3000000000000004e93

    1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{+164}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -8.5 \cdot 10^{+36}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq -45000:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq 230:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 5.3 \cdot 10^{+93}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+101}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 8: 73.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -7.4 \cdot 10^{-85}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 4.7 \cdot 10^{+33}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 24.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{y - a}{\color{blue}{-\frac{z}{x}}} \]
      2. distribute-neg-frac85.9%

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

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

    if -1.99999999999999992e135 < z < -7.39999999999999966e-85 or 1.10000000000000001e-129 < z < 4.6999999999999998e33

    1. Initial program 86.1%

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

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

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

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

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

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

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

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

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

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

    if -7.39999999999999966e-85 < z < 1.10000000000000001e-129

    1. Initial program 92.7%

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

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

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

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

    if 4.6999999999999998e33 < z

    1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+135}:\\ \;\;\;\;t + \frac{a - y}{-\frac{z}{x}}\\ \mathbf{elif}\;z \leq -7.4 \cdot 10^{-85}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-129}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{+33}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \end{array} \]

Alternative 9: 74.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -1.3 \cdot 10^{-82}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 3.8 \cdot 10^{+33}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 24.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.60000000000000021e134 < z < -1.3e-82 or 5.8e-154 < z < 3.80000000000000002e33

    1. Initial program 86.1%

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

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

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

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

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

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

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

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

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

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

    if -1.3e-82 < z < 5.8e-154

    1. Initial program 92.7%

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

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

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

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

    if 3.80000000000000002e33 < z

    1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.6 \cdot 10^{+134}:\\ \;\;\;\;t + \frac{a - y}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-82}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-154}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+33}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \end{array} \]

Alternative 10: 53.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -1 \cdot 10^{+64}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;z \leq -6.8 \cdot 10^{+40}:\\
\;\;\;\;-\frac{z \cdot t}{a - z}\\

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

\mathbf{elif}\;z \leq 1.42 \cdot 10^{+41}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -8.6e116 or 1.42000000000000007e41 < z

    1. Initial program 45.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac59.0%

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

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

    if -8.6e116 < z < -1.00000000000000002e64

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000002e64 < z < -6.79999999999999977e40

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.79999999999999977e40 < z < -8.50000000000000067e-92

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.50000000000000067e-92 < z < 1.42000000000000007e41

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.6 \cdot 10^{+116}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;z \leq -1 \cdot 10^{+64}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{+40}:\\ \;\;\;\;-\frac{z \cdot t}{a - z}\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-92}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq 1.42 \cdot 10^{+41}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \end{array} \]

Alternative 11: 49.6% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq -1.45 \cdot 10^{+62}:\\
\;\;\;\;x + t\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.0000000000000002e128 or 7.20000000000000051e41 < z

    1. Initial program 45.6%

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

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

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

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

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

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

    if -2.0000000000000002e128 < z < -7.20000000000000011e81

    1. Initial program 70.3%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified61.1%

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{y \cdot x}{a}} \]
    8. Step-by-step derivation
      1. mul-1-neg60.5%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \left(-\frac{y}{a}\right)\right)} - 1\right)} \]
      3. add-sqr-sqrt60.0%

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

        \[\leadsto x + \left(e^{\mathsf{log1p}\left(x \cdot \color{blue}{\sqrt{\left(-\frac{y}{a}\right) \cdot \left(-\frac{y}{a}\right)}}\right)} - 1\right) \]
      5. sqr-neg60.5%

        \[\leadsto x + \left(e^{\mathsf{log1p}\left(x \cdot \sqrt{\color{blue}{\frac{y}{a} \cdot \frac{y}{a}}}\right)} - 1\right) \]
      6. sqrt-unprod51.0%

        \[\leadsto x + \left(e^{\mathsf{log1p}\left(x \cdot \color{blue}{\left(\sqrt{\frac{y}{a}} \cdot \sqrt{\frac{y}{a}}\right)}\right)} - 1\right) \]
      7. add-sqr-sqrt61.9%

        \[\leadsto x + \left(e^{\mathsf{log1p}\left(x \cdot \color{blue}{\frac{y}{a}}\right)} - 1\right) \]
    11. Applied egg-rr61.9%

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

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

        \[\leadsto x + \color{blue}{x \cdot \frac{y}{a}} \]
    13. Simplified62.1%

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

    if -7.20000000000000011e81 < z < -1.44999999999999992e62

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

    if -1.44999999999999992e62 < z < -9.49999999999999946e-92

    1. Initial program 86.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.49999999999999946e-92 < z < 7.20000000000000051e41

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+128}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{+81}:\\ \;\;\;\;x + x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{+62}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-92}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+41}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 12: 68.9% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq -4 \cdot 10^{-34} \lor \neg \left(z \leq 2.7 \cdot 10^{-22}\right):\\
\;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\

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


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

    1. Initial program 24.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.59999999999999987e135 < z < -3.79999999999999984e62

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.79999999999999984e62 < z < -3.99999999999999971e-34 or 2.7000000000000002e-22 < z

    1. Initial program 66.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.99999999999999971e-34 < z < 2.7000000000000002e-22

    1. Initial program 90.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+135}:\\ \;\;\;\;t + \frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{+62}:\\ \;\;\;\;x + \frac{t}{z} \cdot \left(z - y\right)\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-34} \lor \neg \left(z \leq 2.7 \cdot 10^{-22}\right):\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]

Alternative 13: 50.4% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-92}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.95 \cdot 10^{+33}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+173}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.79999999999999983e128 or 4.7999999999999998e173 < z

    1. Initial program 29.1%

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

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

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

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

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

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

    if -2.79999999999999983e128 < z < -2.6e-92 or 1.9500000000000001e33 < z < 4.7999999999999998e173

    1. Initial program 81.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{z} \cdot \left(t - x\right)} \]
      3. distribute-rgt-neg-in43.8%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot \left(-\left(t - x\right)\right)} \]
    9. Simplified43.8%

      \[\leadsto \color{blue}{\frac{y}{z} \cdot \left(-\left(t - x\right)\right)} \]

    if -2.6e-92 < z < 1.9500000000000001e33

    1. Initial program 92.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative92.2%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/97.7%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def97.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified97.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around 0 72.7%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a} + x} \]
    5. Step-by-step derivation
      1. +-commutative72.7%

        \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
      2. associate-/l*76.4%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified76.4%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in t around inf 64.1%

      \[\leadsto x + \frac{y}{\color{blue}{\frac{a}{t}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification55.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+128}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-92}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+33}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+173}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 14: 51.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+129}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-25}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 3.25 \cdot 10^{+32}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+173}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4e+129)
   t
   (if (<= z -2.9e-25)
     (- x (* z (/ t a)))
     (if (<= z 3.25e+32)
       (+ x (/ y (/ a t)))
       (if (<= z 2.4e+173) (* (/ y z) (- x t)) t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4e+129) {
		tmp = t;
	} else if (z <= -2.9e-25) {
		tmp = x - (z * (t / a));
	} else if (z <= 3.25e+32) {
		tmp = x + (y / (a / t));
	} else if (z <= 2.4e+173) {
		tmp = (y / z) * (x - t);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-4d+129)) then
        tmp = t
    else if (z <= (-2.9d-25)) then
        tmp = x - (z * (t / a))
    else if (z <= 3.25d+32) then
        tmp = x + (y / (a / t))
    else if (z <= 2.4d+173) then
        tmp = (y / z) * (x - t)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4e+129) {
		tmp = t;
	} else if (z <= -2.9e-25) {
		tmp = x - (z * (t / a));
	} else if (z <= 3.25e+32) {
		tmp = x + (y / (a / t));
	} else if (z <= 2.4e+173) {
		tmp = (y / z) * (x - t);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4e+129:
		tmp = t
	elif z <= -2.9e-25:
		tmp = x - (z * (t / a))
	elif z <= 3.25e+32:
		tmp = x + (y / (a / t))
	elif z <= 2.4e+173:
		tmp = (y / z) * (x - t)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4e+129)
		tmp = t;
	elseif (z <= -2.9e-25)
		tmp = Float64(x - Float64(z * Float64(t / a)));
	elseif (z <= 3.25e+32)
		tmp = Float64(x + Float64(y / Float64(a / t)));
	elseif (z <= 2.4e+173)
		tmp = Float64(Float64(y / z) * Float64(x - t));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -4e+129)
		tmp = t;
	elseif (z <= -2.9e-25)
		tmp = x - (z * (t / a));
	elseif (z <= 3.25e+32)
		tmp = x + (y / (a / t));
	elseif (z <= 2.4e+173)
		tmp = (y / z) * (x - t);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e+129], t, If[LessEqual[z, -2.9e-25], N[(x - N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.25e+32], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e+173], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+129}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -2.9 \cdot 10^{-25}:\\
\;\;\;\;x - z \cdot \frac{t}{a}\\

\mathbf{elif}\;z \leq 3.25 \cdot 10^{+32}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{+173}:\\
\;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4e129 or 2.3999999999999999e173 < z

    1. Initial program 29.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative29.1%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/68.4%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def68.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified68.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 57.3%

      \[\leadsto \color{blue}{t} \]

    if -4e129 < z < -2.9000000000000001e-25

    1. Initial program 85.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative85.2%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/90.8%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def90.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified90.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in a around inf 47.3%

      \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a} + x} \]
    5. Step-by-step derivation
      1. +-commutative47.3%

        \[\leadsto \color{blue}{x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a}} \]
      2. associate-/l*52.8%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a}{t - x}}} \]
    6. Simplified52.8%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a}{t - x}}} \]
    7. Taylor expanded in t around inf 50.2%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a}{t}}} \]
    8. Taylor expanded in y around 0 44.5%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot z}{a}} \]
    9. Step-by-step derivation
      1. mul-1-neg44.5%

        \[\leadsto x + \color{blue}{\left(-\frac{t \cdot z}{a}\right)} \]
      2. associate-*l/47.2%

        \[\leadsto x + \left(-\color{blue}{\frac{t}{a} \cdot z}\right) \]
      3. distribute-rgt-neg-in47.2%

        \[\leadsto x + \color{blue}{\frac{t}{a} \cdot \left(-z\right)} \]
    10. Simplified47.2%

      \[\leadsto x + \color{blue}{\frac{t}{a} \cdot \left(-z\right)} \]

    if -2.9000000000000001e-25 < z < 3.2499999999999997e32

    1. Initial program 90.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative90.8%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/95.5%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def95.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified95.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around 0 68.9%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a} + x} \]
    5. Step-by-step derivation
      1. +-commutative68.9%

        \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
      2. associate-/l*72.0%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified72.0%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in t around inf 59.6%

      \[\leadsto x + \frac{y}{\color{blue}{\frac{a}{t}}} \]

    if 3.2499999999999997e32 < z < 2.3999999999999999e173

    1. Initial program 77.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative77.3%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/87.8%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def87.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified87.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 70.9%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative70.9%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*76.1%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--76.1%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg76.1%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac76.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*70.9%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative70.9%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--70.9%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg70.9%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--70.9%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative70.9%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*76.1%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified76.1%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in y around -inf 39.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right)}{z}} \]
    8. Step-by-step derivation
      1. mul-1-neg39.2%

        \[\leadsto \color{blue}{-\frac{y \cdot \left(t - x\right)}{z}} \]
      2. associate-*l/46.8%

        \[\leadsto -\color{blue}{\frac{y}{z} \cdot \left(t - x\right)} \]
      3. distribute-rgt-neg-in46.8%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot \left(-\left(t - x\right)\right)} \]
    9. Simplified46.8%

      \[\leadsto \color{blue}{\frac{y}{z} \cdot \left(-\left(t - x\right)\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification55.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+129}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-25}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 3.25 \cdot 10^{+32}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+173}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 15: 53.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-t}{\frac{z}{y - z}}\\ \mathbf{if}\;z \leq -1.48 \cdot 10^{+103}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-92}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+41}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- t) (/ z (- y z)))))
   (if (<= z -1.48e+103)
     t_1
     (if (<= z -8.5e-92)
       (* (/ y z) (- x t))
       (if (<= z 4.3e+41) (+ x (/ y (/ a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -t / (z / (y - z));
	double tmp;
	if (z <= -1.48e+103) {
		tmp = t_1;
	} else if (z <= -8.5e-92) {
		tmp = (y / z) * (x - t);
	} else if (z <= 4.3e+41) {
		tmp = x + (y / (a / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = -t / (z / (y - z))
    if (z <= (-1.48d+103)) then
        tmp = t_1
    else if (z <= (-8.5d-92)) then
        tmp = (y / z) * (x - t)
    else if (z <= 4.3d+41) then
        tmp = x + (y / (a / t))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -t / (z / (y - z));
	double tmp;
	if (z <= -1.48e+103) {
		tmp = t_1;
	} else if (z <= -8.5e-92) {
		tmp = (y / z) * (x - t);
	} else if (z <= 4.3e+41) {
		tmp = x + (y / (a / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -t / (z / (y - z))
	tmp = 0
	if z <= -1.48e+103:
		tmp = t_1
	elif z <= -8.5e-92:
		tmp = (y / z) * (x - t)
	elif z <= 4.3e+41:
		tmp = x + (y / (a / t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(-t) / Float64(z / Float64(y - z)))
	tmp = 0.0
	if (z <= -1.48e+103)
		tmp = t_1;
	elseif (z <= -8.5e-92)
		tmp = Float64(Float64(y / z) * Float64(x - t));
	elseif (z <= 4.3e+41)
		tmp = Float64(x + Float64(y / Float64(a / t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -t / (z / (y - z));
	tmp = 0.0;
	if (z <= -1.48e+103)
		tmp = t_1;
	elseif (z <= -8.5e-92)
		tmp = (y / z) * (x - t);
	elseif (z <= 4.3e+41)
		tmp = x + (y / (a / t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.48e+103], t$95$1, If[LessEqual[z, -8.5e-92], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.3e+41], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{-t}{\frac{z}{y - z}}\\
\mathbf{if}\;z \leq -1.48 \cdot 10^{+103}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -8.5 \cdot 10^{-92}:\\
\;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\

\mathbf{elif}\;z \leq 4.3 \cdot 10^{+41}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.48000000000000009e103 or 4.30000000000000024e41 < z

    1. Initial program 46.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative46.3%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/76.4%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def76.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified76.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in t around inf 61.8%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    5. Step-by-step derivation
      1. div-sub61.8%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
      2. associate-*r/40.1%

        \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Simplified40.1%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    7. Taylor expanded in a around 0 39.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot \left(y - z\right)}{z}} \]
    8. Step-by-step derivation
      1. mul-1-neg39.1%

        \[\leadsto \color{blue}{-\frac{t \cdot \left(y - z\right)}{z}} \]
      2. associate-/l*58.3%

        \[\leadsto -\color{blue}{\frac{t}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac58.3%

        \[\leadsto \color{blue}{\frac{-t}{\frac{z}{y - z}}} \]
    9. Simplified58.3%

      \[\leadsto \color{blue}{\frac{-t}{\frac{z}{y - z}}} \]

    if -1.48000000000000009e103 < z < -8.50000000000000067e-92

    1. Initial program 86.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative86.4%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/86.4%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def86.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified86.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 59.8%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative59.8%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*55.6%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--55.6%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg55.6%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac55.6%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*59.8%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative59.8%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--59.8%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg59.8%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--59.8%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative59.8%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*55.6%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified55.6%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in y around -inf 43.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right)}{z}} \]
    8. Step-by-step derivation
      1. mul-1-neg43.7%

        \[\leadsto \color{blue}{-\frac{y \cdot \left(t - x\right)}{z}} \]
      2. associate-*l/43.8%

        \[\leadsto -\color{blue}{\frac{y}{z} \cdot \left(t - x\right)} \]
      3. distribute-rgt-neg-in43.8%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot \left(-\left(t - x\right)\right)} \]
    9. Simplified43.8%

      \[\leadsto \color{blue}{\frac{y}{z} \cdot \left(-\left(t - x\right)\right)} \]

    if -8.50000000000000067e-92 < z < 4.30000000000000024e41

    1. Initial program 90.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative90.7%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/96.8%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def96.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified96.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around 0 70.7%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a} + x} \]
    5. Step-by-step derivation
      1. +-commutative70.7%

        \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
      2. associate-/l*74.3%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified74.3%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in t around inf 62.4%

      \[\leadsto x + \frac{y}{\color{blue}{\frac{a}{t}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.48 \cdot 10^{+103}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-92}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+41}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \end{array} \]

Alternative 16: 50.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.22 \cdot 10^{+126}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -6.1 \cdot 10^{-92}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+41}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.22e+126)
   t
   (if (<= z -6.1e-92)
     (/ (* y (- x t)) z)
     (if (<= z 3e+41) (+ x (/ y (/ a t))) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.22e+126) {
		tmp = t;
	} else if (z <= -6.1e-92) {
		tmp = (y * (x - t)) / z;
	} else if (z <= 3e+41) {
		tmp = x + (y / (a / t));
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1.22d+126)) then
        tmp = t
    else if (z <= (-6.1d-92)) then
        tmp = (y * (x - t)) / z
    else if (z <= 3d+41) then
        tmp = x + (y / (a / t))
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.22e+126) {
		tmp = t;
	} else if (z <= -6.1e-92) {
		tmp = (y * (x - t)) / z;
	} else if (z <= 3e+41) {
		tmp = x + (y / (a / t));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.22e+126:
		tmp = t
	elif z <= -6.1e-92:
		tmp = (y * (x - t)) / z
	elif z <= 3e+41:
		tmp = x + (y / (a / t))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.22e+126)
		tmp = t;
	elseif (z <= -6.1e-92)
		tmp = Float64(Float64(y * Float64(x - t)) / z);
	elseif (z <= 3e+41)
		tmp = Float64(x + Float64(y / Float64(a / t)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.22e+126)
		tmp = t;
	elseif (z <= -6.1e-92)
		tmp = (y * (x - t)) / z;
	elseif (z <= 3e+41)
		tmp = x + (y / (a / t));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.22e+126], t, If[LessEqual[z, -6.1e-92], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 3e+41], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{+126}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -6.1 \cdot 10^{-92}:\\
\;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\

\mathbf{elif}\;z \leq 3 \cdot 10^{+41}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.21999999999999995e126 or 2.9999999999999998e41 < z

    1. Initial program 45.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative45.6%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/75.2%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def75.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified75.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 50.2%

      \[\leadsto \color{blue}{t} \]

    if -1.21999999999999995e126 < z < -6.09999999999999988e-92

    1. Initial program 83.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative83.8%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/87.8%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def87.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified87.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in y around -inf 45.3%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    5. Taylor expanded in a around 0 41.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right)}{z}} \]
    6. Step-by-step derivation
      1. mul-1-neg41.7%

        \[\leadsto \color{blue}{-\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Simplified41.7%

      \[\leadsto \color{blue}{-\frac{y \cdot \left(t - x\right)}{z}} \]

    if -6.09999999999999988e-92 < z < 2.9999999999999998e41

    1. Initial program 90.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative90.7%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/96.8%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def96.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified96.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around 0 70.7%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a} + x} \]
    5. Step-by-step derivation
      1. +-commutative70.7%

        \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
      2. associate-/l*74.3%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified74.3%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in t around inf 62.4%

      \[\leadsto x + \frac{y}{\color{blue}{\frac{a}{t}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.22 \cdot 10^{+126}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -6.1 \cdot 10^{-92}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+41}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 17: 67.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{-33} \lor \neg \left(z \leq 6.1 \cdot 10^{-34}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -3.9e-33) (not (<= z 6.1e-34)))
   (* t (/ (- y z) (- a z)))
   (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -3.9e-33) || !(z <= 6.1e-34)) {
		tmp = t * ((y - z) / (a - z));
	} else {
		tmp = x + ((t - x) * (y / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-3.9d-33)) .or. (.not. (z <= 6.1d-34))) then
        tmp = t * ((y - z) / (a - z))
    else
        tmp = x + ((t - x) * (y / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -3.9e-33) || !(z <= 6.1e-34)) {
		tmp = t * ((y - z) / (a - z));
	} else {
		tmp = x + ((t - x) * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -3.9e-33) or not (z <= 6.1e-34):
		tmp = t * ((y - z) / (a - z))
	else:
		tmp = x + ((t - x) * (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -3.9e-33) || !(z <= 6.1e-34))
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	else
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -3.9e-33) || ~((z <= 6.1e-34)))
		tmp = t * ((y - z) / (a - z));
	else
		tmp = x + ((t - x) * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.9e-33], N[Not[LessEqual[z, 6.1e-34]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{-33} \lor \neg \left(z \leq 6.1 \cdot 10^{-34}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.89999999999999974e-33 or 6.0999999999999998e-34 < z

    1. Initial program 58.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative58.3%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/79.9%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def79.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified79.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in t around inf 56.9%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    5. Step-by-step derivation
      1. div-sub56.9%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    6. Simplified56.9%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if -3.89999999999999974e-33 < z < 6.0999999999999998e-34

    1. Initial program 92.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/96.7%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified96.7%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 80.1%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification66.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{-33} \lor \neg \left(z \leq 6.1 \cdot 10^{-34}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]

Alternative 18: 70.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.1 \cdot 10^{-34} \lor \neg \left(z \leq 2.3 \cdot 10^{-22}\right):\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -6.1e-34) (not (<= z 2.3e-22)))
   (+ t (* (/ y z) (- x t)))
   (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -6.1e-34) || !(z <= 2.3e-22)) {
		tmp = t + ((y / z) * (x - t));
	} else {
		tmp = x + ((t - x) * (y / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-6.1d-34)) .or. (.not. (z <= 2.3d-22))) then
        tmp = t + ((y / z) * (x - t))
    else
        tmp = x + ((t - x) * (y / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -6.1e-34) || !(z <= 2.3e-22)) {
		tmp = t + ((y / z) * (x - t));
	} else {
		tmp = x + ((t - x) * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -6.1e-34) or not (z <= 2.3e-22):
		tmp = t + ((y / z) * (x - t))
	else:
		tmp = x + ((t - x) * (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -6.1e-34) || !(z <= 2.3e-22))
		tmp = Float64(t + Float64(Float64(y / z) * Float64(x - t)));
	else
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -6.1e-34) || ~((z <= 2.3e-22)))
		tmp = t + ((y / z) * (x - t));
	else
		tmp = x + ((t - x) * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.1e-34], N[Not[LessEqual[z, 2.3e-22]], $MachinePrecision]], N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.1 \cdot 10^{-34} \lor \neg \left(z \leq 2.3 \cdot 10^{-22}\right):\\
\;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\

\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.0999999999999998e-34 or 2.2999999999999998e-22 < z

    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. associate-*l/80.0%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def80.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified80.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 67.2%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative67.2%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*72.6%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--72.6%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg72.6%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac72.6%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*67.2%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative67.2%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--67.0%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg67.0%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--67.2%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative67.2%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*72.6%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified72.6%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in y around inf 64.0%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    8. Step-by-step derivation
      1. associate-*l/70.4%

        \[\leadsto t - \color{blue}{\frac{y}{z} \cdot \left(t - x\right)} \]
    9. Simplified70.4%

      \[\leadsto t - \color{blue}{\frac{y}{z} \cdot \left(t - x\right)} \]

    if -6.0999999999999998e-34 < z < 2.2999999999999998e-22

    1. Initial program 90.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/96.0%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified96.0%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 79.0%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification74.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.1 \cdot 10^{-34} \lor \neg \left(z \leq 2.3 \cdot 10^{-22}\right):\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]

Alternative 19: 47.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-34}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+239}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.95e+125)
   t
   (if (<= z 9.2e-34) (* x (- 1.0 (/ y a))) (if (<= z 6e+239) (+ x t) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.95e+125) {
		tmp = t;
	} else if (z <= 9.2e-34) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 6e+239) {
		tmp = x + t;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1.95d+125)) then
        tmp = t
    else if (z <= 9.2d-34) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 6d+239) then
        tmp = x + t
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.95e+125) {
		tmp = t;
	} else if (z <= 9.2e-34) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 6e+239) {
		tmp = x + t;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.95e+125:
		tmp = t
	elif z <= 9.2e-34:
		tmp = x * (1.0 - (y / a))
	elif z <= 6e+239:
		tmp = x + t
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.95e+125)
		tmp = t;
	elseif (z <= 9.2e-34)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 6e+239)
		tmp = Float64(x + t);
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.95e+125)
		tmp = t;
	elseif (z <= 9.2e-34)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 6e+239)
		tmp = x + t;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.95e+125], t, If[LessEqual[z, 9.2e-34], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+239], N[(x + t), $MachinePrecision], t]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+125}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 9.2 \cdot 10^{-34}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

\mathbf{elif}\;z \leq 6 \cdot 10^{+239}:\\
\;\;\;\;x + t\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.9500000000000001e125 or 5.9999999999999997e239 < z

    1. Initial program 30.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative30.0%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/65.6%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def65.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified65.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 60.4%

      \[\leadsto \color{blue}{t} \]

    if -1.9500000000000001e125 < z < 9.20000000000000045e-34

    1. Initial program 90.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative90.0%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/94.6%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def94.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified94.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around 0 64.1%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a} + x} \]
    5. Step-by-step derivation
      1. +-commutative64.1%

        \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
      2. associate-/l*66.1%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified66.1%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in t around 0 50.6%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{y \cdot x}{a}} \]
    8. Step-by-step derivation
      1. mul-1-neg50.6%

        \[\leadsto x + \color{blue}{\left(-\frac{y \cdot x}{a}\right)} \]
      2. associate-*l/54.5%

        \[\leadsto x + \left(-\color{blue}{\frac{y}{a} \cdot x}\right) \]
      3. *-commutative54.5%

        \[\leadsto x + \left(-\color{blue}{x \cdot \frac{y}{a}}\right) \]
      4. distribute-rgt-neg-in54.5%

        \[\leadsto x + \color{blue}{x \cdot \left(-\frac{y}{a}\right)} \]
    9. Simplified54.5%

      \[\leadsto x + \color{blue}{x \cdot \left(-\frac{y}{a}\right)} \]
    10. Taylor expanded in x around 0 54.5%

      \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{y}{a}\right) \cdot x} \]
    11. Step-by-step derivation
      1. mul-1-neg54.5%

        \[\leadsto \left(1 + \color{blue}{\left(-\frac{y}{a}\right)}\right) \cdot x \]
      2. sub-neg54.5%

        \[\leadsto \color{blue}{\left(1 - \frac{y}{a}\right)} \cdot x \]
      3. *-commutative54.5%

        \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)} \]
    12. Simplified54.5%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)} \]

    if 9.20000000000000045e-34 < z < 5.9999999999999997e239

    1. Initial program 66.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative66.2%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/86.4%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def86.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified86.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef86.4%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right) + x} \]
      2. associate-*l/66.2%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} + x \]
      3. associate-*r/83.3%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} + x \]
    5. Applied egg-rr83.3%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
    6. Taylor expanded in t around inf 62.6%

      \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} + x \]
    7. Taylor expanded in z around inf 43.2%

      \[\leadsto \color{blue}{t} + x \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-34}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+239}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 20: 52.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+42}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.25e+125) t (if (<= z 1.05e+42) (+ x (* t (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.25e+125) {
		tmp = t;
	} else if (z <= 1.05e+42) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1.25d+125)) then
        tmp = t
    else if (z <= 1.05d+42) then
        tmp = x + (t * (y / a))
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.25e+125) {
		tmp = t;
	} else if (z <= 1.05e+42) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.25e+125:
		tmp = t
	elif z <= 1.05e+42:
		tmp = x + (t * (y / a))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.25e+125)
		tmp = t;
	elseif (z <= 1.05e+42)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.25e+125)
		tmp = t;
	elseif (z <= 1.05e+42)
		tmp = x + (t * (y / a));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.25e+125], t, If[LessEqual[z, 1.05e+42], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+125}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 1.05 \cdot 10^{+42}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.24999999999999991e125 or 1.04999999999999998e42 < z

    1. Initial program 45.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative45.6%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/75.2%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def75.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified75.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 50.2%

      \[\leadsto \color{blue}{t} \]

    if -1.24999999999999991e125 < z < 1.04999999999999998e42

    1. Initial program 88.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative88.5%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/93.9%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def93.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified93.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around 0 60.5%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a} + x} \]
    5. Step-by-step derivation
      1. +-commutative60.5%

        \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
      2. associate-/l*62.9%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified62.9%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in t around inf 51.9%

      \[\leadsto x + \color{blue}{\frac{y \cdot t}{a}} \]
    8. Step-by-step derivation
      1. associate-*l/53.0%

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot t} \]
      2. *-commutative53.0%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified53.0%

      \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+42}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 21: 51.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+42}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.2e+125) t (if (<= z 1.5e+42) (+ x (/ y (/ a t))) t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.2e+125) {
		tmp = t;
	} else if (z <= 1.5e+42) {
		tmp = x + (y / (a / t));
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-3.2d+125)) then
        tmp = t
    else if (z <= 1.5d+42) then
        tmp = x + (y / (a / t))
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.2e+125) {
		tmp = t;
	} else if (z <= 1.5e+42) {
		tmp = x + (y / (a / t));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.2e+125:
		tmp = t
	elif z <= 1.5e+42:
		tmp = x + (y / (a / t))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.2e+125)
		tmp = t;
	elseif (z <= 1.5e+42)
		tmp = Float64(x + Float64(y / Float64(a / t)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.2e+125)
		tmp = t;
	elseif (z <= 1.5e+42)
		tmp = x + (y / (a / t));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+125], t, If[LessEqual[z, 1.5e+42], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+125}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 1.5 \cdot 10^{+42}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.19999999999999983e125 or 1.50000000000000014e42 < z

    1. Initial program 45.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative45.6%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/75.2%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def75.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified75.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 50.2%

      \[\leadsto \color{blue}{t} \]

    if -3.19999999999999983e125 < z < 1.50000000000000014e42

    1. Initial program 88.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative88.5%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/93.9%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def93.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified93.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around 0 60.5%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a} + x} \]
    5. Step-by-step derivation
      1. +-commutative60.5%

        \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
      2. associate-/l*62.9%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified62.9%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
    7. Taylor expanded in t around inf 53.0%

      \[\leadsto x + \frac{y}{\color{blue}{\frac{a}{t}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+42}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 22: 38.0% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-115}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+240}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.5e+125) t (if (<= z 5.2e-115) x (if (<= z 2.7e+240) (+ x t) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.5e+125) {
		tmp = t;
	} else if (z <= 5.2e-115) {
		tmp = x;
	} else if (z <= 2.7e+240) {
		tmp = x + t;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-2.5d+125)) then
        tmp = t
    else if (z <= 5.2d-115) then
        tmp = x
    else if (z <= 2.7d+240) then
        tmp = x + t
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.5e+125) {
		tmp = t;
	} else if (z <= 5.2e-115) {
		tmp = x;
	} else if (z <= 2.7e+240) {
		tmp = x + t;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.5e+125:
		tmp = t
	elif z <= 5.2e-115:
		tmp = x
	elif z <= 2.7e+240:
		tmp = x + t
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.5e+125)
		tmp = t;
	elseif (z <= 5.2e-115)
		tmp = x;
	elseif (z <= 2.7e+240)
		tmp = Float64(x + t);
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2.5e+125)
		tmp = t;
	elseif (z <= 5.2e-115)
		tmp = x;
	elseif (z <= 2.7e+240)
		tmp = x + t;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.5e+125], t, If[LessEqual[z, 5.2e-115], x, If[LessEqual[z, 2.7e+240], N[(x + t), $MachinePrecision], t]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+125}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 5.2 \cdot 10^{-115}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.7 \cdot 10^{+240}:\\
\;\;\;\;x + t\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.49999999999999981e125 or 2.6999999999999999e240 < z

    1. Initial program 30.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative30.0%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/65.6%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def65.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified65.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 60.4%

      \[\leadsto \color{blue}{t} \]

    if -2.49999999999999981e125 < z < 5.20000000000000008e-115

    1. Initial program 89.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative89.8%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/93.8%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def93.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified93.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in a around inf 37.6%

      \[\leadsto \color{blue}{x} \]

    if 5.20000000000000008e-115 < z < 2.6999999999999999e240

    1. Initial program 72.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative72.6%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/89.9%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def89.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified89.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef89.9%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right) + x} \]
      2. associate-*l/72.6%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} + x \]
      3. associate-*r/87.6%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} + x \]
    5. Applied egg-rr87.6%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
    6. Taylor expanded in t around inf 67.8%

      \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} + x \]
    7. Taylor expanded in z around inf 42.5%

      \[\leadsto \color{blue}{t} + x \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+125}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-115}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+240}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 23: 37.6% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.55 \cdot 10^{+128}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-37}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.55e+128) t (if (<= z 1.6e-37) x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.55e+128) {
		tmp = t;
	} else if (z <= 1.6e-37) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-2.55d+128)) then
        tmp = t
    else if (z <= 1.6d-37) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.55e+128) {
		tmp = t;
	} else if (z <= 1.6e-37) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.55e+128:
		tmp = t
	elif z <= 1.6e-37:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.55e+128)
		tmp = t;
	elseif (z <= 1.6e-37)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2.55e+128)
		tmp = t;
	elseif (z <= 1.6e-37)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.55e+128], t, If[LessEqual[z, 1.6e-37], x, t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.55 \cdot 10^{+128}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-37}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.5499999999999999e128 or 1.5999999999999999e-37 < z

    1. Initial program 49.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative49.1%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/76.9%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def76.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified76.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 46.1%

      \[\leadsto \color{blue}{t} \]

    if -2.5499999999999999e128 < z < 1.5999999999999999e-37

    1. Initial program 90.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative90.5%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/94.6%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def94.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified94.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in a around inf 38.5%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.55 \cdot 10^{+128}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-37}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 24: 2.8% accurate, 13.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
def code(x, y, z, t, a):
	return 0.0
function code(x, y, z, t, a)
	return 0.0
end
function tmp = code(x, y, z, t, a)
	tmp = 0.0;
end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  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. associate-*r/82.0%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} + x \]
    3. fma-def82.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)} \]
  3. Simplified82.0%

    \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)} \]
  4. Taylor expanded in t around 0 43.3%

    \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-1 \cdot \frac{x}{a - z}}, x\right) \]
  5. Step-by-step derivation
    1. neg-mul-143.3%

      \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-\frac{x}{a - z}}, x\right) \]
    2. distribute-neg-frac43.3%

      \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{-x}{a - z}}, x\right) \]
  6. Simplified43.3%

    \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{-x}{a - z}}, x\right) \]
  7. Taylor expanded in z around inf 2.8%

    \[\leadsto \color{blue}{-1 \cdot x + x} \]
  8. Step-by-step derivation
    1. mul-1-neg2.8%

      \[\leadsto \color{blue}{\left(-x\right)} + x \]
    2. +-commutative2.8%

      \[\leadsto \color{blue}{x + \left(-x\right)} \]
    3. sub-neg2.8%

      \[\leadsto \color{blue}{x - x} \]
    4. +-inverses2.8%

      \[\leadsto \color{blue}{0} \]
  9. Simplified2.8%

    \[\leadsto \color{blue}{0} \]
  10. Final simplification2.8%

    \[\leadsto 0 \]

Alternative 25: 24.9% 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 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. associate-*l/86.7%

      \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
    3. fma-def86.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
  3. Simplified86.7%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
  4. Taylor expanded in z around inf 25.7%

    \[\leadsto \color{blue}{t} \]
  5. Final simplification25.7%

    \[\leadsto t \]

Developer target: 83.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- t (* (/ y z) (- t x)))))
   (if (< z -1.2536131056095036e+188)
     t_1
     (if (< z 4.446702369113811e+64)
       (+ x (/ (- y z) (/ (- a z) (- t x))))
       t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t - ((y / z) * (t - x))
    if (z < (-1.2536131056095036d+188)) then
        tmp = t_1
    else if (z < 4.446702369113811d+64) then
        tmp = x + ((y - z) / ((a - z) / (t - x)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t - ((y / z) * (t - x))
	tmp = 0
	if z < -1.2536131056095036e+188:
		tmp = t_1
	elif z < 4.446702369113811e+64:
		tmp = x + ((y - z) / ((a - z) / (t - x)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x)))
	tmp = 0.0
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t - ((y / z) * (t - x));
	tmp = 0.0;
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023230 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

  (+ x (/ (* (- y z) (- t x)) (- a z))))