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

Percentage Accurate: 68.3% → 88.6%
Time: 21.3s
Alternatives: 20
Speedup: 0.6×

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 20 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.3% 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: 88.6% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.11999999999999994e182

    1. Initial program 29.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.11999999999999994e182 < t < 1.1999999999999999e133

    1. Initial program 83.1%

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

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

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

    if 1.1999999999999999e133 < t

    1. Initial program 31.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 68.1% accurate, 0.3× speedup?

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -2.1e101 or 4.20000000000000022e49 < t

    1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1e101 < t < -7.00000000000000021e55

    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*99.2%

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

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

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

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

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

    if -7.00000000000000021e55 < t < -4.5999999999999997e-31

    1. Initial program 85.7%

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

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

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

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

    if -4.5999999999999997e-31 < t < 1.1499999999999999e-99

    1. Initial program 88.8%

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

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

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

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

    if 1.1499999999999999e-99 < t < 1.15e-21

    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*93.7%

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

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

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

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

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

    if 1.15e-21 < t < 4.20000000000000022e49

    1. Initial program 86.6%

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

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

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

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

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
    7. Simplified65.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+101}:\\ \;\;\;\;y - x \cdot \frac{a - z}{t}\\ \mathbf{elif}\;t \leq -7 \cdot 10^{+55}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-31}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-99}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-21}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+49}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{else}:\\ \;\;\;\;y - x \cdot \frac{a - z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 68.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{+98}:\\ \;\;\;\;y + \frac{x}{\frac{t}{z - a}}\\ \mathbf{elif}\;t \leq -1 \cdot 10^{+56}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-31}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-99}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-23}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+43}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{else}:\\ \;\;\;\;y - x \cdot \frac{a - z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.2e+98)
   (+ y (/ x (/ t (- z a))))
   (if (<= t -1e+56)
     (* z (/ (- y x) (- a t)))
     (if (<= t -4.6e-31)
       (/ (* y (- z t)) (- a t))
       (if (<= t 1.3e-99)
         (+ x (* (- y x) (/ z a)))
         (if (<= t 7.8e-23)
           (* y (/ (- z t) (- a t)))
           (if (<= t 3.3e+43)
             (+ x (* z (/ (- y x) a)))
             (- y (* x (/ (- a z) t))))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.2e+98) {
		tmp = y + (x / (t / (z - a)));
	} else if (t <= -1e+56) {
		tmp = z * ((y - x) / (a - t));
	} else if (t <= -4.6e-31) {
		tmp = (y * (z - t)) / (a - t);
	} else if (t <= 1.3e-99) {
		tmp = x + ((y - x) * (z / a));
	} else if (t <= 7.8e-23) {
		tmp = y * ((z - t) / (a - t));
	} else if (t <= 3.3e+43) {
		tmp = x + (z * ((y - x) / a));
	} else {
		tmp = y - (x * ((a - 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 <= (-1.2d+98)) then
        tmp = y + (x / (t / (z - a)))
    else if (t <= (-1d+56)) then
        tmp = z * ((y - x) / (a - t))
    else if (t <= (-4.6d-31)) then
        tmp = (y * (z - t)) / (a - t)
    else if (t <= 1.3d-99) then
        tmp = x + ((y - x) * (z / a))
    else if (t <= 7.8d-23) then
        tmp = y * ((z - t) / (a - t))
    else if (t <= 3.3d+43) then
        tmp = x + (z * ((y - x) / a))
    else
        tmp = y - (x * ((a - 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 <= -1.2e+98) {
		tmp = y + (x / (t / (z - a)));
	} else if (t <= -1e+56) {
		tmp = z * ((y - x) / (a - t));
	} else if (t <= -4.6e-31) {
		tmp = (y * (z - t)) / (a - t);
	} else if (t <= 1.3e-99) {
		tmp = x + ((y - x) * (z / a));
	} else if (t <= 7.8e-23) {
		tmp = y * ((z - t) / (a - t));
	} else if (t <= 3.3e+43) {
		tmp = x + (z * ((y - x) / a));
	} else {
		tmp = y - (x * ((a - z) / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.2e+98:
		tmp = y + (x / (t / (z - a)))
	elif t <= -1e+56:
		tmp = z * ((y - x) / (a - t))
	elif t <= -4.6e-31:
		tmp = (y * (z - t)) / (a - t)
	elif t <= 1.3e-99:
		tmp = x + ((y - x) * (z / a))
	elif t <= 7.8e-23:
		tmp = y * ((z - t) / (a - t))
	elif t <= 3.3e+43:
		tmp = x + (z * ((y - x) / a))
	else:
		tmp = y - (x * ((a - z) / t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.2e+98)
		tmp = Float64(y + Float64(x / Float64(t / Float64(z - a))));
	elseif (t <= -1e+56)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	elseif (t <= -4.6e-31)
		tmp = Float64(Float64(y * Float64(z - t)) / Float64(a - t));
	elseif (t <= 1.3e-99)
		tmp = Float64(x + Float64(Float64(y - x) * Float64(z / a)));
	elseif (t <= 7.8e-23)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	elseif (t <= 3.3e+43)
		tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a)));
	else
		tmp = Float64(y - Float64(x * Float64(Float64(a - z) / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -1.2e+98)
		tmp = y + (x / (t / (z - a)));
	elseif (t <= -1e+56)
		tmp = z * ((y - x) / (a - t));
	elseif (t <= -4.6e-31)
		tmp = (y * (z - t)) / (a - t);
	elseif (t <= 1.3e-99)
		tmp = x + ((y - x) * (z / a));
	elseif (t <= 7.8e-23)
		tmp = y * ((z - t) / (a - t));
	elseif (t <= 3.3e+43)
		tmp = x + (z * ((y - x) / a));
	else
		tmp = y - (x * ((a - z) / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.2e+98], N[(y + N[(x / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1e+56], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.6e-31], N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-99], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-23], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e+43], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y - N[(x * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if t < -1.1999999999999999e98

    1. Initial program 38.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \left(-\color{blue}{\frac{x}{\frac{t}{z - a}}}\right) \]
    12. Applied egg-rr73.2%

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

    if -1.1999999999999999e98 < t < -1.00000000000000009e56

    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*99.2%

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

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

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

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

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

    if -1.00000000000000009e56 < t < -4.5999999999999997e-31

    1. Initial program 85.7%

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

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

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

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

    if -4.5999999999999997e-31 < t < 1.30000000000000003e-99

    1. Initial program 88.8%

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

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

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

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

    if 1.30000000000000003e-99 < t < 7.8e-23

    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*93.7%

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

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

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

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

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

    if 7.8e-23 < t < 3.3000000000000001e43

    1. Initial program 86.6%

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

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

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

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

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
    7. Simplified65.1%

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

    if 3.3000000000000001e43 < t

    1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{+98}:\\ \;\;\;\;y + \frac{x}{\frac{t}{z - a}}\\ \mathbf{elif}\;t \leq -1 \cdot 10^{+56}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-31}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-99}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-23}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+43}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{else}:\\ \;\;\;\;y - x \cdot \frac{a - z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 67.8% accurate, 0.3× speedup?

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -7.6e99 or 6.2e41 < t

    1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.6e99 < t < -5.5000000000000004e55

    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*99.2%

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

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

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

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

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

    if -5.5000000000000004e55 < t < -4.5999999999999997e-31

    1. Initial program 85.7%

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

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

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

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

    if -4.5999999999999997e-31 < t < 3.19999999999999978e-101

    1. Initial program 88.8%

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

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

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

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

    if 3.19999999999999978e-101 < t < 1.49999999999999998e-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*93.7%

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

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

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

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

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

    if 1.49999999999999998e-24 < t < 6.2e41

    1. Initial program 86.6%

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

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

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

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

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
    7. Simplified65.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.6 \cdot 10^{+99}:\\ \;\;\;\;y - \frac{x}{t} \cdot \left(a - z\right)\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{+55}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-31}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-101}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-24}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+41}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{x}{t} \cdot \left(a - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 50.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq 2.6 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.55 \cdot 10^{+115}:\\
\;\;\;\;x + \left(y - x\right)\\

\mathbf{elif}\;t \leq 2.4 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.50000000000000007e85 or 5.99999999999999981e165 < 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*60.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{a \cdot \frac{x}{t}} \]
    13. Simplified59.8%

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

    if -4.50000000000000007e85 < t < 2.59999999999999998e53 or 1.55000000000000002e115 < t < 2.3999999999999999e133

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

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

    if 2.59999999999999998e53 < t < 1.55000000000000002e115

    1. Initial program 84.3%

      \[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}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    3. Simplified92.0%

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

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

    if 2.3999999999999999e133 < t < 5.99999999999999981e165

    1. Initial program 36.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} + 0 \]
    10. Applied egg-rr36.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+85}:\\ \;\;\;\;y - a \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+53}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+115}:\\ \;\;\;\;x + \left(y - x\right)\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+133}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+165}:\\ \;\;\;\;\left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;y - a \cdot \frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 46.7% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq -1.12 \cdot 10^{-170}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq -3.2 \cdot 10^{-186}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 4.8 \cdot 10^{+21}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4e52 or 4.8e21 < a

    1. Initial program 66.8%

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

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

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

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

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

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

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

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

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

    if -4e52 < a < -2.2999999999999999e-104

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2999999999999999e-104 < a < -1.12000000000000009e-170 or -3.2e-186 < a < 4.8e21

    1. Initial program 70.5%

      \[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}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    3. Simplified75.7%

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

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

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

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

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

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

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

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

    if -1.12000000000000009e-170 < a < -3.2e-186

    1. Initial program 59.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4 \cdot 10^{+52}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-104}:\\ \;\;\;\;y - a \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq -1.12 \cdot 10^{-170}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-186}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{+21}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 70.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -1.6 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.4 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.7999999999999997e94 or 1.4e52 < t

    1. Initial program 43.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.7999999999999997e94 < t < -1.6e31 or -1.89999999999999988e-29 < t < 1.4e52

    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*94.7%

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

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

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

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

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

    if -1.6e31 < t < -1.89999999999999988e-29

    1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+94}:\\ \;\;\;\;y - \frac{x}{t} \cdot \left(a - z\right)\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{+31}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-29}:\\ \;\;\;\;y - x \cdot \frac{a - z}{t}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+52}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{x}{t} \cdot \left(a - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 55.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;x \leq -1.2 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -3.5 \cdot 10^{-14}:\\
\;\;\;\;z \cdot \frac{x - y}{t}\\

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

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


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

    1. Initial program 45.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} + 0 \]
    10. Applied egg-rr53.2%

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

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

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

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

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

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

    if -1.70000000000000001e123 < x < -1.1999999999999999e80 or 1 < x

    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*79.5%

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

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

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

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

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

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

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

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

    if -1.1999999999999999e80 < x < -3.5000000000000002e-14

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

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

    if -3.5000000000000002e-14 < x < 1

    1. Initial program 79.3%

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

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

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

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

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

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

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

