Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.9% → 89.4%
Time: 24.5s
Alternatives: 23
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 89.4% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t_2 \leq 10^{-159}:\\
\;\;\;\;t + \frac{1}{z} \cdot \frac{x - t}{\frac{1}{y - a}}\\

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


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

    1. Initial program 92.0%

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

    if -2e-281 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999989e-160

    1. Initial program 3.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity87.6%

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

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

        \[\leadsto t - \color{blue}{\frac{1}{z} \cdot \frac{t - x}{\frac{1}{y - a}}} \]
    6. Applied egg-rr93.6%

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

    if 9.99999999999999989e-160 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 95.9%

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

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

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

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

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

Alternative 2: 89.4% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 94.2%

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

    if -2e-281 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999989e-160

    1. Initial program 3.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity87.6%

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

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

        \[\leadsto t - \color{blue}{\frac{1}{z} \cdot \frac{t - x}{\frac{1}{y - a}}} \]
    6. Applied egg-rr93.6%

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

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

Alternative 3: 90.7% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 94.2%

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

    if -2e-281 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999989e-160

    1. Initial program 3.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 89.4% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 94.2%

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

    if -2e-281 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999989e-160

    1. Initial program 3.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    5. Step-by-step derivation
      1. clear-num87.5%

        \[\leadsto t - \color{blue}{\frac{1}{\frac{\frac{z}{y - a}}{t - x}}} \]
      2. inv-pow87.5%

        \[\leadsto t - \color{blue}{{\left(\frac{\frac{z}{y - a}}{t - x}\right)}^{-1}} \]
    6. Applied egg-rr87.5%

      \[\leadsto t - \color{blue}{{\left(\frac{\frac{z}{y - a}}{t - x}\right)}^{-1}} \]
    7. Step-by-step derivation
      1. unpow-187.5%

        \[\leadsto t - \color{blue}{\frac{1}{\frac{\frac{z}{y - a}}{t - x}}} \]
      2. associate-/l/93.4%

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

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

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

