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

Percentage Accurate: 68.2% → 91.7%
Time: 26.2s
Alternatives: 21
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 21 alternatives:

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

Initial Program: 68.2% 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: 91.7% accurate, 0.5× speedup?

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

\\
y \cdot \frac{z - t}{a - t} - x \cdot \left(\frac{z}{a - t} + \left(-1 - \frac{t}{a - t}\right)\right)
\end{array}
Derivation
  1. Initial program 67.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 37.6% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -46000000000000:\\
\;\;\;\;z \cdot \frac{x}{t}\\

\mathbf{elif}\;t \leq -7.2 \cdot 10^{-215}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.02 \cdot 10^{-169}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.8 \cdot 10^{+86}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.59999999999999995e119 or 2.80000000000000004e86 < t

    1. Initial program 37.7%

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

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

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

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

    if -1.59999999999999995e119 < t < -4.6e13

    1. Initial program 60.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{x}{t}} \]
    12. Simplified46.4%

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

    if -4.6e13 < t < -7.1999999999999998e-215 or 1.01999999999999996e-169 < t < 2.80000000000000004e86

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

    if -7.1999999999999998e-215 < t < 1.01999999999999996e-169

    1. Initial program 95.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+119}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -46000000000000:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{-215}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-169}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+86}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 3: 36.8% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;t \leq -1.16 \cdot 10^{-212}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 6.2 \cdot 10^{-170}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.3 \cdot 10^{+86}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.39999999999999997e217 or 2.2999999999999999e86 < t

    1. Initial program 39.5%

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

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

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

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

    if -1.39999999999999997e217 < t < -2.5e13

    1. Initial program 44.9%

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\left(\frac{\left(y - x\right) \cdot z}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      4. *-commutative61.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-sub61.5%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{\frac{t}{x}} - \color{blue}{\frac{a}{\frac{t}{x}}} \]
      5. div-sub44.1%

        \[\leadsto \color{blue}{\frac{z - a}{\frac{t}{x}}} \]
      6. associate-/r/44.0%

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

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

    if -2.5e13 < t < -1.16e-212 or 6.19999999999999971e-170 < t < 2.2999999999999999e86

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

    if -1.16e-212 < t < 6.19999999999999971e-170

    1. Initial program 95.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{+217}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -25000000000000:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -1.16 \cdot 10^{-212}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-170}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+86}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 4: 36.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + a \cdot \frac{y}{t}\\ t_2 := y \cdot \frac{z}{a - t}\\ \mathbf{if}\;t \leq -1.15 \cdot 10^{+216}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -18000000000000:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-214}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-170}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+86}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ y (* a (/ y t)))) (t_2 (* y (/ z (- a t)))))
   (if (<= t -1.15e+216)
     t_1
     (if (<= t -18000000000000.0)
       (* x (/ (- z a) t))
       (if (<= t -1.5e-214)
         t_2
         (if (<= t 1.02e-170) x (if (<= t 1.8e+86) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y + (a * (y / t));
	double t_2 = y * (z / (a - t));
	double tmp;
	if (t <= -1.15e+216) {
		tmp = t_1;
	} else if (t <= -18000000000000.0) {
		tmp = x * ((z - a) / t);
	} else if (t <= -1.5e-214) {
		tmp = t_2;
	} else if (t <= 1.02e-170) {
		tmp = x;
	} else if (t <= 1.8e+86) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y + (a * (y / t))
    t_2 = y * (z / (a - t))
    if (t <= (-1.15d+216)) then
        tmp = t_1
    else if (t <= (-18000000000000.0d0)) then
        tmp = x * ((z - a) / t)
    else if (t <= (-1.5d-214)) then
        tmp = t_2
    else if (t <= 1.02d-170) then
        tmp = x
    else if (t <= 1.8d+86) then
        tmp = t_2
    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 = y + (a * (y / t));
	double t_2 = y * (z / (a - t));
	double tmp;
	if (t <= -1.15e+216) {
		tmp = t_1;
	} else if (t <= -18000000000000.0) {
		tmp = x * ((z - a) / t);
	} else if (t <= -1.5e-214) {
		tmp = t_2;
	} else if (t <= 1.02e-170) {
		tmp = x;
	} else if (t <= 1.8e+86) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y + (a * (y / t))
	t_2 = y * (z / (a - t))
	tmp = 0
	if t <= -1.15e+216:
		tmp = t_1
	elif t <= -18000000000000.0:
		tmp = x * ((z - a) / t)
	elif t <= -1.5e-214:
		tmp = t_2
	elif t <= 1.02e-170:
		tmp = x
	elif t <= 1.8e+86:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y + Float64(a * Float64(y / t)))
	t_2 = Float64(y * Float64(z / Float64(a - t)))
	tmp = 0.0
	if (t <= -1.15e+216)
		tmp = t_1;
	elseif (t <= -18000000000000.0)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (t <= -1.5e-214)
		tmp = t_2;
	elseif (t <= 1.02e-170)
		tmp = x;
	elseif (t <= 1.8e+86)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y + (a * (y / t));
	t_2 = y * (z / (a - t));
	tmp = 0.0;
	if (t <= -1.15e+216)
		tmp = t_1;
	elseif (t <= -18000000000000.0)
		tmp = x * ((z - a) / t);
	elseif (t <= -1.5e-214)
		tmp = t_2;
	elseif (t <= 1.02e-170)
		tmp = x;
	elseif (t <= 1.8e+86)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e+216], t$95$1, If[LessEqual[t, -18000000000000.0], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.5e-214], t$95$2, If[LessEqual[t, 1.02e-170], x, If[LessEqual[t, 1.8e+86], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -1.5 \cdot 10^{-214}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 1.02 \cdot 10^{-170}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.8 \cdot 10^{+86}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.14999999999999998e216 or 1.80000000000000003e86 < t

    1. Initial program 39.5%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{t}{a - t}\right)} \cdot y \]
    8. Step-by-step derivation
      1. neg-mul-162.4%

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{y}{t}} + y \]
      2. +-commutative62.5%

        \[\leadsto \color{blue}{y + a \cdot \frac{y}{t}} \]
    12. Simplified62.5%

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

    if -1.14999999999999998e216 < t < -1.8e13

    1. Initial program 44.9%

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\left(\frac{\left(y - x\right) \cdot z}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      4. *-commutative61.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-sub61.5%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{\frac{t}{x}} - \color{blue}{\frac{a}{\frac{t}{x}}} \]
      5. div-sub44.1%

        \[\leadsto \color{blue}{\frac{z - a}{\frac{t}{x}}} \]
      6. associate-/r/44.0%

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

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

    if -1.8e13 < t < -1.49999999999999997e-214 or 1.02e-170 < t < 1.80000000000000003e86

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

    if -1.49999999999999997e-214 < t < 1.02e-170

    1. Initial program 95.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{+216}:\\ \;\;\;\;y + a \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq -18000000000000:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-214}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-170}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+86}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + a \cdot \frac{y}{t}\\ \end{array} \]

