Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.2% → 94.7%
Time: 13.0s
Alternatives: 17
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 17 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: 94.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-294}:\\ \;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{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-294)
     (+ x (/ (- t x) (/ (- a z) (- y z))))
     (if (<= t_1 0.0)
       (+ t (* x (/ (- y a) z)))
       (+ x (* (- t x) (/ (- y z) (- 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-294) {
		tmp = x + ((t - x) / ((a - z) / (y - z)));
	} else if (t_1 <= 0.0) {
		tmp = t + (x * ((y - a) / z));
	} else {
		tmp = x + ((t - x) * ((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) :: t_1
    real(8) :: tmp
    t_1 = x + ((y - z) * ((t - x) / (a - z)))
    if (t_1 <= (-1d-294)) then
        tmp = x + ((t - x) / ((a - z) / (y - z)))
    else if (t_1 <= 0.0d0) then
        tmp = t + (x * ((y - a) / z))
    else
        tmp = x + ((t - x) * ((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 t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_1 <= -1e-294) {
		tmp = x + ((t - x) / ((a - z) / (y - z)));
	} else if (t_1 <= 0.0) {
		tmp = t + (x * ((y - a) / z));
	} else {
		tmp = x + ((t - x) * ((y - z) / (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-294:
		tmp = x + ((t - x) / ((a - z) / (y - z)))
	elif t_1 <= 0.0:
		tmp = t + (x * ((y - a) / z))
	else:
		tmp = x + ((t - x) * ((y - z) / (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-294)
		tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z))));
	elseif (t_1 <= 0.0)
		tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z)));
	else
		tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / 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-294)
		tmp = x + ((t - x) / ((a - z) / (y - z)));
	elseif (t_1 <= 0.0)
		tmp = t + (x * ((y - a) / z));
	else
		tmp = x + ((t - x) * ((y - z) / (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-294], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{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.00000000000000002e-294

    1. Initial program 91.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\color{blue}{\frac{a - z}{t - x}}}\right)\right) \]
      3. div-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\left(a - z\right) \cdot \color{blue}{\frac{1}{t - x}}}\right)\right) \]
      4. times-fracN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \color{blue}{\frac{1}{\frac{1}{t - x}}}\right)\right) \]
      5. flip--N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}}}\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{t + x}{\color{blue}{t \cdot t - x \cdot x}}}\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}\right)\right) \]
      8. flip--N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \left(t - \color{blue}{x}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y - z}{a - z}\right), \color{blue}{\left(t - x\right)}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(y - z\right), \left(a - z\right)\right), \left(\color{blue}{t} - x\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(a - z\right)\right), \left(t - x\right)\right)\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \left(t - x\right)\right)\right) \]
      13. --lowering--.f6495.7%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right)\right) \]
    4. Applied egg-rr95.7%

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

        \[\leadsto \frac{y - z}{a - z} \cdot \left(t - x\right) + \color{blue}{x} \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{y - z}{a - z} \cdot \left(t - x\right)\right), \color{blue}{x}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(t - x\right) \cdot \frac{y - z}{a - z}\right), x\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(t - x\right) \cdot \frac{1}{\frac{a - z}{y - z}}\right), x\right) \]
      5. un-div-invN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{t - x}{\frac{a - z}{y - z}}\right), x\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(t - x\right), \left(\frac{a - z}{y - z}\right)\right), x\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{a - z}{y - z}\right)\right), x\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(a - z\right), \left(y - z\right)\right)\right), x\right) \]
      9. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, z\right), \left(y - z\right)\right)\right), x\right) \]
      10. --lowering--.f6496.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, z\right), \mathsf{\_.f64}\left(y, z\right)\right)\right), x\right) \]
    6. Applied egg-rr96.3%

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

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

    1. Initial program 3.1%

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

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

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

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

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

        \[\leadsto t + \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) \]
      5. unsub-negN/A

        \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)}\right) \]
      7. distribute-rgt-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\left(t - x\right) \cdot \color{blue}{\frac{y - a}{z}}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\left(t - x\right), \color{blue}{\left(\frac{y - a}{z}\right)}\right)\right) \]
      10. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y - a}}{z}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(y - a\right), \color{blue}{z}\right)\right)\right) \]
      12. --lowering--.f64100.0%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, a\right), z\right)\right)\right) \]
    5. Simplified100.0%

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

      \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(-1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right)}\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(\frac{x \cdot \left(y - a\right)}{z}\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(x \cdot \frac{y - a}{z}\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y - a}{z}\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \left(-1 \cdot \color{blue}{\frac{y - a}{z}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y - a}{z}\right)}\right)\right) \]
      6. associate-*r/N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot \left(y - a\right)}{\color{blue}{z}}\right)\right)\right) \]
      7. distribute-lft-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y - -1 \cdot a}{z}\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(-1 \cdot a\right)\right)}{z}\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)\right)}{z}\right)\right)\right) \]
      10. remove-double-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + a}{z}\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{a + -1 \cdot y}{z}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + -1 \cdot y\right), \color{blue}{z}\right)\right)\right) \]
      13. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + \left(\mathsf{neg}\left(y\right)\right)\right), z\right)\right)\right) \]
      14. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a - y\right), z\right)\right)\right) \]
      15. --lowering--.f64100.0%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, y\right), z\right)\right)\right) \]
    8. Simplified100.0%

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

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

    1. Initial program 87.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\color{blue}{\frac{a - z}{t - x}}}\right)\right) \]
      3. div-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\left(a - z\right) \cdot \color{blue}{\frac{1}{t - x}}}\right)\right) \]
      4. times-fracN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \color{blue}{\frac{1}{\frac{1}{t - x}}}\right)\right) \]
      5. flip--N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}}}\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{t + x}{\color{blue}{t \cdot t - x \cdot x}}}\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}\right)\right) \]
      8. flip--N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \left(t - \color{blue}{x}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y - z}{a - z}\right), \color{blue}{\left(t - x\right)}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(y - z\right), \left(a - z\right)\right), \left(\color{blue}{t} - x\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(a - z\right)\right), \left(t - x\right)\right)\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \left(t - x\right)\right)\right) \]
      13. --lowering--.f6493.8%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right)\right) \]
    4. Applied egg-rr93.8%

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

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

Alternative 2: 94.6% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 89.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\color{blue}{\frac{a - z}{t - x}}}\right)\right) \]
      3. div-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\left(a - z\right) \cdot \color{blue}{\frac{1}{t - x}}}\right)\right) \]
      4. times-fracN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \color{blue}{\frac{1}{\frac{1}{t - x}}}\right)\right) \]
      5. flip--N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}}}\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{t + x}{\color{blue}{t \cdot t - x \cdot x}}}\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}\right)\right) \]
      8. flip--N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \left(t - \color{blue}{x}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y - z}{a - z}\right), \color{blue}{\left(t - x\right)}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(y - z\right), \left(a - z\right)\right), \left(\color{blue}{t} - x\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(a - z\right)\right), \left(t - x\right)\right)\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \left(t - x\right)\right)\right) \]
      13. --lowering--.f6494.7%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right)\right) \]
    4. Applied egg-rr94.7%

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

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

    1. Initial program 3.1%

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

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

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

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

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

        \[\leadsto t + \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) \]
      5. unsub-negN/A

        \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)}\right) \]
      7. distribute-rgt-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\left(t - x\right) \cdot \color{blue}{\frac{y - a}{z}}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\left(t - x\right), \color{blue}{\left(\frac{y - a}{z}\right)}\right)\right) \]
      10. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y - a}}{z}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(y - a\right), \color{blue}{z}\right)\right)\right) \]
      12. --lowering--.f64100.0%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, a\right), z\right)\right)\right) \]
    5. Simplified100.0%

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

      \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(-1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right)}\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(\frac{x \cdot \left(y - a\right)}{z}\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(x \cdot \frac{y - a}{z}\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y - a}{z}\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \left(-1 \cdot \color{blue}{\frac{y - a}{z}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y - a}{z}\right)}\right)\right) \]
      6. associate-*r/N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot \left(y - a\right)}{\color{blue}{z}}\right)\right)\right) \]
      7. distribute-lft-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y - -1 \cdot a}{z}\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(-1 \cdot a\right)\right)}{z}\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)\right)}{z}\right)\right)\right) \]
      10. remove-double-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + a}{z}\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{a + -1 \cdot y}{z}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + -1 \cdot y\right), \color{blue}{z}\right)\right)\right) \]
      13. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + \left(\mathsf{neg}\left(y\right)\right)\right), z\right)\right)\right) \]
      14. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a - y\right), z\right)\right)\right) \]
      15. --lowering--.f64100.0%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, y\right), z\right)\right)\right) \]
    8. Simplified100.0%

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

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