Alternative 5: 37.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a}\\ \mathbf{if}\;z \leq -9 \cdot 10^{+123}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{+53}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-147}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-233}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-262}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{-35}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+146}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) a))))
   (if (<= z -9e+123)
     t
     (if (<= z -9.5e+53)
       (* x (/ (- y a) z))
       (if (<= z -4.8e-147)
         t_1
         (if (<= z -1.7e-233)
           x
           (if (<= z -9e-262)
             (* t (/ y a))
             (if (<= z 2.35e-35) x (if (<= z 1.3e+146) t_1 t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / a);
	double tmp;
	if (z <= -9e+123) {
		tmp = t;
	} else if (z <= -9.5e+53) {
		tmp = x * ((y - a) / z);
	} else if (z <= -4.8e-147) {
		tmp = t_1;
	} else if (z <= -1.7e-233) {
		tmp = x;
	} else if (z <= -9e-262) {
		tmp = t * (y / a);
	} else if (z <= 2.35e-35) {
		tmp = x;
	} else if (z <= 1.3e+146) {
		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 = t * ((y - z) / a)
    if (z <= (-9d+123)) then
        tmp = t
    else if (z <= (-9.5d+53)) then
        tmp = x * ((y - a) / z)
    else if (z <= (-4.8d-147)) then
        tmp = t_1
    else if (z <= (-1.7d-233)) then
        tmp = x
    else if (z <= (-9d-262)) then
        tmp = t * (y / a)
    else if (z <= 2.35d-35) then
        tmp = x
    else if (z <= 1.3d+146) 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 = t * ((y - z) / a);
	double tmp;
	if (z <= -9e+123) {
		tmp = t;
	} else if (z <= -9.5e+53) {
		tmp = x * ((y - a) / z);
	} else if (z <= -4.8e-147) {
		tmp = t_1;
	} else if (z <= -1.7e-233) {
		tmp = x;
	} else if (z <= -9e-262) {
		tmp = t * (y / a);
	} else if (z <= 2.35e-35) {
		tmp = x;
	} else if (z <= 1.3e+146) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / a)
	tmp = 0
	if z <= -9e+123:
		tmp = t
	elif z <= -9.5e+53:
		tmp = x * ((y - a) / z)
	elif z <= -4.8e-147:
		tmp = t_1
	elif z <= -1.7e-233:
		tmp = x
	elif z <= -9e-262:
		tmp = t * (y / a)
	elif z <= 2.35e-35:
		tmp = x
	elif z <= 1.3e+146:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / a))
	tmp = 0.0
	if (z <= -9e+123)
		tmp = t;
	elseif (z <= -9.5e+53)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= -4.8e-147)
		tmp = t_1;
	elseif (z <= -1.7e-233)
		tmp = x;
	elseif (z <= -9e-262)
		tmp = Float64(t * Float64(y / a));
	elseif (z <= 2.35e-35)
		tmp = x;
	elseif (z <= 1.3e+146)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / a);
	tmp = 0.0;
	if (z <= -9e+123)
		tmp = t;
	elseif (z <= -9.5e+53)
		tmp = x * ((y - a) / z);
	elseif (z <= -4.8e-147)
		tmp = t_1;
	elseif (z <= -1.7e-233)
		tmp = x;
	elseif (z <= -9e-262)
		tmp = t * (y / a);
	elseif (z <= 2.35e-35)
		tmp = x;
	elseif (z <= 1.3e+146)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+123], t, If[LessEqual[z, -9.5e+53], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.8e-147], t$95$1, If[LessEqual[z, -1.7e-233], x, If[LessEqual[z, -9e-262], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.35e-35], x, If[LessEqual[z, 1.3e+146], t$95$1, t]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -4.8 \cdot 10^{-147}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;z \leq 2.35 \cdot 10^{-35}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+146}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -8.99999999999999965e123 or 1.30000000000000007e146 < z

    1. Initial program 62.2%

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

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

    if -8.99999999999999965e123 < z < -9.5000000000000006e53

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x \cdot \left(y - a\right)}{z}\right)} - 1} \]
      3. associate-/l*13.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{x}{\frac{z}{y - a}}}\right)} - 1 \]
    7. Applied egg-rr13.0%

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

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

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

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

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

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

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

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

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

    if -9.5000000000000006e53 < z < -4.79999999999999997e-147 or 2.35e-35 < z < 1.30000000000000007e146

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

    if -4.79999999999999997e-147 < z < -1.7000000000000001e-233 or -8.99999999999999997e-262 < z < 2.35e-35

    1. Initial program 96.4%

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

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

    if -1.7000000000000001e-233 < z < -8.99999999999999997e-262

    1. Initial program 89.5%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\frac{a}{y}}} \]
    6. Taylor expanded in t around 0 68.0%

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification48.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+123}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{+53}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-147}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-233}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-262}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{-35}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+146}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 6: 37.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a}\\ \mathbf{if}\;z \leq -3.6 \cdot 10^{+115}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-144}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-233}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-262}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{-36}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+146}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) a))))
   (if (<= z -3.6e+115)
     t
     (if (<= z -3.8e-144)
       t_1
       (if (<= z -2e-233)
         x
         (if (<= z -4.2e-262)
           (* t (/ y a))
           (if (<= z 7.6e-36) x (if (<= z 1.6e+146) t_1 t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / a);
	double tmp;
	if (z <= -3.6e+115) {
		tmp = t;
	} else if (z <= -3.8e-144) {
		tmp = t_1;
	} else if (z <= -2e-233) {
		tmp = x;
	} else if (z <= -4.2e-262) {
		tmp = t * (y / a);
	} else if (z <= 7.6e-36) {
		tmp = x;
	} else if (z <= 1.6e+146) {
		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 = t * ((y - z) / a)
    if (z <= (-3.6d+115)) then
        tmp = t
    else if (z <= (-3.8d-144)) then
        tmp = t_1
    else if (z <= (-2d-233)) then
        tmp = x
    else if (z <= (-4.2d-262)) then
        tmp = t * (y / a)
    else if (z <= 7.6d-36) then
        tmp = x
    else if (z <= 1.6d+146) 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 = t * ((y - z) / a);
	double tmp;
	if (z <= -3.6e+115) {
		tmp = t;
	} else if (z <= -3.8e-144) {
		tmp = t_1;
	} else if (z <= -2e-233) {
		tmp = x;
	} else if (z <= -4.2e-262) {
		tmp = t * (y / a);
	} else if (z <= 7.6e-36) {
		tmp = x;
	} else if (z <= 1.6e+146) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / a)
	tmp = 0
	if z <= -3.6e+115:
		tmp = t
	elif z <= -3.8e-144:
		tmp = t_1
	elif z <= -2e-233:
		tmp = x
	elif z <= -4.2e-262:
		tmp = t * (y / a)
	elif z <= 7.6e-36:
		tmp = x
	elif z <= 1.6e+146:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / a))
	tmp = 0.0
	if (z <= -3.6e+115)
		tmp = t;
	elseif (z <= -3.8e-144)
		tmp = t_1;
	elseif (z <= -2e-233)
		tmp = x;
	elseif (z <= -4.2e-262)
		tmp = Float64(t * Float64(y / a));
	elseif (z <= 7.6e-36)
		tmp = x;
	elseif (z <= 1.6e+146)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / a);
	tmp = 0.0;
	if (z <= -3.6e+115)
		tmp = t;
	elseif (z <= -3.8e-144)
		tmp = t_1;
	elseif (z <= -2e-233)
		tmp = x;
	elseif (z <= -4.2e-262)
		tmp = t * (y / a);
	elseif (z <= 7.6e-36)
		tmp = x;
	elseif (z <= 1.6e+146)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e+115], t, If[LessEqual[z, -3.8e-144], t$95$1, If[LessEqual[z, -2e-233], x, If[LessEqual[z, -4.2e-262], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e-36], x, If[LessEqual[z, 1.6e+146], t$95$1, t]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -3.8 \cdot 10^{-144}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2 \cdot 10^{-233}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 7.6 \cdot 10^{-36}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+146}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.6000000000000001e115 or 1.6e146 < z

    1. Initial program 61.3%

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

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

    if -3.6000000000000001e115 < z < -3.79999999999999993e-144 or 7.59999999999999942e-36 < z < 1.6e146

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

    if -3.79999999999999993e-144 < z < -1.99999999999999992e-233 or -4.1999999999999999e-262 < z < 7.59999999999999942e-36

    1. Initial program 96.4%

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

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

    if -1.99999999999999992e-233 < z < -4.1999999999999999e-262

    1. Initial program 89.5%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\frac{a}{y}}} \]
    6. Taylor expanded in t around 0 68.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+115}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-144}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-233}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-262}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{-36}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+146}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 7: 65.4% accurate, 0.7× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 1.25 \cdot 10^{+174}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9.9999999999999998e23 or 5.50000000000000018e-39 < z < 1.2499999999999999e174

    1. Initial program 72.9%

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

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

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

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

    if -9.9999999999999998e23 < z < -6.99999999999999991e-151

    1. Initial program 97.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/70.6%

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

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

    if -6.99999999999999991e-151 < z < 5.50000000000000018e-39

    1. Initial program 96.7%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/93.8%

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

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

    if 1.2499999999999999e174 < z

    1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+24}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-151}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-39}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+174}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t - x}{\frac{-z}{a}}\\ \end{array} \]