Alternative 5: 36.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + a \cdot \frac{y}{t}\\ t_2 := y \cdot \frac{z}{a - t}\\ \mathbf{if}\;t \leq -2.6 \cdot 10^{+216}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -7500000000000:\\ \;\;\;\;\frac{z - a}{\frac{t}{x}}\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-216}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-170}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+86}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ y (* a (/ y t)))) (t_2 (* y (/ z (- a t)))))
   (if (<= t -2.6e+216)
     t_1
     (if (<= t -7500000000000.0)
       (/ (- z a) (/ t x))
       (if (<= t -1.05e-216)
         t_2
         (if (<= t 5.4e-170) x (if (<= t 1.75e+86) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y + (a * (y / t));
	double t_2 = y * (z / (a - t));
	double tmp;
	if (t <= -2.6e+216) {
		tmp = t_1;
	} else if (t <= -7500000000000.0) {
		tmp = (z - a) / (t / x);
	} else if (t <= -1.05e-216) {
		tmp = t_2;
	} else if (t <= 5.4e-170) {
		tmp = x;
	} else if (t <= 1.75e+86) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y + (a * (y / t))
    t_2 = y * (z / (a - t))
    if (t <= (-2.6d+216)) then
        tmp = t_1
    else if (t <= (-7500000000000.0d0)) then
        tmp = (z - a) / (t / x)
    else if (t <= (-1.05d-216)) then
        tmp = t_2
    else if (t <= 5.4d-170) then
        tmp = x
    else if (t <= 1.75d+86) then
        tmp = t_2
    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 = y + (a * (y / t));
	double t_2 = y * (z / (a - t));
	double tmp;
	if (t <= -2.6e+216) {
		tmp = t_1;
	} else if (t <= -7500000000000.0) {
		tmp = (z - a) / (t / x);
	} else if (t <= -1.05e-216) {
		tmp = t_2;
	} else if (t <= 5.4e-170) {
		tmp = x;
	} else if (t <= 1.75e+86) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y + (a * (y / t))
	t_2 = y * (z / (a - t))
	tmp = 0
	if t <= -2.6e+216:
		tmp = t_1
	elif t <= -7500000000000.0:
		tmp = (z - a) / (t / x)
	elif t <= -1.05e-216:
		tmp = t_2
	elif t <= 5.4e-170:
		tmp = x
	elif t <= 1.75e+86:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y + Float64(a * Float64(y / t)))
	t_2 = Float64(y * Float64(z / Float64(a - t)))
	tmp = 0.0
	if (t <= -2.6e+216)
		tmp = t_1;
	elseif (t <= -7500000000000.0)
		tmp = Float64(Float64(z - a) / Float64(t / x));
	elseif (t <= -1.05e-216)
		tmp = t_2;
	elseif (t <= 5.4e-170)
		tmp = x;
	elseif (t <= 1.75e+86)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y + (a * (y / t));
	t_2 = y * (z / (a - t));
	tmp = 0.0;
	if (t <= -2.6e+216)
		tmp = t_1;
	elseif (t <= -7500000000000.0)
		tmp = (z - a) / (t / x);
	elseif (t <= -1.05e-216)
		tmp = t_2;
	elseif (t <= 5.4e-170)
		tmp = x;
	elseif (t <= 1.75e+86)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.6e+216], t$95$1, If[LessEqual[t, -7500000000000.0], N[(N[(z - a), $MachinePrecision] / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.05e-216], t$95$2, If[LessEqual[t, 5.4e-170], x, If[LessEqual[t, 1.75e+86], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -7500000000000:\\
\;\;\;\;\frac{z - a}{\frac{t}{x}}\\

\mathbf{elif}\;t \leq -1.05 \cdot 10^{-216}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 5.4 \cdot 10^{-170}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.75 \cdot 10^{+86}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.5999999999999999e216 or 1.75000000000000009e86 < t

    1. Initial program 39.5%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{t}{a - t}\right)} \cdot y \]
    8. Step-by-step derivation
      1. neg-mul-162.4%

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{y}{t}} + y \]
      2. +-commutative62.5%

        \[\leadsto \color{blue}{y + a \cdot \frac{y}{t}} \]
    12. Simplified62.5%

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

    if -2.5999999999999999e216 < t < -7.5e12

    1. Initial program 44.9%

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\left(\frac{\left(y - x\right) \cdot z}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      4. *-commutative61.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-sub61.5%

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

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

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

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

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

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

    if -7.5e12 < t < -1.0500000000000001e-216 or 5.3999999999999997e-170 < t < 1.75000000000000009e86

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

    if -1.0500000000000001e-216 < t < 5.3999999999999997e-170

    1. Initial program 95.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+216}:\\ \;\;\;\;y + a \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq -7500000000000:\\ \;\;\;\;\frac{z - a}{\frac{t}{x}}\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-216}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-170}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+86}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + a \cdot \frac{y}{t}\\ \end{array} \]

