Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.2% → 95.1%
Time: 25.2s
Alternatives: 21
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 21 alternatives:

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

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

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

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

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

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


\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)))) < -9.9999999999999996e-281

    1. Initial program 91.8%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 88.4% accurate, 0.2× 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 -1 \cdot 10^{-208}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{-150}:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+294}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
   (if (<= t_1 -1e-208)
     t_1
     (if (<= t_1 2e-150)
       (- t (/ (* (- t x) (- y a)) z))
       (if (<= t_1 2e+294) t_1 (+ x (/ (* (- y z) (- t x)) (- a z))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_1 <= -1e-208) {
		tmp = t_1;
	} else if (t_1 <= 2e-150) {
		tmp = t - (((t - x) * (y - a)) / z);
	} else if (t_1 <= 2e+294) {
		tmp = t_1;
	} else {
		tmp = x + (((y - z) * (t - x)) / (a - z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + ((y - z) * ((t - x) / (a - z)))
    if (t_1 <= (-1d-208)) then
        tmp = t_1
    else if (t_1 <= 2d-150) then
        tmp = t - (((t - x) * (y - a)) / z)
    else if (t_1 <= 2d+294) then
        tmp = t_1
    else
        tmp = x + (((y - z) * (t - x)) / (a - z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_1 <= -1e-208) {
		tmp = t_1;
	} else if (t_1 <= 2e-150) {
		tmp = t - (((t - x) * (y - a)) / z);
	} else if (t_1 <= 2e+294) {
		tmp = t_1;
	} else {
		tmp = x + (((y - z) * (t - x)) / (a - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) * ((t - x) / (a - z)))
	tmp = 0
	if t_1 <= -1e-208:
		tmp = t_1
	elif t_1 <= 2e-150:
		tmp = t - (((t - x) * (y - a)) / z)
	elif t_1 <= 2e+294:
		tmp = t_1
	else:
		tmp = x + (((y - z) * (t - x)) / (a - z))
	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 <= -1e-208)
		tmp = t_1;
	elseif (t_1 <= 2e-150)
		tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z));
	elseif (t_1 <= 2e+294)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) * ((t - x) / (a - z)));
	tmp = 0.0;
	if (t_1 <= -1e-208)
		tmp = t_1;
	elseif (t_1 <= 2e-150)
		tmp = t - (((t - x) * (y - a)) / z);
	elseif (t_1 <= 2e+294)
		tmp = t_1;
	else
		tmp = x + (((y - z) * (t - x)) / (a - z));
	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[LessEqual[t$95$1, -1e-208], t$95$1, If[LessEqual[t$95$1, 2e-150], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+294], t$95$1, N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $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 -1 \cdot 10^{-208}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+294}:\\
\;\;\;\;t_1\\

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


\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)))) < -1.0000000000000001e-208 or 2.00000000000000001e-150 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.00000000000000013e294

    1. Initial program 95.7%

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

    if -1.0000000000000001e-208 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.00000000000000001e-150

    1. Initial program 12.3%

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

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

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

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

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

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

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

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

    1. Initial program 75.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -1 \cdot 10^{-208}:\\ \;\;\;\;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 2 \cdot 10^{-150}:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 2 \cdot 10^{+294}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \end{array} \]

Alternative 3: 95.1% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 88.1% 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 -1 \cdot 10^{-208} \lor \neg \left(t_1 \leq 2 \cdot 10^{-150}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
   (if (or (<= t_1 -1e-208) (not (<= t_1 2e-150)))
     t_1
     (- t (/ (* (- t x) (- y a)) z)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if ((t_1 <= -1e-208) || !(t_1 <= 2e-150)) {
		tmp = t_1;
	} else {
		tmp = t - (((t - x) * (y - a)) / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + ((y - z) * ((t - x) / (a - z)))
    if ((t_1 <= (-1d-208)) .or. (.not. (t_1 <= 2d-150))) then
        tmp = t_1
    else
        tmp = t - (((t - x) * (y - a)) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if ((t_1 <= -1e-208) || !(t_1 <= 2e-150)) {
		tmp = t_1;
	} else {
		tmp = t - (((t - x) * (y - a)) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) * ((t - x) / (a - z)))
	tmp = 0
	if (t_1 <= -1e-208) or not (t_1 <= 2e-150):
		tmp = t_1
	else:
		tmp = t - (((t - x) * (y - a)) / z)
	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 <= -1e-208) || !(t_1 <= 2e-150))
		tmp = t_1;
	else
		tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) * ((t - x) / (a - z)));
	tmp = 0.0;
	if ((t_1 <= -1e-208) || ~((t_1 <= 2e-150)))
		tmp = t_1;
	else
		tmp = t - (((t - x) * (y - a)) / z);
	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, -1e-208], N[Not[LessEqual[t$95$1, 2e-150]], $MachinePrecision]], t$95$1, N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $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 -1 \cdot 10^{-208} \lor \neg \left(t_1 \leq 2 \cdot 10^{-150}\right):\\