Alternative 8: 39.9% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 4.8 \cdot 10^{-36}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.09999999999999983e119 or 1.25e146 < z

    1. Initial program 62.2%

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

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

    if -2.09999999999999983e119 < z < -2.69999999999999984e45

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x \cdot \left(y - a\right)}{z}\right)} - 1} \]
      3. associate-/l*11.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{x}{\frac{z}{y - a}}}\right)} - 1 \]
    7. Applied egg-rr11.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    9. Simplified42.5%

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

    if -2.69999999999999984e45 < z < 8.50000000000000023e-195

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

    if 8.50000000000000023e-195 < z < 4.8e-36

    1. Initial program 90.5%

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

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

    if 4.8e-36 < z < 1.25e146

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+119}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{+45}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-195}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-36}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+146}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 9: 40.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+119}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{+45}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 10^{-192}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-38}:\\ \;\;\;\;x + \frac{x}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+146}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -8e+119)
   t
   (if (<= z -2.7e+45)
     (* x (/ (- y a) z))
     (if (<= z 1e-192)
       (* y (/ (- t x) a))
       (if (<= z 6.8e-38)
         (+ x (/ x (/ a z)))
         (if (<= z 1.2e+146) (* t (/ (- y z) a)) t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -8e+119) {
		tmp = t;
	} else if (z <= -2.7e+45) {
		tmp = x * ((y - a) / z);
	} else if (z <= 1e-192) {
		tmp = y * ((t - x) / a);
	} else if (z <= 6.8e-38) {
		tmp = x + (x / (a / z));
	} else if (z <= 1.2e+146) {
		tmp = t * ((y - z) / 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 <= (-8d+119)) then
        tmp = t
    else if (z <= (-2.7d+45)) then
        tmp = x * ((y - a) / z)
    else if (z <= 1d-192) then
        tmp = y * ((t - x) / a)
    else if (z <= 6.8d-38) then
        tmp = x + (x / (a / z))
    else if (z <= 1.2d+146) then
        tmp = t * ((y - z) / 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 <= -8e+119) {
		tmp = t;
	} else if (z <= -2.7e+45) {
		tmp = x * ((y - a) / z);
	} else if (z <= 1e-192) {
		tmp = y * ((t - x) / a);
	} else if (z <= 6.8e-38) {
		tmp = x + (x / (a / z));
	} else if (z <= 1.2e+146) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -8e+119:
		tmp = t
	elif z <= -2.7e+45:
		tmp = x * ((y - a) / z)
	elif z <= 1e-192:
		tmp = y * ((t - x) / a)
	elif z <= 6.8e-38:
		tmp = x + (x / (a / z))
	elif z <= 1.2e+146:
		tmp = t * ((y - z) / a)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -8e+119)
		tmp = t;
	elseif (z <= -2.7e+45)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= 1e-192)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 6.8e-38)
		tmp = Float64(x + Float64(x / Float64(a / z)));
	elseif (z <= 1.2e+146)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -8e+119)
		tmp = t;
	elseif (z <= -2.7e+45)
		tmp = x * ((y - a) / z);
	elseif (z <= 1e-192)
		tmp = y * ((t - x) / a);
	elseif (z <= 6.8e-38)
		tmp = x + (x / (a / z));
	elseif (z <= 1.2e+146)
		tmp = t * ((y - z) / a);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8e+119], t, If[LessEqual[z, -2.7e+45], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e-192], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e-38], N[(x + N[(x / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+146], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -7.99999999999999955e119 or 1.2000000000000001e146 < z

    1. Initial program 62.2%

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

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

    if -7.99999999999999955e119 < z < -2.69999999999999984e45

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x \cdot \left(y - a\right)}{z}\right)} - 1} \]
      3. associate-/l*11.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{x}{\frac{z}{y - a}}}\right)} - 1 \]
    7. Applied egg-rr11.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    9. Simplified42.5%

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

    if -2.69999999999999984e45 < z < 1.0000000000000001e-192

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

    if 1.0000000000000001e-192 < z < 6.8000000000000004e-38

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{x}{\frac{a}{z}}} \]
    10. Simplified51.9%

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

    if 6.8000000000000004e-38 < z < 1.2000000000000001e146

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+119}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{+45}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 10^{-192}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-38}:\\ \;\;\;\;x + \frac{x}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+146}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 10: 65.5% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+173}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.45000000000000015e24 or 1.20000000000000011e-41 < z < 7.5e173

    1. Initial program 72.9%

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

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

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

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

    if -2.45000000000000015e24 < z < -2.59999999999999999e-149

    1. Initial program 97.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/70.6%

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

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

    if -2.59999999999999999e-149 < z < 1.20000000000000011e-41

    1. Initial program 96.7%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/93.8%

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

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

    if 7.5e173 < z

    1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
    7. Simplified81.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.45 \cdot 10^{+24}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-149}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-41}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+173}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t - a \cdot \frac{x - t}{z}\\ \end{array} \]

