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

Percentage Accurate: 67.6% → 90.5%
Time: 15.9s
Alternatives: 17
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 67.6% accurate, 1.0× speedup?

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

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

Alternative 1: 90.5% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 70.2%

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

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

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

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

    1. Initial program 4.6%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 83.3% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_1 \leq -4 \cdot 10^{-286}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 46.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot z} \]
      2. *-commutative66.1%

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

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

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

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

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

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

    if -1.00000000000000002e306 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.0000000000000002e-286 or 1.00000000000000006e-279 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 4.9999999999999997e304

    1. Initial program 97.4%

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

    if -4.0000000000000002e-286 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 1.00000000000000006e-279

    1. Initial program 4.7%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 25.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -1 \cdot 10^{+306}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -4 \cdot 10^{-286}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq 10^{-279}:\\ \;\;\;\;y - \frac{\left(a - z\right) \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq 5 \cdot 10^{+304}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{a - z}{\frac{t}{x}}\\ \end{array} \]

Alternative 3: 65.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := y + z \cdot \frac{x}{t}\\ \mathbf{if}\;t \leq -5 \cdot 10^{+194}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{-22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-79}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-173}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-7}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+113}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t)))) (t_2 (+ y (* z (/ x t)))))
   (if (<= t -5e+194)
     t_2
     (if (<= t -5.4e-22)
       t_1
       (if (<= t -1.35e-79)
         (+ x (/ y (/ a z)))
         (if (<= t -5e-173)
           (* z (/ (- y x) (- a t)))
           (if (<= t 1.2e-7)
             (+ x (/ z (/ a (- y x))))
             (if (<= t 5.2e+113) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = y + (z * (x / t));
	double tmp;
	if (t <= -5e+194) {
		tmp = t_2;
	} else if (t <= -5.4e-22) {
		tmp = t_1;
	} else if (t <= -1.35e-79) {
		tmp = x + (y / (a / z));
	} else if (t <= -5e-173) {
		tmp = z * ((y - x) / (a - t));
	} else if (t <= 1.2e-7) {
		tmp = x + (z / (a / (y - x)));
	} else if (t <= 5.2e+113) {
		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 = y * ((z - t) / (a - t))
    t_2 = y + (z * (x / t))
    if (t <= (-5d+194)) then
        tmp = t_2
    else if (t <= (-5.4d-22)) then
        tmp = t_1
    else if (t <= (-1.35d-79)) then
        tmp = x + (y / (a / z))
    else if (t <= (-5d-173)) then
        tmp = z * ((y - x) / (a - t))
    else if (t <= 1.2d-7) then
        tmp = x + (z / (a / (y - x)))
    else if (t <= 5.2d+113) 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 = y * ((z - t) / (a - t));
	double t_2 = y + (z * (x / t));
	double tmp;
	if (t <= -5e+194) {
		tmp = t_2;
	} else if (t <= -5.4e-22) {
		tmp = t_1;
	} else if (t <= -1.35e-79) {
		tmp = x + (y / (a / z));
	} else if (t <= -5e-173) {
		tmp = z * ((y - x) / (a - t));
	} else if (t <= 1.2e-7) {
		tmp = x + (z / (a / (y - x)));
	} else if (t <= 5.2e+113) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	t_2 = y + (z * (x / t))
	tmp = 0
	if t <= -5e+194:
		tmp = t_2
	elif t <= -5.4e-22:
		tmp = t_1
	elif t <= -1.35e-79:
		tmp = x + (y / (a / z))
	elif t <= -5e-173:
		tmp = z * ((y - x) / (a - t))
	elif t <= 1.2e-7:
		tmp = x + (z / (a / (y - x)))
	elif t <= 5.2e+113:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	t_2 = Float64(y + Float64(z * Float64(x / t)))
	tmp = 0.0
	if (t <= -5e+194)
		tmp = t_2;
	elseif (t <= -5.4e-22)
		tmp = t_1;
	elseif (t <= -1.35e-79)
		tmp = Float64(x + Float64(y / Float64(a / z)));
	elseif (t <= -5e-173)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	elseif (t <= 1.2e-7)
		tmp = Float64(x + Float64(z / Float64(a / Float64(y - x))));
	elseif (t <= 5.2e+113)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	t_2 = y + (z * (x / t));
	tmp = 0.0;
	if (t <= -5e+194)
		tmp = t_2;
	elseif (t <= -5.4e-22)
		tmp = t_1;
	elseif (t <= -1.35e-79)
		tmp = x + (y / (a / z));
	elseif (t <= -5e-173)
		tmp = z * ((y - x) / (a - t));
	elseif (t <= 1.2e-7)
		tmp = x + (z / (a / (y - x)));
	elseif (t <= 5.2e+113)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e+194], t$95$2, If[LessEqual[t, -5.4e-22], t$95$1, If[LessEqual[t, -1.35e-79], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5e-173], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-7], N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e+113], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -5.4 \cdot 10^{-22}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;t \leq 5.2 \cdot 10^{+113}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4.99999999999999989e194 or 5.1999999999999998e113 < t

    1. Initial program 30.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot z} \]
      2. *-commutative75.6%

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

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

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

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

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

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

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

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

    if -4.99999999999999989e194 < t < -5.4000000000000004e-22 or 1.19999999999999989e-7 < t < 5.1999999999999998e113

    1. Initial program 60.8%

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

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

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

      \[\leadsto \color{blue}{x + \frac{z - t}{\frac{a - t}{y - x}}} \]
    4. Step-by-step derivation
      1. clear-num81.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
      2. *-commutative64.0%

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

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

    if -5.4000000000000004e-22 < t < -1.3500000000000001e-79

    1. Initial program 80.2%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} + x \]
    5. Simplified73.0%

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

    if -1.3500000000000001e-79 < t < -5.0000000000000002e-173

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000002e-173 < t < 1.19999999999999989e-7

    1. Initial program 89.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{+194}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{-22}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-79}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-173}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-7}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+113}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \end{array} \]