\;\;\;\;t_1\\

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


\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)))) < -1.0000000000000001e-208 or 2.00000000000000001e-150 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 93.9%

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

    if -1.0000000000000001e-208 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.00000000000000001e-150

    1. Initial program 12.3%

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.6%

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

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

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

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

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

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

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

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

Alternative 6: 69.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq 3.1 \cdot 10^{-117}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 6.5 \cdot 10^{+55}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -9.8000000000000006e23

    1. Initial program 88.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.8000000000000006e23 < a < 3.10000000000000011e-117 or 3.8500000000000001e-66 < a < 6.50000000000000027e55

    1. Initial program 75.2%

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

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

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

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

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

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

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

    if 3.10000000000000011e-117 < a < 3.8500000000000001e-66

    1. Initial program 92.8%

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

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

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

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

    if 6.50000000000000027e55 < a

    1. Initial program 92.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.8 \cdot 10^{+23}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-117}:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;a \leq 3.85 \cdot 10^{-66}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+55}:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 7: 41.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{-116}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 1.9 \cdot 10^{-282}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;x \leq 1.2 \cdot 10^{-14}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -8.4999999999999995e-116 or 1.2e-14 < x

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.4999999999999995e-116 < x < -1.94999999999999988e-267

    1. Initial program 85.2%

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

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

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

    if -1.94999999999999988e-267 < x < 1.89999999999999996e-282 or 1.01999999999999998e-162 < x < 1.2e-14

    1. Initial program 85.5%

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

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

    if 1.89999999999999996e-282 < x < 1.01999999999999998e-162

    1. Initial program 81.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{-116}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -1.95 \cdot 10^{-267}:\\ \;\;\;\;\frac{y \cdot t}{a - z}\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{-282}:\\ \;\;\;\;t\\ \mathbf{elif}\;x \leq 1.02 \cdot 10^{-162}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t}}\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{-14}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 8: 50.6% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -3.2 \cdot 10^{-151}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 0.0042:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.49999999999999989e30 < a < -3.20000000000000021e-151 or -6.80000000000000003e-195 < a < 0.00419999999999999974

    1. Initial program 76.8%

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

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

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

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

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

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

    if -3.20000000000000021e-151 < a < -6.80000000000000003e-195

    1. Initial program 81.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.5 \cdot 10^{+30}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-151}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-195}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 0.0042:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 9: 50.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -5.4 \cdot 10^{-115}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 136:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.50000000000000022e26 or 136 < a

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.50000000000000022e26 < a < -5.4e-115 or -3e-195 < a < 136

    1. Initial program 77.5%

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{z}{y - z}}} \]
    5. Simplified58.1%

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

    if -5.4e-115 < a < -3e-195

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{a - z}{x}}} \]
      3. distribute-neg-frac50.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.5 \cdot 10^{+26}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -5.4 \cdot 10^{-115}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-195}:\\ \;\;\;\;\frac{-y}{\frac{a - z}{x}}\\ \mathbf{elif}\;a \leq 136:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 10: 36.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -2.1 \cdot 10^{-115}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 2 \cdot 10^{-176}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.80000000000000025e23 or 6.5000000000000003e-10 < a

    1. Initial program 88.0%

      \[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 -5.80000000000000025e23 < a < -2.10000000000000002e-115 or -9.50000000000000023e-304 < a < 2e-176

    1. Initial program 78.3%

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

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

    if -2.10000000000000002e-115 < a < -9.50000000000000023e-304

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    10. Simplified44.8%

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

    if 2e-176 < a < 6.5000000000000003e-10

    1. Initial program 80.8%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    5. Simplified25.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-115}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-304}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-176}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-10}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 39.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;x \leq -1.16 \cdot 10^{-113}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 1.36 \cdot 10^{-14}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.15999999999999999e-113 or 1.36e-14 < x

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15999999999999999e-113 < x < -2.00000000000000003e-251

    1. Initial program 85.2%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    5. Simplified41.2%

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

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

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

    if -2.00000000000000003e-251 < x < 1.36e-14

    1. Initial program 84.3%

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification47.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.16 \cdot 10^{-113}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-251}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq 1.36 \cdot 10^{-14}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 12: 40.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;x \leq -5.5 \cdot 10^{-112}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 3.5 \cdot 10^{-12}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.5e-112 or 3.5e-12 < x

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.5e-112 < x < 2.55e-303

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.55e-303 < x < 3.5e-12

    1. Initial program 82.7%

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{-112}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq 2.55 \cdot 10^{-303}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-12}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 13: 41.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{-116}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 2.7 \cdot 10^{-12}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.7999999999999999e-116 or 2.6999999999999998e-12 < x

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7999999999999999e-116 < x < 1.19999999999999999e-294

    1. Initial program 86.4%

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

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

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

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

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

    if 1.19999999999999999e-294 < x < 2.6999999999999998e-12

    1. Initial program 83.2%

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.8 \cdot 10^{-116}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{-294}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{-12}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 14: 41.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;x \leq -4.4 \cdot 10^{-111}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 1.25 \cdot 10^{-12}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.4e-111 or 1.24999999999999992e-12 < x

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.4e-111 < x < 1.40000000000000011e-162

    1. Initial program 85.6%

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

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

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

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

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

    if 1.40000000000000011e-162 < x < 1.24999999999999992e-12

    1. Initial program 82.4%

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification49.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.4 \cdot 10^{-111}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-162}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t}}\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{-12}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 15: 61.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{+89} \lor \neg \left(x \leq 8 \cdot 10^{+80}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.90000000000000011e89 or 8e80 < x

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.90000000000000011e89 < x < 8e80

    1. Initial program 84.2%

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

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

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

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

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

Alternative 16: 65.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{-14} \lor \neg \left(z \leq 7 \cdot 10^{+130}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.6999999999999999e-14 or 7.0000000000000002e130 < z

    1. Initial program 68.0%

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

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

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

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

    if -2.6999999999999999e-14 < z < 7.0000000000000002e130

    1. Initial program 91.4%

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

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

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

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

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

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

Alternative 17: 66.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.08 \cdot 10^{-13} \lor \neg \left(z \leq 2.5 \cdot 10^{+130}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.0799999999999999e-13 or 2.4999999999999998e130 < z

    1. Initial program 68.0%

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

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

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

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

    if -1.0799999999999999e-13 < z < 2.4999999999999998e130

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 37.4% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 1.9 \cdot 10^{-176}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.90000000000000013e23 or 3.3999999999999999e-11 < a

    1. Initial program 88.0%

      \[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 -2.90000000000000013e23 < a < 1.90000000000000006e-176

    1. Initial program 75.7%

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

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

    if 1.90000000000000006e-176 < a < 3.3999999999999999e-11

    1. Initial program 80.8%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    5. Simplified25.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-176}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-11}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 19: 38.8% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;a \leq 2.8 \cdot 10^{-13}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.3e20 or 2.8000000000000002e-13 < a

    1. Initial program 88.1%

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

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

    if -5.3e20 < a < 2.8000000000000002e-13

    1. Initial program 77.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.3 \cdot 10^{+20}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-13}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 20: 2.8% accurate, 13.0× speedup?

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

\\
0
\end{array}
Derivation
  1. Initial program 82.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \left(-\color{blue}{\left(-\frac{\left(y - z\right) \cdot x}{z}\right)}\right) \]
    3. remove-double-neg14.2%

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

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

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

    \[\leadsto \color{blue}{-1 \cdot x + x} \]
  9. Step-by-step derivation
    1. distribute-lft1-in2.7%

      \[\leadsto \color{blue}{\left(-1 + 1\right) \cdot x} \]
    2. metadata-eval2.7%

      \[\leadsto \color{blue}{0} \cdot x \]
    3. mul0-lft2.7%

      \[\leadsto \color{blue}{0} \]
  10. Simplified2.7%

    \[\leadsto \color{blue}{0} \]
  11. Final simplification2.7%

    \[\leadsto 0 \]

Alternative 21: 25.2% 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.4%

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

    \[\leadsto \color{blue}{t} \]
  3. Final simplification23.1%

    \[\leadsto t \]

Reproduce

?
herbie shell --seed 2023274 
(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)))))