Alternative 11: 46.9% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9.79999999999999992e119 or 3.70000000000000006e115 < z

    1. Initial program 61.6%

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

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

    if -9.79999999999999992e119 < z < -3.6e45

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x \cdot \left(y - a\right)}{z}\right)} - 1} \]
      3. associate-/l*11.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{x}{\frac{z}{y - a}}}\right)} - 1 \]
    7. Applied egg-rr11.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    9. Simplified42.5%

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

    if -3.6e45 < z < -2.55e-144

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

    if -2.55e-144 < z < 3.70000000000000006e115

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{y}}} \]
    10. Simplified60.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.8 \cdot 10^{+119}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{+45}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{-144}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{+115}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 12: 46.8% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.0000000000000001e119 or 4.29999999999999998e117 < z

    1. Initial program 61.6%

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

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

    if -7.0000000000000001e119 < z < -7.2e45

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x \cdot \left(y - a\right)}{z}\right)} - 1} \]
      3. associate-/l*11.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{x}{\frac{z}{y - a}}}\right)} - 1 \]
    7. Applied egg-rr11.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    9. Simplified42.5%

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

    if -7.2e45 < z < -8.5000000000000002e-147

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

    if -8.5000000000000002e-147 < z < 4.29999999999999998e117

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{y}}} \]
    10. Simplified60.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+119}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{+45}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-147}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+117}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 13: 62.4% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.0000000000000001e115 or 1.80000000000000003e148 < z

    1. Initial program 61.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
    7. Simplified74.0%

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

    if -8.0000000000000001e115 < z < -2.59999999999999999e-149

    1. Initial program 91.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/60.0%

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

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

    if -2.59999999999999999e-149 < z < 1.80000000000000003e148

    1. Initial program 90.3%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/79.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+115}:\\ \;\;\;\;t - a \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-149}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+148}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t - a \cdot \frac{x - t}{z}\\ \end{array} \]