Alternative 6: 42.0% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;a \leq -1.55 \cdot 10^{-184}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -2.55 \cdot 10^{-294}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 6.6 \cdot 10^{-8}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.39999999999999975e105 or 6.59999999999999954e-8 < a

    1. Initial program 64.7%

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

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

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

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

    if -2.39999999999999975e105 < a < -7.20000000000000025e-66

    1. Initial program 65.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{t}{a - t}\right)} \cdot y \]
    8. Step-by-step derivation
      1. neg-mul-148.9%

        \[\leadsto \color{blue}{\left(-\frac{t}{a - t}\right)} \cdot y \]
      2. distribute-neg-frac48.9%

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{y}{t}} + y \]
      2. +-commutative46.1%

        \[\leadsto \color{blue}{y + a \cdot \frac{y}{t}} \]
    12. Simplified46.1%

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

    if -7.20000000000000025e-66 < a < -1.5500000000000001e-184 or -2.55000000000000003e-294 < a < 6.59999999999999954e-8

    1. Initial program 73.9%

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\left(\frac{\left(y - x\right) \cdot z}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      4. *-commutative75.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-sub80.3%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    9. Simplified62.6%

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

    if -1.5500000000000001e-184 < a < -2.55000000000000003e-294

    1. Initial program 49.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.4 \cdot 10^{+105}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{-66}:\\ \;\;\;\;y + a \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-184}:\\ \;\;\;\;\frac{x - y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq -2.55 \cdot 10^{-294}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-8}:\\ \;\;\;\;\frac{x - y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 7: 42.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -1.12 \cdot 10^{-69}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -2.4 \cdot 10^{-184}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -1.52 \cdot 10^{-294}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-8}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.5000000000000002e98 or 4.49999999999999993e-8 < a

    1. Initial program 64.7%

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

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

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

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

    if -4.5000000000000002e98 < a < -1.12e-69 or -2.40000000000000024e-184 < a < -1.52000000000000007e-294

    1. Initial program 59.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{t}{a - t}\right)} \cdot y \]
    8. Step-by-step derivation
      1. neg-mul-156.1%

        \[\leadsto \color{blue}{\left(-\frac{t}{a - t}\right)} \cdot y \]
      2. distribute-neg-frac56.1%

        \[\leadsto \color{blue}{\frac{-t}{a - t}} \cdot y \]
    9. Simplified56.1%

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

    if -1.12e-69 < a < -2.40000000000000024e-184 or -1.52000000000000007e-294 < a < 4.49999999999999993e-8

    1. Initial program 73.9%

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\left(\frac{\left(y - x\right) \cdot z}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      4. *-commutative75.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-sub80.3%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    9. Simplified62.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.5 \cdot 10^{+98}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.12 \cdot 10^{-69}:\\ \;\;\;\;y \cdot \frac{-t}{a - t}\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-184}:\\ \;\;\;\;\frac{x - y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq -1.52 \cdot 10^{-294}:\\ \;\;\;\;y \cdot \frac{-t}{a - t}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{x - y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8: 73.0% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.15e94 or 1.40000000000000008e31 < a

    1. Initial program 65.8%

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

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

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

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

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

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

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

    if -1.15e94 < a < -0.204999999999999988

    1. Initial program 66.0%

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

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

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

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

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

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

    if -0.204999999999999988 < a < 1.40000000000000008e31

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{+94}:\\ \;\;\;\;x + \frac{z - t}{\frac{a}{y - x}}\\ \mathbf{elif}\;a \leq -0.205:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+31}:\\ \;\;\;\;y - \frac{y - x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - t}{\frac{a}{y - x}}\\ \end{array} \]

