Numeric.Signal:interpolate from hsignal-0.2.7.1

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

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


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

    1. Initial program 91.2%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr94.8%

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

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

    1. Initial program 4.1%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr4.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 91.2%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr94.8%

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

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

    1. Initial program 4.1%

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

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

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

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

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

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


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

    1. Initial program 91.9%

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

    if -4.99999999999999983e-275 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.0000000000000003e-239

    1. Initial program 7.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 93.0% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 91.2%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr94.8%

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 46.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -3.8 \cdot 10^{-203}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 3.9 \cdot 10^{+62}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 2.1 \cdot 10^{+185}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.08e-20 or 2.1e185 < a

    1. Initial program 88.1%

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

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

    if -1.08e-20 < a < -3.80000000000000025e-203 or -2.49999999999999989e-259 < a < 3.9e62

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

    if -3.80000000000000025e-203 < a < -2.49999999999999989e-259

    1. Initial program 86.6%

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

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

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

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

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

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

    if 3.9e62 < a < 2.1e185

    1. Initial program 78.5%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr81.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.08 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-203}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-259}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{+62}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{+185}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 6: 57.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 3.6 \cdot 10^{-240}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2.8 \cdot 10^{-46}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.4500000000000001e-162 or 2.7999999999999998e-46 < t

    1. Initial program 86.3%

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

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

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

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

    if -1.4500000000000001e-162 < t < 3.5999999999999999e-240 or 8.19999999999999997e-175 < t < 2.7999999999999998e-46

    1. Initial program 71.0%

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

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

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

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

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

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

    if 3.5999999999999999e-240 < t < 8.19999999999999997e-175

    1. Initial program 71.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-162}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-240}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{-175}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{a - z}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-46}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 7: 64.9% accurate, 0.8× speedup?

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

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

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

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

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


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

    1. Initial program 60.2%

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

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

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

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

    if -2.9e88 < z < -6.0000000000000002e-105

    1. Initial program 84.9%

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

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

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

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

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

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

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

    if -6.0000000000000002e-105 < z < 1.65e-80

    1. Initial program 95.6%

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

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

    if 1.65e-80 < z

    1. Initial program 76.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+88}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-105}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-80}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \end{array} \]