Alternative 4: 66.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := y + z \cdot \frac{x}{t}\\ \mathbf{if}\;t \leq -4.3 \cdot 10^{+194}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.02 \cdot 10^{-22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-79}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq -8.6 \cdot 10^{-173}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+22}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 8.4 \cdot 10^{+114}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t)))) (t_2 (+ y (* z (/ x t)))))
   (if (<= t -4.3e+194)
     t_2
     (if (<= t -1.02e-22)
       t_1
       (if (<= t -1.45e-79)
         (+ x (/ y (/ a z)))
         (if (<= t -8.6e-173)
           (* z (/ (- y x) (- a t)))
           (if (<= t 6e+22)
             (+ x (/ (- y x) (/ a z)))
             (if (<= t 8.4e+114) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = y + (z * (x / t));
	double tmp;
	if (t <= -4.3e+194) {
		tmp = t_2;
	} else if (t <= -1.02e-22) {
		tmp = t_1;
	} else if (t <= -1.45e-79) {
		tmp = x + (y / (a / z));
	} else if (t <= -8.6e-173) {
		tmp = z * ((y - x) / (a - t));
	} else if (t <= 6e+22) {
		tmp = x + ((y - x) / (a / z));
	} else if (t <= 8.4e+114) {
		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 = y * ((z - t) / (a - t))
    t_2 = y + (z * (x / t))
    if (t <= (-4.3d+194)) then
        tmp = t_2
    else if (t <= (-1.02d-22)) then
        tmp = t_1
    else if (t <= (-1.45d-79)) then
        tmp = x + (y / (a / z))
    else if (t <= (-8.6d-173)) then
        tmp = z * ((y - x) / (a - t))
    else if (t <= 6d+22) then
        tmp = x + ((y - x) / (a / z))
    else if (t <= 8.4d+114) 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 = y * ((z - t) / (a - t));
	double t_2 = y + (z * (x / t));
	double tmp;
	if (t <= -4.3e+194) {
		tmp = t_2;
	} else if (t <= -1.02e-22) {
		tmp = t_1;
	} else if (t <= -1.45e-79) {
		tmp = x + (y / (a / z));
	} else if (t <= -8.6e-173) {
		tmp = z * ((y - x) / (a - t));
	} else if (t <= 6e+22) {
		tmp = x + ((y - x) / (a / z));
	} else if (t <= 8.4e+114) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	t_2 = y + (z * (x / t))
	tmp = 0
	if t <= -4.3e+194:
		tmp = t_2
	elif t <= -1.02e-22:
		tmp = t_1
	elif t <= -1.45e-79:
		tmp = x + (y / (a / z))
	elif t <= -8.6e-173:
		tmp = z * ((y - x) / (a - t))
	elif t <= 6e+22:
		tmp = x + ((y - x) / (a / z))
	elif t <= 8.4e+114:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	t_2 = Float64(y + Float64(z * Float64(x / t)))
	tmp = 0.0
	if (t <= -4.3e+194)
		tmp = t_2;
	elseif (t <= -1.02e-22)
		tmp = t_1;
	elseif (t <= -1.45e-79)
		tmp = Float64(x + Float64(y / Float64(a / z)));
	elseif (t <= -8.6e-173)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	elseif (t <= 6e+22)
		tmp = Float64(x + Float64(Float64(y - x) / Float64(a / z)));
	elseif (t <= 8.4e+114)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	t_2 = y + (z * (x / t));
	tmp = 0.0;
	if (t <= -4.3e+194)
		tmp = t_2;
	elseif (t <= -1.02e-22)
		tmp = t_1;
	elseif (t <= -1.45e-79)
		tmp = x + (y / (a / z));
	elseif (t <= -8.6e-173)
		tmp = z * ((y - x) / (a - t));
	elseif (t <= 6e+22)
		tmp = x + ((y - x) / (a / z));
	elseif (t <= 8.4e+114)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.3e+194], t$95$2, If[LessEqual[t, -1.02e-22], t$95$1, If[LessEqual[t, -1.45e-79], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8.6e-173], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+22], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.4e+114], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.02 \cdot 10^{-22}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;t \leq 8.4 \cdot 10^{+114}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4.29999999999999994e194 or 8.4000000000000001e114 < t

    1. Initial program 30.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot z} \]
      2. *-commutative75.6%

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

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

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

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

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

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

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

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

    if -4.29999999999999994e194 < t < -1.02000000000000002e-22 or 6e22 < t < 8.4000000000000001e114

    1. Initial program 57.1%

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

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

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

      \[\leadsto \color{blue}{x + \frac{z - t}{\frac{a - t}{y - x}}} \]
    4. Step-by-step derivation
      1. clear-num79.9%

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

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

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

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

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

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

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

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

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

    if -1.02000000000000002e-22 < t < -1.45e-79

    1. Initial program 80.2%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} + x \]
    5. Simplified73.0%

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

    if -1.45e-79 < t < -8.6000000000000006e-173

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.6000000000000006e-173 < t < 6e22

    1. Initial program 89.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.3 \cdot 10^{+194}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq -1.02 \cdot 10^{-22}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-79}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq -8.6 \cdot 10^{-173}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+22}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 8.4 \cdot 10^{+114}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \end{array} \]