Alternative 14: 69.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{-41} \lor \neg \left(a \leq 6.2 \cdot 10^{-122}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.00000000000000002e-41 or 6.1999999999999997e-122 < a

    1. Initial program 89.8%

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

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

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

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

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

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

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

    if -4.00000000000000002e-41 < a < 6.1999999999999997e-122

    1. Initial program 70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 73.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.1 \cdot 10^{-41} \lor \neg \left(a \leq 6.6 \cdot 10^{-122}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.10000000000000014e-41 or 6.59999999999999999e-122 < a

    1. Initial program 89.8%

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

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

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

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

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

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

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

    if -4.10000000000000014e-41 < a < 6.59999999999999999e-122

    1. Initial program 70.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 37.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{+114}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-28}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-233}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-262}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+146}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -8.2e+114)
   t
   (if (<= z -3.5e-28)
     (* x (/ y z))
     (if (<= z -1.75e-233)
       x
       (if (<= z -6.5e-262) (* t (/ y a)) (if (<= z 1.2e+146) x t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -8.2e+114) {
		tmp = t;
	} else if (z <= -3.5e-28) {
		tmp = x * (y / z);
	} else if (z <= -1.75e-233) {
		tmp = x;
	} else if (z <= -6.5e-262) {
		tmp = t * (y / a);
	} else if (z <= 1.2e+146) {
		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 <= (-8.2d+114)) then
        tmp = t
    else if (z <= (-3.5d-28)) then
        tmp = x * (y / z)
    else if (z <= (-1.75d-233)) then
        tmp = x
    else if (z <= (-6.5d-262)) then
        tmp = t * (y / a)
    else if (z <= 1.2d+146) 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 <= -8.2e+114) {
		tmp = t;
	} else if (z <= -3.5e-28) {
		tmp = x * (y / z);
	} else if (z <= -1.75e-233) {
		tmp = x;
	} else if (z <= -6.5e-262) {
		tmp = t * (y / a);
	} else if (z <= 1.2e+146) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -8.2e+114:
		tmp = t
	elif z <= -3.5e-28:
		tmp = x * (y / z)
	elif z <= -1.75e-233:
		tmp = x
	elif z <= -6.5e-262:
		tmp = t * (y / a)
	elif z <= 1.2e+146:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -8.2e+114)
		tmp = t;
	elseif (z <= -3.5e-28)
		tmp = Float64(x * Float64(y / z));
	elseif (z <= -1.75e-233)
		tmp = x;
	elseif (z <= -6.5e-262)
		tmp = Float64(t * Float64(y / a));
	elseif (z <= 1.2e+146)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -8.2e+114)
		tmp = t;
	elseif (z <= -3.5e-28)
		tmp = x * (y / z);
	elseif (z <= -1.75e-233)
		tmp = x;
	elseif (z <= -6.5e-262)
		tmp = t * (y / a);
	elseif (z <= 1.2e+146)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.2e+114], t, If[LessEqual[z, -3.5e-28], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.75e-233], x, If[LessEqual[z, -6.5e-262], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+146], x, t]]]]]