Alternative 8: 47.2% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -3.6 \cdot 10^{-196}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.06 \cdot 10^{+120}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.08e-20 or 1.05999999999999994e120 < a

    1. Initial program 86.0%

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

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

    if -1.08e-20 < a < -3.6000000000000001e-196 or -3.90000000000000017e-261 < a < 1.05999999999999994e120

    1. Initial program 76.6%

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

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

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

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

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

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

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

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

    if -3.6000000000000001e-196 < a < -3.90000000000000017e-261

    1. Initial program 86.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.08 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-196}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{-261}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{+120}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 56.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -8 \cdot 10^{+87}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-107}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-88}:\\ \;\;\;\;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 (/ (- y z) (- a z)))))
   (if (<= z -8e+87)
     t_1
     (if (<= z -1.8e-107)
       (* y (/ (- t x) (- a z)))
       (if (<= z 9e-88) (* x (- 1.0 (/ y a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -8e+87) {
		tmp = t_1;
	} else if (z <= -1.8e-107) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 9e-88) {
		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 * ((y - z) / (a - z))
    if (z <= (-8d+87)) then
        tmp = t_1
    else if (z <= (-1.8d-107)) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 9d-88) 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 * ((y - z) / (a - z));
	double tmp;
	if (z <= -8e+87) {
		tmp = t_1;
	} else if (z <= -1.8e-107) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 9e-88) {
		tmp = x * (1.0 - (y / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -8e+87:
		tmp = t_1
	elif z <= -1.8e-107:
		tmp = y * ((t - x) / (a - z))
	elif z <= 9e-88:
		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(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -8e+87)
		tmp = t_1;
	elseif (z <= -1.8e-107)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 9e-88)
		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 * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -8e+87)
		tmp = t_1;
	elseif (z <= -1.8e-107)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 9e-88)
		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[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+87], t$95$1, If[LessEqual[z, -1.8e-107], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e-88], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.9999999999999997e87 or 8.99999999999999982e-88 < z

    1. Initial program 71.1%

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

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

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

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

    if -7.9999999999999997e87 < z < -1.79999999999999988e-107

    1. Initial program 84.9%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr85.0%

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

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

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

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

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

    if -1.79999999999999988e-107 < z < 8.99999999999999982e-88

    1. Initial program 95.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+87}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-107}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-88}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 10: 64.3% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.35000000000000008e88 or 1.29999999999999997e-79 < z

    1. Initial program 70.7%

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

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

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

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

    if -1.35000000000000008e88 < z < -5.50000000000000032e-103

    1. Initial program 84.9%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr85.0%

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

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

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

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

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

    if -5.50000000000000032e-103 < z < 1.29999999999999997e-79

    1. Initial program 95.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+88}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-103}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-79}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 11: 65.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -1.6 \cdot 10^{+91}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.26 \cdot 10^{-93}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-79}:\\ \;\;\;\;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 (/ (- y z) (- a z)))))
   (if (<= z -1.6e+91)
     t_1
     (if (<= z -1.26e-93)
       (* y (/ (- t x) (- a z)))
       (if (<= z 1.75e-79) (+ x (/ (- t x) (/ a y))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -1.6e+91) {
		tmp = t_1;
	} else if (z <= -1.26e-93) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 1.75e-79) {
		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 * ((y - z) / (a - z))
    if (z <= (-1.6d+91)) then
        tmp = t_1
    else if (z <= (-1.26d-93)) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 1.75d-79) 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 * ((y - z) / (a - z));
	double tmp;
	if (z <= -1.6e+91) {
		tmp = t_1;
	} else if (z <= -1.26e-93) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 1.75e-79) {
		tmp = x + ((t - x) / (a / y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -1.6e+91:
		tmp = t_1
	elif z <= -1.26e-93:
		tmp = y * ((t - x) / (a - z))
	elif z <= 1.75e-79:
		tmp = x + ((t - x) / (a / y))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -1.6e+91)
		tmp = t_1;
	elseif (z <= -1.26e-93)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 1.75e-79)
		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 * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -1.6e+91)
		tmp = t_1;
	elseif (z <= -1.26e-93)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 1.75e-79)
		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[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+91], t$95$1, If[LessEqual[z, -1.26e-93], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e-79], 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 \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+91}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.59999999999999995e91 or 1.75000000000000015e-79 < z

    1. Initial program 70.7%

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

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

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

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

    if -1.59999999999999995e91 < z < -1.2600000000000001e-93

    1. Initial program 86.2%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr83.9%

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

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

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

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

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

    if -1.2600000000000001e-93 < z < 1.75000000000000015e-79

    1. Initial program 94.5%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr98.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+91}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -1.26 \cdot 10^{-93}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-79}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 12: 65.0% accurate, 0.9× speedup?

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

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

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

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

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


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

    1. Initial program 60.2%

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

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

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

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

    if -7.2e89 < z < -1.84999999999999997e-95

    1. Initial program 86.2%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr83.9%

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

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

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

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

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

    if -1.84999999999999997e-95 < z < 1.65e-80

    1. Initial program 94.5%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr98.8%

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

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

    if 1.65e-80 < z

    1. Initial program 76.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-95}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-80}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \end{array} \]

Alternative 13: 65.0% accurate, 0.9× speedup?

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

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

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

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

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


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

    1. Initial program 60.2%

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

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

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

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

    if -1.8e90 < z < -1.39999999999999999e-93

    1. Initial program 86.2%

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

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

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

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

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

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

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

    if -1.39999999999999999e-93 < z < 1.69999999999999988e-79

    1. Initial program 94.5%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr98.8%

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

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

    if 1.69999999999999988e-79 < z

    1. Initial program 76.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+90}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-93}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-79}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \end{array} \]

Alternative 14: 63.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{-50} \lor \neg \left(x \leq 1.9 \cdot 10^{-60}\right):\\
\;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.2000000000000004e-50 or 1.89999999999999997e-60 < x

    1. Initial program 79.0%

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

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

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

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

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

    if -6.2000000000000004e-50 < x < 1.89999999999999997e-60

    1. Initial program 84.2%

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

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

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

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

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