Alternative 9: 56.9% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;x \leq -4.1 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\

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

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

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


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

    1. Initial program 45.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} + 0 \]
    10. Applied egg-rr53.2%

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

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

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

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

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

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

    if -8.0000000000000003e121 < x < -4.10000000000000001e80 or 6 < x

    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*79.5%

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

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

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

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

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

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

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

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

    if -4.10000000000000001e80 < x < -1.40000000000000006e-18

    1. Initial program 73.6%

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

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

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

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

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

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

    if -1.40000000000000006e-18 < x < 6

    1. Initial program 79.3%

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

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

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

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

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

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

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

Alternative 10: 60.9% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq 6.6 \cdot 10^{-238}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 2.9 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6e52 or 2.90000000000000011e150 < a

    1. Initial program 68.4%

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

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

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

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

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

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

    if -6e52 < a < 6.59999999999999939e-238 or 4.39999999999999981e-29 < a < 2.90000000000000011e150

    1. Initial program 72.2%

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

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

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

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

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

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

    if 6.59999999999999939e-238 < a < 4.39999999999999981e-29

    1. Initial program 64.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{+52}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-238}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-29}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+150}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 58.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+121}:\\
\;\;\;\;\left(z - a\right) \cdot \frac{x}{t}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.5000000000000001e121

    1. Initial program 45.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} + 0 \]
    10. Applied egg-rr53.2%

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

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

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

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

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

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

    if -1.5000000000000001e121 < x < -2.59999999999999982e80

    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*73.5%

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

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

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

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

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

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

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

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

    if -2.59999999999999982e80 < x < -4.8000000000000001e-16

    1. Initial program 73.6%

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

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

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

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

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

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

    if -4.8000000000000001e-16 < x < 6.00000000000000015e-5

    1. Initial program 79.3%

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

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

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

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

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

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

    if 6.00000000000000015e-5 < x

    1. Initial program 64.6%

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

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

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

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

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