Alternative 3: 90.6% 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^{-294}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
   (if (<= t_1 -1e-294) t_1 (if (<= t_1 0.0) (+ t (* x (/ (- y a) z))) t_1))))
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-294) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = t + (x * ((y - a) / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + ((y - z) * ((t - x) / (a - z)))
    if (t_1 <= (-1d-294)) then
        tmp = t_1
    else if (t_1 <= 0.0d0) then
        tmp = t + (x * ((y - a) / z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_1 <= -1e-294) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = t + (x * ((y - a) / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) * ((t - x) / (a - z)))
	tmp = 0
	if t_1 <= -1e-294:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = t + (x * ((y - a) / z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	tmp = 0.0
	if (t_1 <= -1e-294)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) * ((t - x) / (a - z)));
	tmp = 0.0;
	if (t_1 <= -1e-294)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = t + (x * ((y - a) / z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-294], t$95$1, If[LessEqual[t$95$1, 0.0], N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\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^{-294}:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 89.1%

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

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

    1. Initial program 3.1%

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

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

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

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

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

        \[\leadsto t + \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) \]
      5. unsub-negN/A

        \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)}\right) \]
      7. distribute-rgt-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\left(t - x\right) \cdot \color{blue}{\frac{y - a}{z}}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\left(t - x\right), \color{blue}{\left(\frac{y - a}{z}\right)}\right)\right) \]
      10. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y - a}}{z}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(y - a\right), \color{blue}{z}\right)\right)\right) \]
      12. --lowering--.f64100.0%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, a\right), z\right)\right)\right) \]
    5. Simplified100.0%

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

      \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(-1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right)}\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(\frac{x \cdot \left(y - a\right)}{z}\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(x \cdot \frac{y - a}{z}\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y - a}{z}\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \left(-1 \cdot \color{blue}{\frac{y - a}{z}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y - a}{z}\right)}\right)\right) \]
      6. associate-*r/N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot \left(y - a\right)}{\color{blue}{z}}\right)\right)\right) \]
      7. distribute-lft-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y - -1 \cdot a}{z}\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(-1 \cdot a\right)\right)}{z}\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)\right)}{z}\right)\right)\right) \]
      10. remove-double-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + a}{z}\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{a + -1 \cdot y}{z}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + -1 \cdot y\right), \color{blue}{z}\right)\right)\right) \]
      13. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + \left(\mathsf{neg}\left(y\right)\right)\right), z\right)\right)\right) \]
      14. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a - y\right), z\right)\right)\right) \]
      15. --lowering--.f64100.0%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, y\right), z\right)\right)\right) \]
    8. Simplified100.0%

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

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

Alternative 4: 64.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := t + \frac{x \cdot y}{z}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.1 \cdot 10^{+172}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.65000000000000008e84 or 1.79999999999999991e-8 < z < 3.09999999999999988e172

    1. Initial program 69.1%

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

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

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

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

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

        \[\leadsto t + \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) \]
      5. unsub-negN/A

        \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)}\right) \]
      7. distribute-rgt-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\left(t - x\right) \cdot \color{blue}{\frac{y - a}{z}}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\left(t - x\right), \color{blue}{\left(\frac{y - a}{z}\right)}\right)\right) \]
      10. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y - a}}{z}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(y - a\right), \color{blue}{z}\right)\right)\right) \]
      12. --lowering--.f6473.3%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, a\right), z\right)\right)\right) \]
    5. Simplified73.3%

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

      \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(-1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right)}\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(\frac{x \cdot \left(y - a\right)}{z}\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(x \cdot \frac{y - a}{z}\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y - a}{z}\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \left(-1 \cdot \color{blue}{\frac{y - a}{z}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y - a}{z}\right)}\right)\right) \]
      6. associate-*r/N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot \left(y - a\right)}{\color{blue}{z}}\right)\right)\right) \]
      7. distribute-lft-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y - -1 \cdot a}{z}\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(-1 \cdot a\right)\right)}{z}\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)\right)}{z}\right)\right)\right) \]
      10. remove-double-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + a}{z}\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{a + -1 \cdot y}{z}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + -1 \cdot y\right), \color{blue}{z}\right)\right)\right) \]
      13. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + \left(\mathsf{neg}\left(y\right)\right)\right), z\right)\right)\right) \]
      14. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a - y\right), z\right)\right)\right) \]
      15. --lowering--.f6468.8%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, y\right), z\right)\right)\right) \]
    8. Simplified68.8%

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. sub-negN/A

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

        \[\leadsto t + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{x \cdot y}{z}\right)\right)\right)\right) \]
      3. remove-double-negN/A

        \[\leadsto t + \frac{x \cdot y}{\color{blue}{z}} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(t, \color{blue}{\left(\frac{x \cdot y}{z}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{z}\right)\right) \]
      6. *-lowering-*.f6462.2%

        \[\leadsto \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right)\right) \]
    11. Simplified62.2%

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

    if -1.65000000000000008e84 < z < 1.79999999999999991e-8

    1. Initial program 90.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\color{blue}{\frac{a - z}{t - x}}}\right)\right) \]
      3. div-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\left(a - z\right) \cdot \color{blue}{\frac{1}{t - x}}}\right)\right) \]
      4. times-fracN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \color{blue}{\frac{1}{\frac{1}{t - x}}}\right)\right) \]
      5. flip--N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}}}\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{t + x}{\color{blue}{t \cdot t - x \cdot x}}}\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}\right)\right) \]
      8. flip--N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \left(t - \color{blue}{x}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y - z}{a - z}\right), \color{blue}{\left(t - x\right)}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(y - z\right), \left(a - z\right)\right), \left(\color{blue}{t} - x\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(a - z\right)\right), \left(t - x\right)\right)\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \left(t - x\right)\right)\right) \]
      13. --lowering--.f6496.9%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right)\right) \]
    4. Applied egg-rr96.9%

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

        \[\leadsto \frac{y - z}{a - z} \cdot \left(t - x\right) + \color{blue}{x} \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{y - z}{a - z} \cdot \left(t - x\right)\right), \color{blue}{x}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(t - x\right) \cdot \frac{y - z}{a - z}\right), x\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(t - x\right) \cdot \frac{1}{\frac{a - z}{y - z}}\right), x\right) \]
      5. un-div-invN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{t - x}{\frac{a - z}{y - z}}\right), x\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(t - x\right), \left(\frac{a - z}{y - z}\right)\right), x\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{a - z}{y - z}\right)\right), x\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(a - z\right), \left(y - z\right)\right)\right), x\right) \]
      9. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, z\right), \left(y - z\right)\right)\right), x\right) \]
      10. --lowering--.f6497.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, z\right), \mathsf{\_.f64}\left(y, z\right)\right)\right), x\right) \]
    6. Applied egg-rr97.3%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \color{blue}{\left(\frac{a}{y}\right)}\right), x\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f6474.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(a, y\right)\right), x\right) \]
    9. Simplified74.7%

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

    if 3.09999999999999988e172 < z

    1. Initial program 57.6%

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

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

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

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

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

        \[\leadsto t + \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) \]
      5. unsub-negN/A

        \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)}\right) \]
      7. distribute-rgt-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\left(t - x\right) \cdot \color{blue}{\frac{y - a}{z}}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\left(t - x\right), \color{blue}{\left(\frac{y - a}{z}\right)}\right)\right) \]
      10. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y - a}}{z}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(y - a\right), \color{blue}{z}\right)\right)\right) \]
      12. --lowering--.f6488.7%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, a\right), z\right)\right)\right) \]
    5. Simplified88.7%

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

      \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(-1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right)}\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(\frac{x \cdot \left(y - a\right)}{z}\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(x \cdot \frac{y - a}{z}\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y - a}{z}\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \left(-1 \cdot \color{blue}{\frac{y - a}{z}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y - a}{z}\right)}\right)\right) \]
      6. associate-*r/N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot \left(y - a\right)}{\color{blue}{z}}\right)\right)\right) \]
      7. distribute-lft-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y - -1 \cdot a}{z}\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(-1 \cdot a\right)\right)}{z}\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)\right)}{z}\right)\right)\right) \]
      10. remove-double-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + a}{z}\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{a + -1 \cdot y}{z}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + -1 \cdot y\right), \color{blue}{z}\right)\right)\right) \]
      13. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + \left(\mathsf{neg}\left(y\right)\right)\right), z\right)\right)\right) \]
      14. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a - y\right), z\right)\right)\right) \]
      15. --lowering--.f6481.5%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, y\right), z\right)\right)\right) \]
    8. Simplified81.5%

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

      \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{a}{z}\right)}\right)\right) \]
    10. Step-by-step derivation
      1. /-lowering-/.f6481.2%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(a, \color{blue}{z}\right)\right)\right) \]
    11. Simplified81.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+84}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-8}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+172}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 64.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := t + \frac{x \cdot y}{z}\\