Alternative 5: 65.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z}{\frac{a}{y - x}}\\ t_2 := x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{if}\;a \leq -1.4 \cdot 10^{+140}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{+117}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-103}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 33000000000:\\ \;\;\;\;y - z \cdot \frac{y - x}{t}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+110}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+196}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ z (/ a (- y x))))) (t_2 (+ x (/ (- y x) (/ a z)))))
   (if (<= a -1.4e+140)
     t_1
     (if (<= a -1.8e+117)
       (+ y (* z (/ x t)))
       (if (<= a -2.5e-103)
         t_2
         (if (<= a 33000000000.0)
           (- y (* z (/ (- y x) t)))
           (if (<= a 1.4e+110)
             t_1
             (if (<= a 4.5e+196) (* y (/ (- z t) (- a t))) t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z / (a / (y - x)));
	double t_2 = x + ((y - x) / (a / z));
	double tmp;
	if (a <= -1.4e+140) {
		tmp = t_1;
	} else if (a <= -1.8e+117) {
		tmp = y + (z * (x / t));
	} else if (a <= -2.5e-103) {
		tmp = t_2;
	} else if (a <= 33000000000.0) {
		tmp = y - (z * ((y - x) / t));
	} else if (a <= 1.4e+110) {
		tmp = t_1;
	} else if (a <= 4.5e+196) {
		tmp = y * ((z - t) / (a - t));
	} 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 + (z / (a / (y - x)))
    t_2 = x + ((y - x) / (a / z))
    if (a <= (-1.4d+140)) then
        tmp = t_1
    else if (a <= (-1.8d+117)) then
        tmp = y + (z * (x / t))
    else if (a <= (-2.5d-103)) then
        tmp = t_2
    else if (a <= 33000000000.0d0) then
        tmp = y - (z * ((y - x) / t))
    else if (a <= 1.4d+110) then
        tmp = t_1
    else if (a <= 4.5d+196) then
        tmp = y * ((z - t) / (a - t))
    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 + (z / (a / (y - x)));
	double t_2 = x + ((y - x) / (a / z));
	double tmp;
	if (a <= -1.4e+140) {
		tmp = t_1;
	} else if (a <= -1.8e+117) {
		tmp = y + (z * (x / t));
	} else if (a <= -2.5e-103) {
		tmp = t_2;
	} else if (a <= 33000000000.0) {
		tmp = y - (z * ((y - x) / t));
	} else if (a <= 1.4e+110) {
		tmp = t_1;
	} else if (a <= 4.5e+196) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z / (a / (y - x)))
	t_2 = x + ((y - x) / (a / z))
	tmp = 0
	if a <= -1.4e+140:
		tmp = t_1
	elif a <= -1.8e+117:
		tmp = y + (z * (x / t))
	elif a <= -2.5e-103:
		tmp = t_2
	elif a <= 33000000000.0:
		tmp = y - (z * ((y - x) / t))
	elif a <= 1.4e+110:
		tmp = t_1
	elif a <= 4.5e+196:
		tmp = y * ((z - t) / (a - t))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z / Float64(a / Float64(y - x))))
	t_2 = Float64(x + Float64(Float64(y - x) / Float64(a / z)))
	tmp = 0.0
	if (a <= -1.4e+140)
		tmp = t_1;
	elseif (a <= -1.8e+117)
		tmp = Float64(y + Float64(z * Float64(x / t)));
	elseif (a <= -2.5e-103)
		tmp = t_2;
	elseif (a <= 33000000000.0)
		tmp = Float64(y - Float64(z * Float64(Float64(y - x) / t)));
	elseif (a <= 1.4e+110)
		tmp = t_1;
	elseif (a <= 4.5e+196)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z / (a / (y - x)));
	t_2 = x + ((y - x) / (a / z));
	tmp = 0.0;
	if (a <= -1.4e+140)
		tmp = t_1;
	elseif (a <= -1.8e+117)
		tmp = y + (z * (x / t));
	elseif (a <= -2.5e-103)
		tmp = t_2;
	elseif (a <= 33000000000.0)
		tmp = y - (z * ((y - x) / t));
	elseif (a <= 1.4e+110)
		tmp = t_1;
	elseif (a <= 4.5e+196)
		tmp = y * ((z - t) / (a - t));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.4e+140], t$95$1, If[LessEqual[a, -1.8e+117], N[(y + N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.5e-103], t$95$2, If[LessEqual[a, 33000000000.0], N[(y - N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.4e+110], t$95$1, If[LessEqual[a, 4.5e+196], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{z}{\frac{a}{y - x}}\\
t_2 := x + \frac{y - x}{\frac{a}{z}}\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{+140}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq -2.5 \cdot 10^{-103}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;a \leq 1.4 \cdot 10^{+110}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.39999999999999991e140 or 3.3e10 < a < 1.39999999999999993e110

    1. Initial program 64.0%

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

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

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

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

    if -1.39999999999999991e140 < a < -1.80000000000000006e117

    1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot z} \]
      2. *-commutative100.0%

        \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    7. Simplified100.0%

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

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

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

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

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

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

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

    if -1.80000000000000006e117 < a < -2.49999999999999983e-103 or 4.49999999999999978e196 < a

    1. Initial program 71.5%

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

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

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

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

    if -2.49999999999999983e-103 < a < 3.3e10

    1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot z} \]
      2. *-commutative83.5%

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

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

    if 1.39999999999999993e110 < a < 4.49999999999999978e196

    1. Initial program 65.1%

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

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

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

      \[\leadsto \color{blue}{x + \frac{z - t}{\frac{a - t}{y - x}}} \]
    4. Step-by-step derivation
      1. clear-num79.8%

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

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

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

        \[\leadsto x + \frac{z - t}{\color{blue}{\frac{1}{\frac{y - x}{a - t}}}} \]
    7. Simplified79.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+140}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{+117}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-103}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 33000000000:\\ \;\;\;\;y - z \cdot \frac{y - x}{t}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+110}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+196}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \end{array} \]