Alternative 12: 58.0% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{+121}:\\
\;\;\;\;\left(z - a\right) \cdot \frac{x}{t}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -3.70000000000000013e121

    1. Initial program 45.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} + 0 \]
    10. Applied egg-rr53.2%

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

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

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

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

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

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

    if -3.70000000000000013e121 < x < -8.4999999999999995e82

    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*73.5%

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

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

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

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

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

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

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

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

    if -8.4999999999999995e82 < x < -7.20000000000000001e-45

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.20000000000000001e-45 < x < 0.00239999999999999979

    1. Initial program 79.8%

      \[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}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    3. Simplified91.2%

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

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

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

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

    if 0.00239999999999999979 < x

    1. Initial program 64.6%

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

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

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

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

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

Alternative 13: 38.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -2 \cdot 10^{-186}:\\
\;\;\;\;y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.2e52 or 4.7999999999999997e-30 < a

    1. Initial program 69.2%

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

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

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

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

    if -6.2e52 < a < -1.9999999999999998e-186

    1. Initial program 76.2%

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

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

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

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

    if -1.9999999999999998e-186 < a < 4.7999999999999997e-30

    1. Initial program 66.5%

      \[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}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    3. Simplified71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{+52}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-186}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-30}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 42.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -1.75 \cdot 10^{-186}:\\