Alternative 9: 86.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+116} \lor \neg \left(t \leq 4.8 \cdot 10^{+95}\right):\\
\;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.80000000000000004e116 or 4.8000000000000001e95 < t

    1. Initial program 36.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.80000000000000004e116 < t < 4.8000000000000001e95

    1. Initial program 85.2%

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

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

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

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

Alternative 10: 88.2% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.00000000000000002e116 or 5.00000000000000025e95 < t

    1. Initial program 36.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000002e116 < t < 5.00000000000000025e95

    1. Initial program 85.2%

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

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

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

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

Alternative 11: 36.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -8.5 \cdot 10^{-78}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq -7.2 \cdot 10^{-155}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -8.5 \cdot 10^{-303}:\\
\;\;\;\;y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.75000000000000011e97 or 8.0000000000000002e-8 < a

    1. Initial program 64.7%

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

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

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

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

    if -2.75000000000000011e97 < a < -8.49999999999999957e-78 or -7.19999999999999977e-155 < a < -8.5e-303

    1. Initial program 59.1%

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

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

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

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

    if -8.49999999999999957e-78 < a < -7.19999999999999977e-155 or -8.5e-303 < a < 8.0000000000000002e-8

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{x}{t}} \]
    12. Simplified36.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.75 \cdot 10^{+97}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-78}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{-155}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-303}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-8}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 12: 37.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -8.5 \cdot 10^{-71}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq -5.4 \cdot 10^{-303}:\\