Alternative 6: 66.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z}{\frac{a}{y - x}}\\ t_2 := x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{if}\;a \leq -1.4 \cdot 10^{+140}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{+118}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-103}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 820000000000:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{+108}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+196}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ z (/ a (- y x))))) (t_2 (+ x (/ (- y x) (/ a z)))))
   (if (<= a -1.4e+140)
     t_1
     (if (<= a -3.6e+118)
       (+ y (* z (/ x t)))
       (if (<= a -2.5e-103)
         t_2
         (if (<= a 820000000000.0)
           (+ y (/ (- x y) (/ t z)))
           (if (<= a 3.9e+108)
             t_1
             (if (<= a 4.5e+196) (* y (/ (- z t) (- a t))) t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z / (a / (y - x)));
	double t_2 = x + ((y - x) / (a / z));
	double tmp;
	if (a <= -1.4e+140) {
		tmp = t_1;
	} else if (a <= -3.6e+118) {
		tmp = y + (z * (x / t));
	} else if (a <= -2.5e-103) {
		tmp = t_2;
	} else if (a <= 820000000000.0) {
		tmp = y + ((x - y) / (t / z));
	} else if (a <= 3.9e+108) {
		tmp = t_1;
	} else if (a <= 4.5e+196) {
		tmp = y * ((z - t) / (a - t));
	} 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 + (z / (a / (y - x)))
    t_2 = x + ((y - x) / (a / z))
    if (a <= (-1.4d+140)) then
        tmp = t_1
    else if (a <= (-3.6d+118)) then
        tmp = y + (z * (x / t))
    else if (a <= (-2.5d-103)) then
        tmp = t_2
    else if (a <= 820000000000.0d0) then
        tmp = y + ((x - y) / (t / z))
    else if (a <= 3.9d+108) then
        tmp = t_1
    else if (a <= 4.5d+196) then
        tmp = y * ((z - t) / (a - t))
    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 + (z / (a / (y - x)));
	double t_2 = x + ((y - x) / (a / z));
	double tmp;
	if (a <= -1.4e+140) {
		tmp = t_1;
	} else if (a <= -3.6e+118) {
		tmp = y + (z * (x / t));
	} else if (a <= -2.5e-103) {
		tmp = t_2;
	} else if (a <= 820000000000.0) {
		tmp = y + ((x - y) / (t / z));
	} else if (a <= 3.9e+108) {
		tmp = t_1;
	} else if (a <= 4.5e+196) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z / (a / (y - x)))
	t_2 = x + ((y - x) / (a / z))
	tmp = 0
	if a <= -1.4e+140:
		tmp = t_1
	elif a <= -3.6e+118:
		tmp = y + (z * (x / t))
	elif a <= -2.5e-103:
		tmp = t_2
	elif a <= 820000000000.0:
		tmp = y + ((x - y) / (t / z))
	elif a <= 3.9e+108:
		tmp = t_1
	elif a <= 4.5e+196:
		tmp = y * ((z - t) / (a - t))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z / Float64(a / Float64(y - x))))
	t_2 = Float64(x + Float64(Float64(y - x) / Float64(a / z)))
	tmp = 0.0
	if (a <= -1.4e+140)
		tmp = t_1;
	elseif (a <= -3.6e+118)
		tmp = Float64(y + Float64(z * Float64(x / t)));
	elseif (a <= -2.5e-103)
		tmp = t_2;
	elseif (a <= 820000000000.0)
		tmp = Float64(y + Float64(Float64(x - y) / Float64(t / z)));
	elseif (a <= 3.9e+108)
		tmp = t_1;
	elseif (a <= 4.5e+196)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z / (a / (y - x)));
	t_2 = x + ((y - x) / (a / z));
	tmp = 0.0;
	if (a <= -1.4e+140)
		tmp = t_1;
	elseif (a <= -3.6e+118)
		tmp = y + (z * (x / t));
	elseif (a <= -2.5e-103)
		tmp = t_2;
	elseif (a <= 820000000000.0)
		tmp = y + ((x - y) / (t / z));
	elseif (a <= 3.9e+108)
		tmp = t_1;
	elseif (a <= 4.5e+196)
		tmp = y * ((z - t) / (a - t));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.4e+140], t$95$1, If[LessEqual[a, -3.6e+118], N[(y + N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.5e-103], t$95$2, If[LessEqual[a, 820000000000.0], N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.9e+108], t$95$1, If[LessEqual[a, 4.5e+196], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{z}{\frac{a}{y - x}}\\
t_2 := x + \frac{y - x}{\frac{a}{z}}\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{+140}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq -2.5 \cdot 10^{-103}:\\
\;\;\;\;t_2\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.39999999999999991e140 or 8.2e11 < a < 3.89999999999999985e108

    1. Initial program 64.0%

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

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

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

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

    if -1.39999999999999991e140 < a < -3.6e118

    1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot z} \]
      2. *-commutative100.0%

        \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    7. Simplified100.0%

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

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

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

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

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

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

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

    if -3.6e118 < a < -2.49999999999999983e-103 or 4.49999999999999978e196 < a

    1. Initial program 71.5%

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

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

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

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

    if -2.49999999999999983e-103 < a < 8.2e11

    1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot z} \]
      2. *-commutative83.5%

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

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

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

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

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

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

    if 3.89999999999999985e108 < a < 4.49999999999999978e196

    1. Initial program 65.1%

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

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

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

      \[\leadsto \color{blue}{x + \frac{z - t}{\frac{a - t}{y - x}}} \]
    4. Step-by-step derivation
      1. clear-num79.8%

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

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

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

        \[\leadsto x + \frac{z - t}{\color{blue}{\frac{1}{\frac{y - x}{a - t}}}} \]
    7. Simplified79.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+140}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{+118}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-103}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 820000000000:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{+108}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+196}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \end{array} \]