\mathbf{if}\;z \leq -8.2 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 5.7 \cdot 10^{+171}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.2000000000000002e77 or 1.4500000000000001e-8 < z < 5.7e171

    1. Initial program 69.1%

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

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

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

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

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

        \[\leadsto t + \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) \]
      5. unsub-negN/A

        \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)}\right) \]
      7. distribute-rgt-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\left(t - x\right) \cdot \color{blue}{\frac{y - a}{z}}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\left(t - x\right), \color{blue}{\left(\frac{y - a}{z}\right)}\right)\right) \]
      10. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y - a}}{z}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(y - a\right), \color{blue}{z}\right)\right)\right) \]
      12. --lowering--.f6473.3%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, a\right), z\right)\right)\right) \]
    5. Simplified73.3%

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

      \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(-1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right)}\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(\frac{x \cdot \left(y - a\right)}{z}\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(x \cdot \frac{y - a}{z}\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y - a}{z}\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \left(-1 \cdot \color{blue}{\frac{y - a}{z}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y - a}{z}\right)}\right)\right) \]
      6. associate-*r/N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot \left(y - a\right)}{\color{blue}{z}}\right)\right)\right) \]
      7. distribute-lft-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y - -1 \cdot a}{z}\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(-1 \cdot a\right)\right)}{z}\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)\right)}{z}\right)\right)\right) \]
      10. remove-double-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + a}{z}\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{a + -1 \cdot y}{z}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + -1 \cdot y\right), \color{blue}{z}\right)\right)\right) \]
      13. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + \left(\mathsf{neg}\left(y\right)\right)\right), z\right)\right)\right) \]
      14. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a - y\right), z\right)\right)\right) \]
      15. --lowering--.f6468.8%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, y\right), z\right)\right)\right) \]
    8. Simplified68.8%

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. sub-negN/A

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

        \[\leadsto t + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{x \cdot y}{z}\right)\right)\right)\right) \]
      3. remove-double-negN/A

        \[\leadsto t + \frac{x \cdot y}{\color{blue}{z}} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(t, \color{blue}{\left(\frac{x \cdot y}{z}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{z}\right)\right) \]
      6. *-lowering-*.f6462.2%

        \[\leadsto \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right)\right) \]
    11. Simplified62.2%

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

    if -8.2000000000000002e77 < z < 1.4500000000000001e-8

    1. Initial program 90.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\color{blue}{\frac{a - z}{t - x}}}\right)\right) \]
      3. div-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\left(a - z\right) \cdot \color{blue}{\frac{1}{t - x}}}\right)\right) \]
      4. times-fracN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \color{blue}{\frac{1}{\frac{1}{t - x}}}\right)\right) \]
      5. flip--N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}}}\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{t + x}{\color{blue}{t \cdot t - x \cdot x}}}\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}\right)\right) \]
      8. flip--N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \left(t - \color{blue}{x}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y - z}{a - z}\right), \color{blue}{\left(t - x\right)}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(y - z\right), \left(a - z\right)\right), \left(\color{blue}{t} - x\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(a - z\right)\right), \left(t - x\right)\right)\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \left(t - x\right)\right)\right) \]
      13. --lowering--.f6496.9%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right)\right) \]
    4. Applied egg-rr96.9%

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\color{blue}{\left(\frac{y}{a}\right)}, \mathsf{\_.f64}\left(t, x\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6474.7%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(\color{blue}{t}, x\right)\right)\right) \]
    7. Simplified74.7%

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

    if 5.7e171 < z

    1. Initial program 57.6%

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

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

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

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

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

        \[\leadsto t + \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) \]
      5. unsub-negN/A

        \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)}\right) \]
      7. distribute-rgt-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\left(t - x\right) \cdot \color{blue}{\frac{y - a}{z}}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\left(t - x\right), \color{blue}{\left(\frac{y - a}{z}\right)}\right)\right) \]
      10. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y - a}}{z}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(y - a\right), \color{blue}{z}\right)\right)\right) \]
      12. --lowering--.f6488.7%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, a\right), z\right)\right)\right) \]
    5. Simplified88.7%

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

      \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(-1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right)}\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(\frac{x \cdot \left(y - a\right)}{z}\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(x \cdot \frac{y - a}{z}\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y - a}{z}\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \left(-1 \cdot \color{blue}{\frac{y - a}{z}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y - a}{z}\right)}\right)\right) \]
      6. associate-*r/N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot \left(y - a\right)}{\color{blue}{z}}\right)\right)\right) \]
      7. distribute-lft-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y - -1 \cdot a}{z}\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(-1 \cdot a\right)\right)}{z}\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)\right)}{z}\right)\right)\right) \]
      10. remove-double-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + a}{z}\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{a + -1 \cdot y}{z}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + -1 \cdot y\right), \color{blue}{z}\right)\right)\right) \]
      13. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + \left(\mathsf{neg}\left(y\right)\right)\right), z\right)\right)\right) \]
      14. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a - y\right), z\right)\right)\right) \]
      15. --lowering--.f6481.5%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, y\right), z\right)\right)\right) \]
    8. Simplified81.5%

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

      \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{a}{z}\right)}\right)\right) \]
    10. Step-by-step derivation
      1. /-lowering-/.f6481.2%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(a, \color{blue}{z}\right)\right)\right) \]
    11. Simplified81.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{+77}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-8}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{+171}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 53.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := t + \frac{x \cdot y}{z}\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+171}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.1999999999999999e45 or 6.39999999999999961e-10 < z < 4.79999999999999995e171

    1. Initial program 71.6%

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

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

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

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

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

        \[\leadsto t + \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) \]
      5. unsub-negN/A

        \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)}\right) \]
      7. distribute-rgt-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\left(t - x\right) \cdot \color{blue}{\frac{y - a}{z}}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\left(t - x\right), \color{blue}{\left(\frac{y - a}{z}\right)}\right)\right) \]
      10. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y - a}}{z}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(y - a\right), \color{blue}{z}\right)\right)\right) \]
      12. --lowering--.f6471.3%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, a\right), z\right)\right)\right) \]
    5. Simplified71.3%

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

      \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(-1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right)}\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(\frac{x \cdot \left(y - a\right)}{z}\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(x \cdot \frac{y - a}{z}\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y - a}{z}\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \left(-1 \cdot \color{blue}{\frac{y - a}{z}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y - a}{z}\right)}\right)\right) \]
      6. associate-*r/N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot \left(y - a\right)}{\color{blue}{z}}\right)\right)\right) \]
      7. distribute-lft-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y - -1 \cdot a}{z}\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(-1 \cdot a\right)\right)}{z}\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)\right)}{z}\right)\right)\right) \]
      10. remove-double-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + a}{z}\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{a + -1 \cdot y}{z}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + -1 \cdot y\right), \color{blue}{z}\right)\right)\right) \]
      13. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + \left(\mathsf{neg}\left(y\right)\right)\right), z\right)\right)\right) \]
      14. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a - y\right), z\right)\right)\right) \]
      15. --lowering--.f6464.5%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, y\right), z\right)\right)\right) \]
    8. Simplified64.5%

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. sub-negN/A

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

        \[\leadsto t + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{x \cdot y}{z}\right)\right)\right)\right) \]
      3. remove-double-negN/A

        \[\leadsto t + \frac{x \cdot y}{\color{blue}{z}} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(t, \color{blue}{\left(\frac{x \cdot y}{z}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{z}\right)\right) \]
      6. *-lowering-*.f6458.6%

        \[\leadsto \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right)\right) \]
    11. Simplified58.6%

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

    if -4.1999999999999999e45 < z < 6.39999999999999961e-10

    1. Initial program 90.5%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y - z}{a - z}\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \frac{y - z}{a - z}\right)}\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\frac{y - z}{a - z}\right)\right)\right)\right) \]
      3. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\frac{y - z}{a - z}}\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y - z}{a - z}\right)}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(y - z\right), \color{blue}{\left(a - z\right)}\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(\color{blue}{a} - z\right)\right)\right)\right) \]
      7. --lowering--.f6469.2%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, \color{blue}{z}\right)\right)\right)\right) \]
    5. Simplified69.2%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{a}\right)}\right)\right) \]
    7. Step-by-step derivation
      1. /-lowering-/.f6461.9%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{a}\right)\right)\right) \]
    8. Simplified61.9%

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

    if 4.79999999999999995e171 < z

    1. Initial program 57.6%

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

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

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

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

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

        \[\leadsto t + \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) \]
      5. unsub-negN/A

        \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)}\right) \]
      7. distribute-rgt-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\left(t - x\right) \cdot \color{blue}{\frac{y - a}{z}}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\left(t - x\right), \color{blue}{\left(\frac{y - a}{z}\right)}\right)\right) \]
      10. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y - a}}{z}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(y - a\right), \color{blue}{z}\right)\right)\right) \]
      12. --lowering--.f6488.7%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, a\right), z\right)\right)\right) \]
    5. Simplified88.7%

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

      \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(-1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right)}\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(\frac{x \cdot \left(y - a\right)}{z}\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(x \cdot \frac{y - a}{z}\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y - a}{z}\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \left(-1 \cdot \color{blue}{\frac{y - a}{z}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y - a}{z}\right)}\right)\right) \]
      6. associate-*r/N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot \left(y - a\right)}{\color{blue}{z}}\right)\right)\right) \]
      7. distribute-lft-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y - -1 \cdot a}{z}\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(-1 \cdot a\right)\right)}{z}\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)\right)}{z}\right)\right)\right) \]
      10. remove-double-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + a}{z}\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{a + -1 \cdot y}{z}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + -1 \cdot y\right), \color{blue}{z}\right)\right)\right) \]
      13. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + \left(\mathsf{neg}\left(y\right)\right)\right), z\right)\right)\right) \]
      14. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a - y\right), z\right)\right)\right) \]
      15. --lowering--.f6481.5%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, y\right), z\right)\right)\right) \]
    8. Simplified81.5%

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

      \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{a}{z}\right)}\right)\right) \]
    10. Step-by-step derivation
      1. /-lowering-/.f6481.2%

        \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(a, \color{blue}{z}\right)\right)\right) \]
    11. Simplified81.2%

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