\begin{array}{l}

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.2000000000000001e114 or 1.2000000000000001e146 < z

    1. Initial program 61.9%

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

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

    if -8.2000000000000001e114 < z < -3.5e-28

    1. Initial program 83.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x \cdot \left(y - a\right)}{z}\right)} - 1} \]
      3. associate-/l*10.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{x}{\frac{z}{y - a}}}\right)} - 1 \]
    7. Applied egg-rr10.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    9. Simplified38.1%

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

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

    if -3.5e-28 < z < -1.74999999999999995e-233 or -6.5000000000000003e-262 < z < 1.2000000000000001e146

    1. Initial program 92.1%

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

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

    if -1.74999999999999995e-233 < z < -6.5000000000000003e-262

    1. Initial program 89.5%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\frac{a}{y}}} \]
    6. Taylor expanded in t around 0 68.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{+114}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-28}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-233}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-262}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+146}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 17: 36.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.00000000000000011e45 or 1.2000000000000001e146 < z

    1. Initial program 63.9%

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

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

    if -3.00000000000000011e45 < z < -9.1999999999999999e-149

    1. Initial program 97.4%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\frac{a}{y}}} \]
    6. Step-by-step derivation
      1. associate-/r/29.3%

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} \]
    7. Applied egg-rr29.3%

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

    if -9.1999999999999999e-149 < z < -1.74999999999999995e-233 or -8.79999999999999954e-262 < z < 1.2000000000000001e146

    1. Initial program 90.4%

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

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

    if -1.74999999999999995e-233 < z < -8.79999999999999954e-262

    1. Initial program 89.5%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\frac{a}{y}}} \]
    6. Taylor expanded in t around 0 68.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+45}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-149}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-233}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-262}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+146}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 18: 59.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{-38} \lor \neg \left(t \leq 3.2 \cdot 10^{-51}\right):\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.10000000000000013e-38 or 3.2e-51 < t

    1. Initial program 89.5%

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

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

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

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

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

    if -2.10000000000000013e-38 < t < 3.2e-51

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{y}}} \]
    10. Simplified58.9%

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

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

Alternative 19: 64.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -480000000:\\
\;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\

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

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


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

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.8e8 < z < 1.2000000000000001e146

    1. Initial program 91.7%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/74.5%

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

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

    if 1.2000000000000001e146 < z

    1. Initial program 58.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
    7. Simplified80.2%

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

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

Alternative 20: 45.0% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t \leq 3 \cdot 10^{-70}:\\
\;\;\;\;x - \frac{x}{\frac{a}{y}}\\

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


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

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

    if -9.5999999999999999e76 < t < 3.0000000000000001e-70

    1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.0000000000000001e-70 < t

    1. Initial program 90.1%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{z}{y - z}}} \]
    6. Step-by-step derivation
      1. neg-mul-155.2%

        \[\leadsto \frac{t}{\color{blue}{-\frac{z}{y - z}}} \]
      2. distribute-neg-frac55.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.6 \cdot 10^{+76}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-70}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{-z}{y - z}}\\ \end{array} \]

Alternative 21: 36.8% accurate, 1.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 3.9 \cdot 10^{+146}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.2e45 or 3.9e146 < z

    1. Initial program 63.9%

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

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

    if -7.2e45 < z < -2.09999999999999996e-261

    1. Initial program 97.1%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\frac{a}{y}}} \]
    6. Taylor expanded in t around 0 30.2%

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

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

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

    if -2.09999999999999996e-261 < z < 3.9e146

    1. Initial program 88.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+45}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-261}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+146}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 22: 38.3% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+33}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+146}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -7.2e+33) t (if (<= z 1.3e+146) x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -7.2e+33) {
		tmp = t;
	} else if (z <= 1.3e+146) {
		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 <= (-7.2d+33)) then
        tmp = t
    else if (z <= 1.3d+146) 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 <= -7.2e+33) {
		tmp = t;
	} else if (z <= 1.3e+146) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -7.2e+33:
		tmp = t
	elif z <= 1.3e+146:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -7.2e+33)
		tmp = t;
	elseif (z <= 1.3e+146)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -7.2e+33)
		tmp = t;
	elseif (z <= 1.3e+146)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.2e+33], t, If[LessEqual[z, 1.3e+146], x, t]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+146}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.2000000000000005e33 or 1.30000000000000007e146 < z

    1. Initial program 65.2%

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

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

    if -7.2000000000000005e33 < z < 1.30000000000000007e146

    1. Initial program 91.9%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+33}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+146}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 23: 25.4% 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 82.8%

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

    \[\leadsto \color{blue}{t} \]
  3. Final simplification22.9%

    \[\leadsto t \]

Reproduce

?
herbie shell --seed 2023322 
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
  :precision binary64
  (+ x (* (- y z) (/ (- t x) (- a z)))))