Alternative 7: 66.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z}{\frac{a}{y - x}}\\ t_2 := x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{if}\;a \leq -1.4 \cdot 10^{+140}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.55 \cdot 10^{+110}:\\ \;\;\;\;y - \frac{a - z}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-103}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{+20}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+110}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+196}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ z (/ a (- y x))))) (t_2 (+ x (/ (- y x) (/ a z)))))
   (if (<= a -1.4e+140)
     t_1
     (if (<= a -2.55e+110)
       (- y (/ (- a z) (/ t x)))
       (if (<= a -2.5e-103)
         t_2
         (if (<= a 3.7e+20)
           (+ y (/ (- x y) (/ t z)))
           (if (<= a 4.5e+110)
             t_1
             (if (<= a 4.5e+196) (* y (/ (- z t) (- a t))) t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z / (a / (y - x)));
	double t_2 = x + ((y - x) / (a / z));
	double tmp;
	if (a <= -1.4e+140) {
		tmp = t_1;
	} else if (a <= -2.55e+110) {
		tmp = y - ((a - z) / (t / x));
	} else if (a <= -2.5e-103) {
		tmp = t_2;
	} else if (a <= 3.7e+20) {
		tmp = y + ((x - y) / (t / z));
	} else if (a <= 4.5e+110) {
		tmp = t_1;
	} else if (a <= 4.5e+196) {
		tmp = y * ((z - t) / (a - t));
	} 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 + (z / (a / (y - x)))
    t_2 = x + ((y - x) / (a / z))
    if (a <= (-1.4d+140)) then
        tmp = t_1
    else if (a <= (-2.55d+110)) then
        tmp = y - ((a - z) / (t / x))
    else if (a <= (-2.5d-103)) then
        tmp = t_2
    else if (a <= 3.7d+20) then
        tmp = y + ((x - y) / (t / z))
    else if (a <= 4.5d+110) then
        tmp = t_1
    else if (a <= 4.5d+196) then
        tmp = y * ((z - t) / (a - t))
    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 + (z / (a / (y - x)));
	double t_2 = x + ((y - x) / (a / z));
	double tmp;
	if (a <= -1.4e+140) {
		tmp = t_1;
	} else if (a <= -2.55e+110) {
		tmp = y - ((a - z) / (t / x));
	} else if (a <= -2.5e-103) {
		tmp = t_2;
	} else if (a <= 3.7e+20) {
		tmp = y + ((x - y) / (t / z));
	} else if (a <= 4.5e+110) {
		tmp = t_1;
	} else if (a <= 4.5e+196) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z / (a / (y - x)))
	t_2 = x + ((y - x) / (a / z))
	tmp = 0
	if a <= -1.4e+140:
		tmp = t_1
	elif a <= -2.55e+110:
		tmp = y - ((a - z) / (t / x))
	elif a <= -2.5e-103:
		tmp = t_2
	elif a <= 3.7e+20:
		tmp = y + ((x - y) / (t / z))
	elif a <= 4.5e+110:
		tmp = t_1
	elif a <= 4.5e+196:
		tmp = y * ((z - t) / (a - t))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z / Float64(a / Float64(y - x))))
	t_2 = Float64(x + Float64(Float64(y - x) / Float64(a / z)))
	tmp = 0.0
	if (a <= -1.4e+140)
		tmp = t_1;
	elseif (a <= -2.55e+110)
		tmp = Float64(y - Float64(Float64(a - z) / Float64(t / x)));
	elseif (a <= -2.5e-103)
		tmp = t_2;
	elseif (a <= 3.7e+20)
		tmp = Float64(y + Float64(Float64(x - y) / Float64(t / z)));
	elseif (a <= 4.5e+110)
		tmp = t_1;
	elseif (a <= 4.5e+196)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z / (a / (y - x)));
	t_2 = x + ((y - x) / (a / z));
	tmp = 0.0;
	if (a <= -1.4e+140)
		tmp = t_1;
	elseif (a <= -2.55e+110)
		tmp = y - ((a - z) / (t / x));
	elseif (a <= -2.5e-103)
		tmp = t_2;
	elseif (a <= 3.7e+20)
		tmp = y + ((x - y) / (t / z));
	elseif (a <= 4.5e+110)
		tmp = t_1;
	elseif (a <= 4.5e+196)
		tmp = y * ((z - t) / (a - t));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.4e+140], t$95$1, If[LessEqual[a, -2.55e+110], N[(y - N[(N[(a - z), $MachinePrecision] / N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.5e-103], t$95$2, If[LessEqual[a, 3.7e+20], N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.5e+110], t$95$1, If[LessEqual[a, 4.5e+196], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{z}{\frac{a}{y - x}}\\
t_2 := x + \frac{y - x}{\frac{a}{z}}\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{+140}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq -2.5 \cdot 10^{-103}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;a \leq 4.5 \cdot 10^{+110}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.39999999999999991e140 or 3.7e20 < a < 4.5000000000000003e110

    1. Initial program 64.0%

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

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

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

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

    if -1.39999999999999991e140 < a < -2.5500000000000001e110

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.5500000000000001e110 < a < -2.49999999999999983e-103 or 4.49999999999999978e196 < a

    1. Initial program 72.9%

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

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

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

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

    if -2.49999999999999983e-103 < a < 3.7e20

    1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot z} \]
      2. *-commutative83.5%

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

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

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

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

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

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

    if 4.5000000000000003e110 < a < 4.49999999999999978e196

    1. Initial program 65.1%

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

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

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

      \[\leadsto \color{blue}{x + \frac{z - t}{\frac{a - t}{y - x}}} \]
    4. Step-by-step derivation
      1. clear-num79.8%

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

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

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

        \[\leadsto x + \frac{z - t}{\color{blue}{\frac{1}{\frac{y - x}{a - t}}}} \]
    7. Simplified79.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+140}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;a \leq -2.55 \cdot 10^{+110}:\\ \;\;\;\;y - \frac{a - z}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-103}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{+20}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+110}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+196}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \end{array} \]