\;\;\;\;y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -8.0000000000000004e96 or 5.99999999999999996e-9 < a

    1. Initial program 64.7%

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

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

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

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

    if -8.0000000000000004e96 < a < -8.49999999999999988e-71 or -5.2000000000000003e-153 < a < -5.39999999999999972e-303

    1. Initial program 59.1%

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

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

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

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

    if -8.49999999999999988e-71 < a < -5.2000000000000003e-153

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{x}{t}} \]
    12. Simplified49.4%

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

    if -5.39999999999999972e-303 < a < 5.99999999999999996e-9

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    10. Simplified33.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{+96}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-71}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-153}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq -5.4 \cdot 10^{-303}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-9}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 48.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -1.75 \cdot 10^{-299}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 4.1 \cdot 10^{+80}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.75e103 or 4.10000000000000001e80 < a

    1. Initial program 65.2%

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

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

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

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

    if -1.75e103 < a < -1.74999999999999995e-299 or 5.4999999999999994e-169 < a < 4.10000000000000001e80

    1. Initial program 63.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.74999999999999995e-299 < a < 5.4999999999999994e-169

    1. Initial program 81.9%

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\left(\frac{\left(y - x\right) \cdot z}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      4. *-commutative85.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-sub85.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.75 \cdot 10^{+103}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-299}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-169}:\\ \;\;\;\;\frac{x - y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{+80}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 14: 49.7% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -2.6 \cdot 10^{-294}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 9 \cdot 10^{+34}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.44999999999999984e156 or 9.0000000000000001e34 < a

    1. Initial program 63.5%

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

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

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

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

    if -2.44999999999999984e156 < a < -2.5999999999999999e-294 or 1.99999999999999985e-163 < a < 9.0000000000000001e34

    1. Initial program 64.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.5999999999999999e-294 < a < 1.99999999999999985e-163

    1. Initial program 82.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.45 \cdot 10^{+156}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-294}:\\ \;\;\;\;y + \frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-163}:\\ \;\;\;\;\frac{x - y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+34}:\\ \;\;\;\;y + \frac{z}{\frac{t}{x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 56.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{+142}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.69999999999999983e142

    1. Initial program 38.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - a}{\frac{t}{x}}} \]
      6. associate-/r/43.6%

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

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

    if -2.69999999999999983e142 < x < -3.4e15 or 1.7999999999999999e146 < x

    1. Initial program 60.4%

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

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

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

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

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

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

    if -3.4e15 < x < 1.7999999999999999e146

    1. Initial program 77.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{+142}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;x \leq -3.4 \cdot 10^{+15} \lor \neg \left(x \leq 1.8 \cdot 10^{+146}\right):\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]

Alternative 16: 66.7% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.84999999999999993e118

    1. Initial program 32.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.84999999999999993e118 < t < -1.7999999999999999e-85

    1. Initial program 68.7%

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

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

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

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

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

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

    if -1.7999999999999999e-85 < t < 4.59999999999999968e-30

    1. Initial program 89.3%

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

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

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

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

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

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

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

    if 4.59999999999999968e-30 < t

    1. Initial program 55.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.85 \cdot 10^{+118}:\\ \;\;\;\;y + \frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-85}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-30}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]

Alternative 17: 70.1% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.95e101 or 1.75e28 < a

    1. Initial program 65.8%

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

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

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

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

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

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

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

    if -1.95e101 < a < -2.2e5

    1. Initial program 66.0%

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

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

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

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

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

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

    if -2.2e5 < a < 1.75e28

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.95 \cdot 10^{+101}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -220000:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{+28}:\\ \;\;\;\;y - \frac{y - x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \end{array} \]

Alternative 18: 74.3% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.4e11 or 2.6e-24 < t

    1. Initial program 49.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.4e11 < t < 2.6e-24

    1. Initial program 87.9%

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

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

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

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

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

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

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

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

Alternative 19: 55.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.4 \cdot 10^{+80}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.39999999999999992e80

    1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{\frac{t}{x}} - \color{blue}{\frac{a}{\frac{t}{x}}} \]
      5. div-sub38.7%

        \[\leadsto \color{blue}{\frac{z - a}{\frac{t}{x}}} \]
      6. associate-/r/43.6%

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

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

    if -3.39999999999999992e80 < x < 3.70000000000000011e158

    1. Initial program 75.1%

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

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

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

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

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

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

    if 3.70000000000000011e158 < x

    1. Initial program 55.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 38.3% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;a \leq 1.75 \cdot 10^{+29}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.6000000000000002e105 or 1.74999999999999989e29 < a

    1. Initial program 65.8%

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

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

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

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

    if -2.6000000000000002e105 < a < 1.74999999999999989e29

    1. Initial program 67.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{+105}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{+29}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification24.0%

    \[\leadsto x \]

Developer target: 86.7% 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 2023274 
(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))))