\;\;\;\;y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.15e52 or 2.5e-31 < a

    1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

    if -2.15e52 < a < -1.74999999999999995e-186

    1. Initial program 76.2%

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

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

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

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

    if -1.74999999999999995e-186 < a < 2.5e-31

    1. Initial program 66.5%

      \[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}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    3. Simplified71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 41.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -1.5 \cdot 10^{-186}:\\
\;\;\;\;y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.4e52 or 1.02000000000000002e-32 < a

    1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

    if -2.4e52 < a < -1.5000000000000001e-186

    1. Initial program 76.2%

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

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

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

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

    if -1.5000000000000001e-186 < a < 1.02000000000000002e-32

    1. Initial program 66.5%

      \[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}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    3. Simplified71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 75.0% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.8499999999999999e-29 or 3.20000000000000017e33 < t

    1. Initial program 52.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8499999999999999e-29 < t < 3.20000000000000017e33

    1. Initial program 88.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.85 \cdot 10^{-29} \lor \neg \left(t \leq 3.2 \cdot 10^{+33}\right):\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 75.0% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.0000000000000006e-30

    1. Initial program 58.1%

      \[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}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    3. Simplified75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - \color{blue}{\frac{z - a}{\frac{t}{y - x}}} \]

    if -7.0000000000000006e-30 < t < 3.5000000000000001e32

    1. Initial program 88.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*93.9%

        \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    3. Simplified93.9%

      \[\leadsto \color{blue}{x + \left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 71.8%

      \[\leadsto \color{blue}{x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*77.1%

        \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a}} \]
    7. Simplified77.1%

      \[\leadsto \color{blue}{x + \left(y - x\right) \cdot \frac{z - t}{a}} \]

    if 3.5000000000000001e32 < t

    1. Initial program 47.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*68.8%

        \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    3. Simplified68.8%

      \[\leadsto \color{blue}{x + \left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 64.3%

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    6. Step-by-step derivation
      1. associate--l+64.3%

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. associate-*r/64.3%

        \[\leadsto y + \left(\color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right)}{t}} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right) \]
      3. associate-*r/64.3%

        \[\leadsto y + \left(\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right)}{t} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(y - x\right)\right)}{t}}\right) \]
      4. div-sub64.3%

        \[\leadsto y + \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - -1 \cdot \left(a \cdot \left(y - x\right)\right)}{t}} \]
      5. distribute-lft-out--64.3%

        \[\leadsto y + \frac{\color{blue}{-1 \cdot \left(z \cdot \left(y - x\right) - a \cdot \left(y - x\right)\right)}}{t} \]
      6. associate-*r/64.3%

        \[\leadsto y + \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      7. mul-1-neg64.3%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      8. unsub-neg64.3%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      9. div-sub64.3%

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      10. associate-/l*75.3%

        \[\leadsto y - \left(\frac{z \cdot \left(y - x\right)}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      11. associate-/l*85.5%

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - a \cdot \frac{y - x}{t}\right) \]
      12. distribute-rgt-out--85.5%

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
    7. Simplified85.5%

      \[\leadsto \color{blue}{y - \frac{y - x}{t} \cdot \left(z - a\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification78.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{-30}:\\ \;\;\;\;y + \frac{a - z}{\frac{t}{y - x}}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+32}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 37.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+52}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-193}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-29}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2.5e+52)
   x
   (if (<= a -4.5e-193) y (if (<= a 3.8e-29) (* x (/ z t)) x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.5e+52) {
		tmp = x;
	} else if (a <= -4.5e-193) {
		tmp = y;
	} else if (a <= 3.8e-29) {
		tmp = x * (z / t);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-2.5d+52)) then
        tmp = x
    else if (a <= (-4.5d-193)) then
        tmp = y
    else if (a <= 3.8d-29) then
        tmp = x * (z / t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.5e+52) {
		tmp = x;
	} else if (a <= -4.5e-193) {
		tmp = y;
	} else if (a <= 3.8e-29) {
		tmp = x * (z / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2.5e+52:
		tmp = x
	elif a <= -4.5e-193:
		tmp = y
	elif a <= 3.8e-29:
		tmp = x * (z / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2.5e+52)
		tmp = x;
	elseif (a <= -4.5e-193)
		tmp = y;
	elseif (a <= 3.8e-29)
		tmp = Float64(x * Float64(z / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2.5e+52)
		tmp = x;
	elseif (a <= -4.5e-193)
		tmp = y;
	elseif (a <= 3.8e-29)
		tmp = x * (z / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e+52], x, If[LessEqual[a, -4.5e-193], y, If[LessEqual[a, 3.8e-29], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+52}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -4.5 \cdot 10^{-193}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 3.8 \cdot 10^{-29}:\\
\;\;\;\;x \cdot \frac{z}{t}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.5e52 or 3.79999999999999976e-29 < a

    1. Initial program 69.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*88.8%

        \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    3. Simplified88.8%

      \[\leadsto \color{blue}{x + \left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 43.3%

      \[\leadsto \color{blue}{x} \]

    if -2.5e52 < a < -4.4999999999999999e-193

    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*83.1%

        \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    3. Simplified83.1%

      \[\leadsto \color{blue}{x + \left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 41.3%

      \[\leadsto \color{blue}{y} \]

    if -4.4999999999999999e-193 < a < 3.79999999999999976e-29

    1. Initial program 66.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}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    3. Simplified72.5%

      \[\leadsto \color{blue}{x + \left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 79.4%

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    6. Step-by-step derivation
      1. associate--l+79.4%

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. associate-*r/79.4%

        \[\leadsto y + \left(\color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right)}{t}} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right) \]
      3. associate-*r/79.4%

        \[\leadsto y + \left(\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right)}{t} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(y - x\right)\right)}{t}}\right) \]
      4. div-sub79.5%

        \[\leadsto y + \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - -1 \cdot \left(a \cdot \left(y - x\right)\right)}{t}} \]
      5. distribute-lft-out--79.5%

        \[\leadsto y + \frac{\color{blue}{-1 \cdot \left(z \cdot \left(y - x\right) - a \cdot \left(y - x\right)\right)}}{t} \]
      6. associate-*r/79.5%

        \[\leadsto y + \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      7. mul-1-neg79.5%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      8. unsub-neg79.5%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      9. div-sub79.4%

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      10. associate-/l*77.0%

        \[\leadsto y - \left(\frac{z \cdot \left(y - x\right)}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      11. associate-/l*83.2%

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - a \cdot \frac{y - x}{t}\right) \]
      12. distribute-rgt-out--84.6%

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
    7. Simplified84.6%

      \[\leadsto \color{blue}{y - \frac{y - x}{t} \cdot \left(z - a\right)} \]
    8. Taylor expanded in y around 0 43.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - a\right)}{t}} \]
    9. Taylor expanded in z around inf 38.7%

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. associate-/l*43.8%

        \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
    11. Simplified43.8%

      \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+52}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-193}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-29}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 38.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{+96}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{+43}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.3e+96) y (if (<= t 1.02e+43) x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.3e+96) {
		tmp = y;
	} else if (t <= 1.02e+43) {
		tmp = x;
	} 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) :: tmp
    if (t <= (-1.3d+96)) then
        tmp = y
    else if (t <= 1.02d+43) then
        tmp = x
    else
        tmp = y
    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.3e+96) {
		tmp = y;
	} else if (t <= 1.02e+43) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.3e+96:
		tmp = y
	elif t <= 1.02e+43:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.3e+96)
		tmp = y;
	elseif (t <= 1.02e+43)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -1.3e+96)
		tmp = y;
	elseif (t <= 1.02e+43)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.3e+96], y, If[LessEqual[t, 1.02e+43], x, y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+96}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1.02 \cdot 10^{+43}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.3e96 or 1.02e43 < t

    1. Initial program 42.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*65.9%

        \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    3. Simplified65.9%

      \[\leadsto \color{blue}{x + \left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 46.0%

      \[\leadsto \color{blue}{y} \]

    if -1.3e96 < t < 1.02e43

    1. Initial program 87.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*93.8%

        \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    3. Simplified93.8%

      \[\leadsto \color{blue}{x + \left(y - x\right) \cdot \frac{z - t}{a - t}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 34.4%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{+96}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{+43}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 25.6% 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 69.8%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. associate-/l*82.7%

      \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
  3. Simplified82.7%

    \[\leadsto \color{blue}{x + \left(y - x\right) \cdot \frac{z - t}{a - t}} \]
  4. Add Preprocessing
  5. Taylor expanded in a around inf 24.7%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification24.7%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 87.1% accurate, 0.5× 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 2024046 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :alt
  (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))))