Alternative 8: 54.9% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq 1.56 \cdot 10^{-201}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 7.1 \cdot 10^{+45}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.49999999999999983e-103 or 7.1e45 < a

    1. Initial program 67.4%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} + x \]
    5. Simplified58.1%

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

    if -2.49999999999999983e-103 < a < 1.56e-201 or 8.0000000000000007e-195 < a < 7.1e45

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.56e-201 < a < 8.0000000000000007e-195

    1. Initial program 41.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z \cdot x}{t} - \frac{a \cdot x}{t}} \]
      7. div-sub99.4%

        \[\leadsto \color{blue}{\frac{z \cdot x - a \cdot x}{t}} \]
      8. distribute-rgt-out--99.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{-103}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 1.56 \cdot 10^{-201}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-195}:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;a \leq 7.1 \cdot 10^{+45}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \end{array} \]

Alternative 9: 55.2% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -1.28 \cdot 10^{+14}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.05 \cdot 10^{+48}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.39999999999999991e140 or 1.0499999999999999e48 < a

    1. Initial program 63.8%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} + x \]
    5. Simplified64.5%

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

    if -1.39999999999999991e140 < a < -1.28e14 or -2.49999999999999983e-103 < a < 1.0499999999999999e48

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot z} \]
      2. *-commutative79.1%

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

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

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

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

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

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

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

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

    if -1.28e14 < a < -2.49999999999999983e-103

    1. Initial program 84.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+140}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -1.28 \cdot 10^{+14}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-103}:\\ \;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{+48}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \end{array} \]