Alternative 7: 78.0% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.79999999999999967e-80 or 9.19999999999999977e54 < a

    1. Initial program 85.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\color{blue}{\frac{a - z}{t - x}}}\right)\right) \]
      3. div-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\left(a - z\right) \cdot \color{blue}{\frac{1}{t - x}}}\right)\right) \]
      4. times-fracN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \color{blue}{\frac{1}{\frac{1}{t - x}}}\right)\right) \]
      5. flip--N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}}}\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{t + x}{\color{blue}{t \cdot t - x \cdot x}}}\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}\right)\right) \]
      8. flip--N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \left(t - \color{blue}{x}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y - z}{a - z}\right), \color{blue}{\left(t - x\right)}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(y - z\right), \left(a - z\right)\right), \left(\color{blue}{t} - x\right)\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(a - z\right)\right), \left(t - x\right)\right)\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \left(t - x\right)\right)\right) \]
      13. --lowering--.f6490.0%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right)\right) \]
    4. Applied egg-rr90.0%

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \color{blue}{t}\right)\right) \]
    6. Step-by-step derivation
      1. Simplified78.7%

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

      if -3.79999999999999967e-80 < a < 9.19999999999999977e54

      1. Initial program 71.4%

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

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

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

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

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

          \[\leadsto t + \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) \]
        5. unsub-negN/A

          \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
        6. --lowering--.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)}\right) \]
        7. distribute-rgt-out--N/A

          \[\leadsto \mathsf{\_.f64}\left(t, \left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\right) \]
        8. associate-/l*N/A

          \[\leadsto \mathsf{\_.f64}\left(t, \left(\left(t - x\right) \cdot \color{blue}{\frac{y - a}{z}}\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\left(t - x\right), \color{blue}{\left(\frac{y - a}{z}\right)}\right)\right) \]
        10. --lowering--.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y - a}}{z}\right)\right)\right) \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(y - a\right), \color{blue}{z}\right)\right)\right) \]
        12. --lowering--.f6484.2%

          \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, a\right), z\right)\right)\right) \]
      5. Simplified84.2%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{-80}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+54}:\\ \;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a - z}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 8: 76.0% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;a \leq -8 \cdot 10^{-79}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{+54}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (+ x (* t (/ (- y z) (- a z))))))
       (if (<= a -8e-79) t_1 (if (<= a 8.6e+54) (+ t (* (/ y z) (- x t))) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = x + (t * ((y - z) / (a - z)));
    	double tmp;
    	if (a <= -8e-79) {
    		tmp = t_1;
    	} else if (a <= 8.6e+54) {
    		tmp = t + ((y / z) * (x - 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 + (t * ((y - z) / (a - z)))
        if (a <= (-8d-79)) then
            tmp = t_1
        else if (a <= 8.6d+54) then
            tmp = t + ((y / z) * (x - 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 + (t * ((y - z) / (a - z)));
    	double tmp;
    	if (a <= -8e-79) {
    		tmp = t_1;
    	} else if (a <= 8.6e+54) {
    		tmp = t + ((y / z) * (x - t));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = x + (t * ((y - z) / (a - z)))
    	tmp = 0
    	if a <= -8e-79:
    		tmp = t_1
    	elif a <= 8.6e+54:
    		tmp = t + ((y / z) * (x - t))
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a)
    	t_1 = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z))))
    	tmp = 0.0
    	if (a <= -8e-79)
    		tmp = t_1;
    	elseif (a <= 8.6e+54)
    		tmp = Float64(t + Float64(Float64(y / z) * Float64(x - t)));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	t_1 = x + (t * ((y - z) / (a - z)));
    	tmp = 0.0;
    	if (a <= -8e-79)
    		tmp = t_1;
    	elseif (a <= 8.6e+54)
    		tmp = t + ((y / z) * (x - t));
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8e-79], t$95$1, If[LessEqual[a, 8.6e+54], N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x + t \cdot \frac{y - z}{a - z}\\
    \mathbf{if}\;a \leq -8 \cdot 10^{-79}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;a \leq 8.6 \cdot 10^{+54}:\\
    \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < -8e-79 or 8.59999999999999952e54 < a

      1. Initial program 85.9%

        \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. clear-numN/A

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

          \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\color{blue}{\frac{a - z}{t - x}}}\right)\right) \]
        3. div-invN/A

          \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\left(a - z\right) \cdot \color{blue}{\frac{1}{t - x}}}\right)\right) \]
        4. times-fracN/A

          \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \color{blue}{\frac{1}{\frac{1}{t - x}}}\right)\right) \]
        5. flip--N/A

          \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}}}\right)\right) \]
        6. clear-numN/A

          \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{t + x}{\color{blue}{t \cdot t - x \cdot x}}}\right)\right) \]
        7. clear-numN/A

          \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}\right)\right) \]
        8. flip--N/A

          \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \left(t - \color{blue}{x}\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y - z}{a - z}\right), \color{blue}{\left(t - x\right)}\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(y - z\right), \left(a - z\right)\right), \left(\color{blue}{t} - x\right)\right)\right) \]
        11. --lowering--.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(a - z\right)\right), \left(t - x\right)\right)\right) \]
        12. --lowering--.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \left(t - x\right)\right)\right) \]
        13. --lowering--.f6490.0%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right)\right) \]
      4. Applied egg-rr90.0%

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \color{blue}{t}\right)\right) \]
      6. Step-by-step derivation
        1. Simplified78.7%

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

        if -8e-79 < a < 8.59999999999999952e54

        1. Initial program 71.4%

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

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

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

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

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

            \[\leadsto t + \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) \]
          5. unsub-negN/A

            \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
          6. --lowering--.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)}\right) \]
          7. distribute-rgt-out--N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\right) \]
          8. associate-/l*N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(\left(t - x\right) \cdot \color{blue}{\frac{y - a}{z}}\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\left(t - x\right), \color{blue}{\left(\frac{y - a}{z}\right)}\right)\right) \]
          10. --lowering--.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y - a}}{z}\right)\right)\right) \]
          11. /-lowering-/.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(y - a\right), \color{blue}{z}\right)\right)\right) \]
          12. --lowering--.f6484.2%

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, a\right), z\right)\right)\right) \]
        5. Simplified84.2%

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

          \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
        7. Step-by-step derivation
          1. /-lowering-/.f6482.4%

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
        8. Simplified82.4%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{-79}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{+54}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a - z}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 9: 75.0% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{if}\;a \leq -2.2 \cdot 10^{-78}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{+55}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (+ x (* (- y z) (/ t (- a z))))))
         (if (<= a -2.2e-78)
           t_1
           (if (<= a 2.35e+55) (+ t (* (/ y z) (- x t))) t_1))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = x + ((y - z) * (t / (a - z)));
      	double tmp;
      	if (a <= -2.2e-78) {
      		tmp = t_1;
      	} else if (a <= 2.35e+55) {
      		tmp = t + ((y / z) * (x - 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 + ((y - z) * (t / (a - z)))
          if (a <= (-2.2d-78)) then
              tmp = t_1
          else if (a <= 2.35d+55) then
              tmp = t + ((y / z) * (x - 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 + ((y - z) * (t / (a - z)));
      	double tmp;
      	if (a <= -2.2e-78) {
      		tmp = t_1;
      	} else if (a <= 2.35e+55) {
      		tmp = t + ((y / z) * (x - t));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	t_1 = x + ((y - z) * (t / (a - z)))
      	tmp = 0
      	if a <= -2.2e-78:
      		tmp = t_1
      	elif a <= 2.35e+55:
      		tmp = t + ((y / z) * (x - t))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a)
      	t_1 = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z))))
      	tmp = 0.0
      	if (a <= -2.2e-78)
      		tmp = t_1;
      	elseif (a <= 2.35e+55)
      		tmp = Float64(t + Float64(Float64(y / z) * Float64(x - t)));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	t_1 = x + ((y - z) * (t / (a - z)));
      	tmp = 0.0;
      	if (a <= -2.2e-78)
      		tmp = t_1;
      	elseif (a <= 2.35e+55)
      		tmp = t + ((y / z) * (x - t));
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.2e-78], t$95$1, If[LessEqual[a, 2.35e+55], N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x + \left(y - z\right) \cdot \frac{t}{a - z}\\
      \mathbf{if}\;a \leq -2.2 \cdot 10^{-78}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;a \leq 2.35 \cdot 10^{+55}:\\
      \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < -2.1999999999999999e-78 or 2.35e55 < a

        1. Initial program 85.9%

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, z\right), \color{blue}{\left(\frac{t}{a - z}\right)}\right)\right) \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{/.f64}\left(t, \color{blue}{\left(a - z\right)}\right)\right)\right) \]
          2. --lowering--.f6476.6%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{/.f64}\left(t, \mathsf{\_.f64}\left(a, \color{blue}{z}\right)\right)\right)\right) \]
        5. Simplified76.6%

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

        if -2.1999999999999999e-78 < a < 2.35e55

        1. Initial program 71.4%

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

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

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

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

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

            \[\leadsto t + \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) \]
          5. unsub-negN/A

            \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
          6. --lowering--.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)}\right) \]
          7. distribute-rgt-out--N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\right) \]
          8. associate-/l*N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(\left(t - x\right) \cdot \color{blue}{\frac{y - a}{z}}\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\left(t - x\right), \color{blue}{\left(\frac{y - a}{z}\right)}\right)\right) \]
          10. --lowering--.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y - a}}{z}\right)\right)\right) \]
          11. /-lowering-/.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(y - a\right), \color{blue}{z}\right)\right)\right) \]
          12. --lowering--.f6484.2%

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, a\right), z\right)\right)\right) \]
        5. Simplified84.2%

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

          \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
        7. Step-by-step derivation
          1. /-lowering-/.f6482.4%

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
        8. Simplified82.4%

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

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

      Alternative 10: 70.2% accurate, 0.7× speedup?

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

        1. Initial program 84.3%

          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. clear-numN/A

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

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\color{blue}{\frac{a - z}{t - x}}}\right)\right) \]
          3. div-invN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\left(a - z\right) \cdot \color{blue}{\frac{1}{t - x}}}\right)\right) \]
          4. times-fracN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \color{blue}{\frac{1}{\frac{1}{t - x}}}\right)\right) \]
          5. flip--N/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}}}\right)\right) \]
          6. clear-numN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{t + x}{\color{blue}{t \cdot t - x \cdot x}}}\right)\right) \]
          7. clear-numN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}\right)\right) \]
          8. flip--N/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \left(t - \color{blue}{x}\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y - z}{a - z}\right), \color{blue}{\left(t - x\right)}\right)\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(y - z\right), \left(a - z\right)\right), \left(\color{blue}{t} - x\right)\right)\right) \]
          11. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(a - z\right)\right), \left(t - x\right)\right)\right) \]
          12. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \left(t - x\right)\right)\right) \]
          13. --lowering--.f6489.9%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right)\right) \]
        4. Applied egg-rr89.9%

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

            \[\leadsto \frac{y - z}{a - z} \cdot \left(t - x\right) + \color{blue}{x} \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\left(\frac{y - z}{a - z} \cdot \left(t - x\right)\right), \color{blue}{x}\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(t - x\right) \cdot \frac{y - z}{a - z}\right), x\right) \]
          4. clear-numN/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(t - x\right) \cdot \frac{1}{\frac{a - z}{y - z}}\right), x\right) \]
          5. un-div-invN/A

            \[\leadsto \mathsf{+.f64}\left(\left(\frac{t - x}{\frac{a - z}{y - z}}\right), x\right) \]
          6. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(t - x\right), \left(\frac{a - z}{y - z}\right)\right), x\right) \]
          7. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{a - z}{y - z}\right)\right), x\right) \]
          8. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(a - z\right), \left(y - z\right)\right)\right), x\right) \]
          9. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, z\right), \left(y - z\right)\right)\right), x\right) \]
          10. --lowering--.f6490.0%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, z\right), \mathsf{\_.f64}\left(y, z\right)\right)\right), x\right) \]
        6. Applied egg-rr90.0%

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \color{blue}{\left(\frac{a}{y}\right)}\right), x\right) \]
        8. Step-by-step derivation
          1. /-lowering-/.f6478.2%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(a, y\right)\right), x\right) \]
        9. Simplified78.2%

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

        if -1.65000000000000015e73 < a < 1.3999999999999999e59

        1. Initial program 73.3%

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

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

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

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

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

            \[\leadsto t + \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) \]
          5. unsub-negN/A

            \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
          6. --lowering--.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)}\right) \]
          7. distribute-rgt-out--N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\right) \]
          8. associate-/l*N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(\left(t - x\right) \cdot \color{blue}{\frac{y - a}{z}}\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\left(t - x\right), \color{blue}{\left(\frac{y - a}{z}\right)}\right)\right) \]
          10. --lowering--.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y - a}}{z}\right)\right)\right) \]
          11. /-lowering-/.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(y - a\right), \color{blue}{z}\right)\right)\right) \]
          12. --lowering--.f6480.2%

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, a\right), z\right)\right)\right) \]
        5. Simplified80.2%

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

          \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
        7. Step-by-step derivation
          1. /-lowering-/.f6478.3%

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
        8. Simplified78.3%

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

        if 1.3999999999999999e59 < a

        1. Initial program 90.0%

          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. clear-numN/A

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

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\color{blue}{\frac{a - z}{t - x}}}\right)\right) \]
          3. div-invN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\left(a - z\right) \cdot \color{blue}{\frac{1}{t - x}}}\right)\right) \]
          4. times-fracN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \color{blue}{\frac{1}{\frac{1}{t - x}}}\right)\right) \]
          5. flip--N/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}}}\right)\right) \]
          6. clear-numN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{t + x}{\color{blue}{t \cdot t - x \cdot x}}}\right)\right) \]
          7. clear-numN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}\right)\right) \]
          8. flip--N/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \left(t - \color{blue}{x}\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y - z}{a - z}\right), \color{blue}{\left(t - x\right)}\right)\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(y - z\right), \left(a - z\right)\right), \left(\color{blue}{t} - x\right)\right)\right) \]
          11. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(a - z\right)\right), \left(t - x\right)\right)\right) \]
          12. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \left(t - x\right)\right)\right) \]
          13. --lowering--.f6493.3%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right)\right) \]
        4. Applied egg-rr93.3%

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\color{blue}{\left(\frac{y}{a}\right)}, \mathsf{\_.f64}\left(t, x\right)\right)\right) \]
        6. Step-by-step derivation
          1. /-lowering-/.f6468.0%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(\color{blue}{t}, x\right)\right)\right) \]
        7. Simplified68.0%

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

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

      Alternative 11: 69.8% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := t + x \cdot \frac{y - a}{z}\\ \mathbf{if}\;z \leq -1.45 \cdot 10^{+84}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{-11}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (+ t (* x (/ (- y a) z)))))
         (if (<= z -1.45e+84)
           t_1
           (if (<= z 5.3e-11) (+ x (/ (- t x) (/ a y))) t_1))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = t + (x * ((y - a) / z));
      	double tmp;
      	if (z <= -1.45e+84) {
      		tmp = t_1;
      	} else if (z <= 5.3e-11) {
      		tmp = x + ((t - x) / (a / y));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8) :: t_1
          real(8) :: tmp
          t_1 = t + (x * ((y - a) / z))
          if (z <= (-1.45d+84)) then
              tmp = t_1
          else if (z <= 5.3d-11) then
              tmp = x + ((t - x) / (a / y))
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double t_1 = t + (x * ((y - a) / z));
      	double tmp;
      	if (z <= -1.45e+84) {
      		tmp = t_1;
      	} else if (z <= 5.3e-11) {
      		tmp = x + ((t - x) / (a / y));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	t_1 = t + (x * ((y - a) / z))
      	tmp = 0
      	if z <= -1.45e+84:
      		tmp = t_1
      	elif z <= 5.3e-11:
      		tmp = x + ((t - x) / (a / y))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a)
      	t_1 = Float64(t + Float64(x * Float64(Float64(y - a) / z)))
      	tmp = 0.0
      	if (z <= -1.45e+84)
      		tmp = t_1;
      	elseif (z <= 5.3e-11)
      		tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y)));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	t_1 = t + (x * ((y - a) / z));
      	tmp = 0.0;
      	if (z <= -1.45e+84)
      		tmp = t_1;
      	elseif (z <= 5.3e-11)
      		tmp = x + ((t - x) / (a / y));
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+84], t$95$1, If[LessEqual[z, 5.3e-11], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := t + x \cdot \frac{y - a}{z}\\
      \mathbf{if}\;z \leq -1.45 \cdot 10^{+84}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 5.3 \cdot 10^{-11}:\\
      \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -1.44999999999999994e84 or 5.2999999999999998e-11 < z

        1. Initial program 66.1%

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

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

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

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

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

            \[\leadsto t + \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) \]
          5. unsub-negN/A

            \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
          6. --lowering--.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)}\right) \]
          7. distribute-rgt-out--N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\right) \]
          8. associate-/l*N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(\left(t - x\right) \cdot \color{blue}{\frac{y - a}{z}}\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\left(t - x\right), \color{blue}{\left(\frac{y - a}{z}\right)}\right)\right) \]
          10. --lowering--.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y - a}}{z}\right)\right)\right) \]
          11. /-lowering-/.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(y - a\right), \color{blue}{z}\right)\right)\right) \]
          12. --lowering--.f6477.4%

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, a\right), z\right)\right)\right) \]
        5. Simplified77.4%

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

          \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(-1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right)}\right) \]
        7. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(\frac{x \cdot \left(y - a\right)}{z}\right)\right)\right) \]
          2. associate-/l*N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(x \cdot \frac{y - a}{z}\right)\right)\right) \]
          3. distribute-rgt-neg-inN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y - a}{z}\right)\right)}\right)\right) \]
          4. mul-1-negN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \left(-1 \cdot \color{blue}{\frac{y - a}{z}}\right)\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y - a}{z}\right)}\right)\right) \]
          6. associate-*r/N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot \left(y - a\right)}{\color{blue}{z}}\right)\right)\right) \]
          7. distribute-lft-out--N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y - -1 \cdot a}{z}\right)\right)\right) \]
          8. sub-negN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(-1 \cdot a\right)\right)}{z}\right)\right)\right) \]
          9. mul-1-negN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)\right)}{z}\right)\right)\right) \]
          10. remove-double-negN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + a}{z}\right)\right)\right) \]
          11. +-commutativeN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{a + -1 \cdot y}{z}\right)\right)\right) \]
          12. /-lowering-/.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + -1 \cdot y\right), \color{blue}{z}\right)\right)\right) \]
          13. mul-1-negN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + \left(\mathsf{neg}\left(y\right)\right)\right), z\right)\right)\right) \]
          14. sub-negN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a - y\right), z\right)\right)\right) \]
          15. --lowering--.f6472.2%

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, y\right), z\right)\right)\right) \]
        8. Simplified72.2%

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

        if -1.44999999999999994e84 < z < 5.2999999999999998e-11

        1. Initial program 90.5%

          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. clear-numN/A

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

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\color{blue}{\frac{a - z}{t - x}}}\right)\right) \]
          3. div-invN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{\left(y - z\right) \cdot 1}{\left(a - z\right) \cdot \color{blue}{\frac{1}{t - x}}}\right)\right) \]
          4. times-fracN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \color{blue}{\frac{1}{\frac{1}{t - x}}}\right)\right) \]
          5. flip--N/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}}}\right)\right) \]
          6. clear-numN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{1}{\frac{t + x}{\color{blue}{t \cdot t - x \cdot x}}}\right)\right) \]
          7. clear-numN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \frac{t \cdot t - x \cdot x}{\color{blue}{t + x}}\right)\right) \]
          8. flip--N/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\frac{y - z}{a - z} \cdot \left(t - \color{blue}{x}\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{y - z}{a - z}\right), \color{blue}{\left(t - x\right)}\right)\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(y - z\right), \left(a - z\right)\right), \left(\color{blue}{t} - x\right)\right)\right) \]
          11. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(a - z\right)\right), \left(t - x\right)\right)\right) \]
          12. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \left(t - x\right)\right)\right) \]
          13. --lowering--.f6496.9%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right)\right) \]
        4. Applied egg-rr96.9%

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

            \[\leadsto \frac{y - z}{a - z} \cdot \left(t - x\right) + \color{blue}{x} \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\left(\frac{y - z}{a - z} \cdot \left(t - x\right)\right), \color{blue}{x}\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(t - x\right) \cdot \frac{y - z}{a - z}\right), x\right) \]
          4. clear-numN/A

            \[\leadsto \mathsf{+.f64}\left(\left(\left(t - x\right) \cdot \frac{1}{\frac{a - z}{y - z}}\right), x\right) \]
          5. un-div-invN/A

            \[\leadsto \mathsf{+.f64}\left(\left(\frac{t - x}{\frac{a - z}{y - z}}\right), x\right) \]
          6. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(t - x\right), \left(\frac{a - z}{y - z}\right)\right), x\right) \]
          7. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{a - z}{y - z}\right)\right), x\right) \]
          8. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(a - z\right), \left(y - z\right)\right)\right), x\right) \]
          9. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, z\right), \left(y - z\right)\right)\right), x\right) \]
          10. --lowering--.f6497.3%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, z\right), \mathsf{\_.f64}\left(y, z\right)\right)\right), x\right) \]
        6. Applied egg-rr97.3%

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \color{blue}{\left(\frac{a}{y}\right)}\right), x\right) \]
        8. Step-by-step derivation
          1. /-lowering-/.f6474.7%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(a, y\right)\right), x\right) \]
        9. Simplified74.7%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+84}:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{-11}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 12: 53.4% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{x \cdot y}{z}\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+46}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-10}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (+ t (/ (* x y) z))))
         (if (<= z -1.4e+46) t_1 (if (<= z 7e-10) (* x (- 1.0 (/ y a))) t_1))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = t + ((x * y) / z);
      	double tmp;
      	if (z <= -1.4e+46) {
      		tmp = t_1;
      	} else if (z <= 7e-10) {
      		tmp = x * (1.0 - (y / a));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8) :: t_1
          real(8) :: tmp
          t_1 = t + ((x * y) / z)
          if (z <= (-1.4d+46)) then
              tmp = t_1
          else if (z <= 7d-10) then
              tmp = x * (1.0d0 - (y / a))
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double t_1 = t + ((x * y) / z);
      	double tmp;
      	if (z <= -1.4e+46) {
      		tmp = t_1;
      	} else if (z <= 7e-10) {
      		tmp = x * (1.0 - (y / a));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	t_1 = t + ((x * y) / z)
      	tmp = 0
      	if z <= -1.4e+46:
      		tmp = t_1
      	elif z <= 7e-10:
      		tmp = x * (1.0 - (y / a))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a)
      	t_1 = Float64(t + Float64(Float64(x * y) / z))
      	tmp = 0.0
      	if (z <= -1.4e+46)
      		tmp = t_1;
      	elseif (z <= 7e-10)
      		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	t_1 = t + ((x * y) / z);
      	tmp = 0.0;
      	if (z <= -1.4e+46)
      		tmp = t_1;
      	elseif (z <= 7e-10)
      		tmp = x * (1.0 - (y / a));
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+46], t$95$1, If[LessEqual[z, 7e-10], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := t + \frac{x \cdot y}{z}\\
      \mathbf{if}\;z \leq -1.4 \cdot 10^{+46}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 7 \cdot 10^{-10}:\\
      \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -1.40000000000000009e46 or 6.99999999999999961e-10 < z

        1. Initial program 68.2%

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

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

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

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

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

            \[\leadsto t + \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) \]
          5. unsub-negN/A

            \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
          6. --lowering--.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)}\right) \]
          7. distribute-rgt-out--N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right)\right) \]
          8. associate-/l*N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(\left(t - x\right) \cdot \color{blue}{\frac{y - a}{z}}\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\left(t - x\right), \color{blue}{\left(\frac{y - a}{z}\right)}\right)\right) \]
          10. --lowering--.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y - a}}{z}\right)\right)\right) \]
          11. /-lowering-/.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\left(y - a\right), \color{blue}{z}\right)\right)\right) \]
          12. --lowering--.f6475.6%

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, a\right), z\right)\right)\right) \]
        5. Simplified75.6%

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

          \[\leadsto \mathsf{\_.f64}\left(t, \color{blue}{\left(-1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right)}\right) \]
        7. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(\frac{x \cdot \left(y - a\right)}{z}\right)\right)\right) \]
          2. associate-/l*N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(\mathsf{neg}\left(x \cdot \frac{y - a}{z}\right)\right)\right) \]
          3. distribute-rgt-neg-inN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y - a}{z}\right)\right)}\right)\right) \]
          4. mul-1-negN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \left(x \cdot \left(-1 \cdot \color{blue}{\frac{y - a}{z}}\right)\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y - a}{z}\right)}\right)\right) \]
          6. associate-*r/N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot \left(y - a\right)}{\color{blue}{z}}\right)\right)\right) \]
          7. distribute-lft-out--N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y - -1 \cdot a}{z}\right)\right)\right) \]
          8. sub-negN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(-1 \cdot a\right)\right)}{z}\right)\right)\right) \]
          9. mul-1-negN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)\right)}{z}\right)\right)\right) \]
          10. remove-double-negN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{-1 \cdot y + a}{z}\right)\right)\right) \]
          11. +-commutativeN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \left(\frac{a + -1 \cdot y}{z}\right)\right)\right) \]
          12. /-lowering-/.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + -1 \cdot y\right), \color{blue}{z}\right)\right)\right) \]
          13. mul-1-negN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a + \left(\mathsf{neg}\left(y\right)\right)\right), z\right)\right)\right) \]
          14. sub-negN/A

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(a - y\right), z\right)\right)\right) \]
          15. --lowering--.f6468.6%

            \[\leadsto \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, y\right), z\right)\right)\right) \]
        8. Simplified68.6%

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

          \[\leadsto \color{blue}{t - -1 \cdot \frac{x \cdot y}{z}} \]
        10. Step-by-step derivation
          1. sub-negN/A

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

            \[\leadsto t + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{x \cdot y}{z}\right)\right)\right)\right) \]
          3. remove-double-negN/A

            \[\leadsto t + \frac{x \cdot y}{\color{blue}{z}} \]
          4. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(t, \color{blue}{\left(\frac{x \cdot y}{z}\right)}\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{z}\right)\right) \]
          6. *-lowering-*.f6459.3%

            \[\leadsto \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right)\right) \]
        11. Simplified59.3%

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

        if -1.40000000000000009e46 < z < 6.99999999999999961e-10

        1. Initial program 90.5%

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

          \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y - z}{a - z}\right)} \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \frac{y - z}{a - z}\right)}\right) \]
          2. mul-1-negN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\frac{y - z}{a - z}\right)\right)\right)\right) \]
          3. unsub-negN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\frac{y - z}{a - z}}\right)\right) \]
          4. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y - z}{a - z}\right)}\right)\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(y - z\right), \color{blue}{\left(a - z\right)}\right)\right)\right) \]
          6. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(\color{blue}{a} - z\right)\right)\right)\right) \]
          7. --lowering--.f6469.2%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, \color{blue}{z}\right)\right)\right)\right) \]
        5. Simplified69.2%

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

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{a}\right)}\right)\right) \]
        7. Step-by-step derivation
          1. /-lowering-/.f6461.9%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{a}\right)\right)\right) \]
        8. Simplified61.9%

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

      Alternative 13: 49.2% accurate, 0.8× speedup?

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

        1. Initial program 65.5%

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

          \[\leadsto \color{blue}{t} \]
        4. Step-by-step derivation
          1. Simplified55.0%

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

          if -8.8000000000000001e45 < z < 1.6500000000000001e100

          1. Initial program 88.7%

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

            \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y - z}{a - z}\right)} \]
          4. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \frac{y - z}{a - z}\right)}\right) \]
            2. mul-1-negN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\frac{y - z}{a - z}\right)\right)\right)\right) \]
            3. unsub-negN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\frac{y - z}{a - z}}\right)\right) \]
            4. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y - z}{a - z}\right)}\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(y - z\right), \color{blue}{\left(a - z\right)}\right)\right)\right) \]
            6. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(\color{blue}{a} - z\right)\right)\right)\right) \]
            7. --lowering--.f6464.9%

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, \color{blue}{z}\right)\right)\right)\right) \]
          5. Simplified64.9%

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

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{a}\right)}\right)\right) \]
          7. Step-by-step derivation
            1. /-lowering-/.f6458.2%

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{a}\right)\right)\right) \]
          8. Simplified58.2%

            \[\leadsto x \cdot \left(1 - \color{blue}{\frac{y}{a}}\right) \]
        5. Recombined 2 regimes into one program.
        6. Add Preprocessing

        Alternative 14: 38.9% accurate, 0.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+60}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-9}:\\ \;\;\;\;x \cdot \left(\frac{z}{a} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
        (FPCore (x y z t a)
         :precision binary64
         (if (<= z -5.4e+60) t (if (<= z 4.3e-9) (* x (+ (/ z a) 1.0)) t)))
        double code(double x, double y, double z, double t, double a) {
        	double tmp;
        	if (z <= -5.4e+60) {
        		tmp = t;
        	} else if (z <= 4.3e-9) {
        		tmp = x * ((z / a) + 1.0);
        	} else {
        		tmp = t;
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z, t, a)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8), intent (in) :: a
            real(8) :: tmp
            if (z <= (-5.4d+60)) then
                tmp = t
            else if (z <= 4.3d-9) then
                tmp = x * ((z / a) + 1.0d0)
            else
                tmp = t
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a) {
        	double tmp;
        	if (z <= -5.4e+60) {
        		tmp = t;
        	} else if (z <= 4.3e-9) {
        		tmp = x * ((z / a) + 1.0);
        	} else {
        		tmp = t;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a):
        	tmp = 0
        	if z <= -5.4e+60:
        		tmp = t
        	elif z <= 4.3e-9:
        		tmp = x * ((z / a) + 1.0)
        	else:
        		tmp = t
        	return tmp
        
        function code(x, y, z, t, a)
        	tmp = 0.0
        	if (z <= -5.4e+60)
        		tmp = t;
        	elseif (z <= 4.3e-9)
        		tmp = Float64(x * Float64(Float64(z / a) + 1.0));
        	else
        		tmp = t;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a)
        	tmp = 0.0;
        	if (z <= -5.4e+60)
        		tmp = t;
        	elseif (z <= 4.3e-9)
        		tmp = x * ((z / a) + 1.0);
        	else
        		tmp = t;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.4e+60], t, If[LessEqual[z, 4.3e-9], N[(x * N[(N[(z / a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -5.4 \cdot 10^{+60}:\\
        \;\;\;\;t\\
        
        \mathbf{elif}\;z \leq 4.3 \cdot 10^{-9}:\\
        \;\;\;\;x \cdot \left(\frac{z}{a} + 1\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -5.3999999999999999e60 or 4.29999999999999963e-9 < z

          1. Initial program 67.4%

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

            \[\leadsto \color{blue}{t} \]
          4. Step-by-step derivation
            1. Simplified51.5%

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

            if -5.3999999999999999e60 < z < 4.29999999999999963e-9

            1. Initial program 90.2%

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

              \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y - z}{a - z}\right)} \]
            4. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \frac{y - z}{a - z}\right)}\right) \]
              2. mul-1-negN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\frac{y - z}{a - z}\right)\right)\right)\right) \]
              3. unsub-negN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\frac{y - z}{a - z}}\right)\right) \]
              4. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y - z}{a - z}\right)}\right)\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(y - z\right), \color{blue}{\left(a - z\right)}\right)\right)\right) \]
              6. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(\color{blue}{a} - z\right)\right)\right)\right) \]
              7. --lowering--.f6467.7%

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, \color{blue}{z}\right)\right)\right)\right) \]
            5. Simplified67.7%

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

              \[\leadsto \color{blue}{x \cdot \left(1 + \frac{z}{a - z}\right)} \]
            7. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + \frac{z}{a - z}\right)}\right) \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{z}{a - z}\right)}\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{\left(a - z\right)}\right)\right)\right) \]
              4. --lowering--.f6433.2%

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(z, \mathsf{\_.f64}\left(a, \color{blue}{z}\right)\right)\right)\right) \]
            8. Simplified33.2%

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

              \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + \frac{z}{a}\right)}\right) \]
            10. Step-by-step derivation
              1. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{z}{a}\right)}\right)\right) \]
              2. /-lowering-/.f6436.4%

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
            11. Simplified36.4%

              \[\leadsto x \cdot \color{blue}{\left(1 + \frac{z}{a}\right)} \]
          5. Recombined 2 regimes into one program.
          6. Final simplification43.8%

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+60}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-9}:\\ \;\;\;\;x \cdot \left(\frac{z}{a} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
          7. Add Preprocessing

          Alternative 15: 38.5% accurate, 1.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+60}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 0.00106:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (if (<= z -4.5e+60) t (if (<= z 0.00106) x t)))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (z <= -4.5e+60) {
          		tmp = t;
          	} else if (z <= 0.00106) {
          		tmp = x;
          	} else {
          		tmp = t;
          	}
          	return tmp;
          }
          
          real(8) function code(x, y, z, t, a)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8) :: tmp
              if (z <= (-4.5d+60)) then
                  tmp = t
              else if (z <= 0.00106d0) then
                  tmp = x
              else
                  tmp = t
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (z <= -4.5e+60) {
          		tmp = t;
          	} else if (z <= 0.00106) {
          		tmp = x;
          	} else {
          		tmp = t;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a):
          	tmp = 0
          	if z <= -4.5e+60:
          		tmp = t
          	elif z <= 0.00106:
          		tmp = x
          	else:
          		tmp = t
          	return tmp
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if (z <= -4.5e+60)
          		tmp = t;
          	elseif (z <= 0.00106)
          		tmp = x;
          	else
          		tmp = t;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a)
          	tmp = 0.0;
          	if (z <= -4.5e+60)
          		tmp = t;
          	elseif (z <= 0.00106)
          		tmp = x;
          	else
          		tmp = t;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.5e+60], t, If[LessEqual[z, 0.00106], x, t]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -4.5 \cdot 10^{+60}:\\
          \;\;\;\;t\\
          
          \mathbf{elif}\;z \leq 0.00106:\\
          \;\;\;\;x\\
          
          \mathbf{else}:\\
          \;\;\;\;t\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -4.50000000000000013e60 or 0.00105999999999999996 < z

            1. Initial program 67.1%

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

              \[\leadsto \color{blue}{t} \]
            4. Step-by-step derivation
              1. Simplified51.9%

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

              if -4.50000000000000013e60 < z < 0.00105999999999999996

              1. Initial program 90.2%

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

                \[\leadsto \color{blue}{x} \]
              4. Step-by-step derivation
                1. Simplified33.5%

                  \[\leadsto \color{blue}{x} \]
              5. Recombined 2 regimes into one program.
              6. Add Preprocessing

              Alternative 16: 25.3% 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 79.0%

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

                \[\leadsto \color{blue}{t} \]
              4. Step-by-step derivation
                1. Simplified28.0%

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

                Alternative 17: 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 79.0%

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

                  \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y - z}{a - z}\right)} \]
                4. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \frac{y - z}{a - z}\right)}\right) \]
                  2. mul-1-negN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\frac{y - z}{a - z}\right)\right)\right)\right) \]
                  3. unsub-negN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\frac{y - z}{a - z}}\right)\right) \]
                  4. --lowering--.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y - z}{a - z}\right)}\right)\right) \]
                  5. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(y - z\right), \color{blue}{\left(a - z\right)}\right)\right)\right) \]
                  6. --lowering--.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(\color{blue}{a} - z\right)\right)\right)\right) \]
                  7. --lowering--.f6445.0%

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(a, \color{blue}{z}\right)\right)\right)\right) \]
                5. Simplified45.0%

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

                  \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{1}\right)\right) \]
                7. Step-by-step derivation
                  1. Simplified2.8%

                    \[\leadsto x \cdot \left(1 - \color{blue}{1}\right) \]
                  2. Step-by-step derivation
                    1. metadata-evalN/A

                      \[\leadsto x \cdot 0 \]
                    2. mul0-rgt2.8%

                      \[\leadsto 0 \]
                  3. Applied egg-rr2.8%

                    \[\leadsto \color{blue}{0} \]
                  4. Add Preprocessing

                  Reproduce

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