Alternative 15: 74.3% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 59.0%

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

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

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

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

    if -3.64999999999999997e124 < z < 1.00000000000000001e78

    1. Initial program 89.8%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr92.9%

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

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

    if 1.00000000000000001e78 < z

    1. Initial program 66.8%

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

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

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

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

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

Alternative 16: 49.7% accurate, 1.0× speedup?

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

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

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

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

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


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

    1. Initial program 64.4%

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

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

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

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

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

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

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

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

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

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

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

    if -6.7999999999999997e72 < z < -2.7999999999999999e-90

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7999999999999999e-90 < z < 6.2000000000000002e75

    1. Initial program 92.1%

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

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

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

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

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

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

    if 6.2000000000000002e75 < z

    1. Initial program 66.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+72}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-90}:\\ \;\;\;\;\frac{-x}{\frac{z}{a - y}}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+75}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 17: 49.9% accurate, 1.0× speedup?

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

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

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

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

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


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

    1. Initial program 64.4%

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

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

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

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

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

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

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

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

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

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

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

    if -2.6000000000000001e73 < z < -2.89999999999999983e-90

    1. Initial program 85.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Applied egg-rr82.9%

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

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

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

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

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

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

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

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

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

    if -2.89999999999999983e-90 < z < 1.65e76

    1. Initial program 92.1%

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

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

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

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

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

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

    if 1.65e76 < z

    1. Initial program 66.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+73}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-90}:\\ \;\;\;\;\frac{-y}{\frac{a - z}{x}}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+76}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 18: 37.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.2 \cdot 10^{-21}:\\
\;\;\;\;x\\

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

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

\mathbf{elif}\;a \leq 1.55 \cdot 10^{+112}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.19999999999999988e-21 or 1.54999999999999991e112 < a

    1. Initial program 86.1%

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

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

    if -8.19999999999999988e-21 < a < -1.05000000000000001e-115 or -1.15e-260 < a < 1.54999999999999991e112

    1. Initial program 77.1%

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

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

    if -1.05000000000000001e-115 < a < -1.15e-260

    1. Initial program 78.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.2 \cdot 10^{-21}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-115}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-260}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+112}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 19: 37.5% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -8.2 \cdot 10^{-116}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 2.3 \cdot 10^{+111}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.08e-20 or 2.30000000000000002e111 < a

    1. Initial program 86.1%

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

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

    if -1.08e-20 < a < -8.1999999999999998e-116 or -7.99999999999999987e-261 < a < 2.30000000000000002e111

    1. Initial program 77.1%

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

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

    if -8.1999999999999998e-116 < a < -7.99999999999999987e-261

    1. Initial program 78.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.08 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{-116}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-261}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+111}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 20: 51.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{+122} \lor \neg \left(z \leq 3.1 \cdot 10^{+78}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.40000000000000024e122 or 3.1e78 < z

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

    if -6.40000000000000024e122 < z < 3.1e78

    1. Initial program 89.8%

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

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

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

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

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

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

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

Alternative 21: 51.1% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

    if -5.4999999999999998e122 < z < 1.59999999999999997e78

    1. Initial program 89.8%

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

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

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

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

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

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

    if 1.59999999999999997e78 < z

    1. Initial program 66.8%

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

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

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

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

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

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

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

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

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

Alternative 22: 51.1% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

    if -9.6000000000000007e122 < z < 9.0000000000000007e75

    1. Initial program 89.8%

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

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

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

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

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

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

    if 9.0000000000000007e75 < z

    1. Initial program 66.8%

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

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

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

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

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

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

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

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

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

Alternative 23: 38.2% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;a \leq 2.3 \cdot 10^{+111}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.02000000000000001e-20 or 2.30000000000000002e111 < a

    1. Initial program 86.1%

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

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

    if -1.02000000000000001e-20 < a < 2.30000000000000002e111

    1. Initial program 77.4%

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

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

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

Alternative 24: 24.7% 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 81.0%

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

    \[\leadsto \color{blue}{t} \]
  3. Final simplification24.6%

    \[\leadsto t \]

Reproduce

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