Alternative 10: 58.9% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.50000000000000003e91

    1. Initial program 45.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.50000000000000003e91 < x < -3.1e41

    1. Initial program 74.3%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} + x \]
    5. Simplified73.2%

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

    if -3.1e41 < x < 2.8000000000000001e105

    1. Initial program 72.8%

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

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

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

      \[\leadsto \color{blue}{x + \frac{z - t}{\frac{a - t}{y - x}}} \]
    4. Step-by-step derivation
      1. clear-num83.2%

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

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

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

        \[\leadsto x + \frac{z - t}{\color{blue}{\frac{1}{\frac{y - x}{a - t}}}} \]
    7. Simplified83.2%

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

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

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

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

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

    if 2.8000000000000001e105 < x

    1. Initial program 55.3%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z}{\frac{a}{x}}} \]
    5. Simplified59.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.5 \cdot 10^{+91}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{+41}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+105}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z}{\frac{a}{x}}\\ \end{array} \]

Alternative 11: 77.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{-108} \lor \neg \left(a \leq 1.85 \cdot 10^{-42}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.80000000000000004e-108 or 1.8500000000000001e-42 < a

    1. Initial program 66.9%

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

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

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

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

    if -6.80000000000000004e-108 < a < 1.8500000000000001e-42

    1. Initial program 60.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    10. Simplified90.2%

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

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

Alternative 12: 55.1% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.3000000000000001e-103 or 3.8000000000000001e41 < a

    1. Initial program 67.4%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} + x \]
    5. Simplified58.1%

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

    if -2.3000000000000001e-103 < a < 3.8000000000000001e41

    1. Initial program 61.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 49.1% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 3.1 \cdot 10^{+47}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.55e140 or 3.1000000000000001e47 < a

    1. Initial program 63.8%

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

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

    if -1.55e140 < a < 3.1000000000000001e47

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot z} \]
      2. *-commutative74.6%

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

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

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

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

Alternative 14: 37.8% accurate, 1.3× speedup?

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

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

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

\mathbf{elif}\;a \leq -1.9 \cdot 10^{-103}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.1 \cdot 10^{+43}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.4000000000000002e30 or -3.6e-101 < a < -1.9e-103 or 1.1e43 < a

    1. Initial program 66.0%

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

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

    if -3.4000000000000002e30 < a < -3.6e-101

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-z \cdot x}}{a} \]
      3. distribute-rgt-neg-in38.1%

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

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

    if -1.9e-103 < a < 1.1e43

    1. Initial program 61.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{+30}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-101}:\\ \;\;\;\;\frac{x \cdot \left(-z\right)}{a}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-103}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+43}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 39.7% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;a \leq 1.12 \cdot 10^{+42}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.09999999999999979e31 or 1.12e42 < a

    1. Initial program 65.7%

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

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

    if -2.09999999999999979e31 < a < 1.12e42

    1. Initial program 63.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+31}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+42}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 16: 2.8% accurate, 13.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 0 \]

Alternative 17: 25.7% accurate, 13.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 64.5%

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

    \[\leadsto \color{blue}{x} \]
  3. Final simplification26.7%

    \[\leadsto x \]

Developer target: 86.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023199 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))

  (+ x (/ (* (- y x) (- z t)) (- a t))))