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

Percentage Accurate: 68.2% → 88.4%
Time: 13.2s
Alternatives: 18
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 18 alternatives:

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

Initial Program: 68.2% accurate, 1.0× speedup?

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

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

Alternative 1: 88.4% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+97}:\\ \;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+53}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -2.6e+97)
   (+ y (* (/ (- y x) t) (- a z)))
   (if (<= t 8e+53)
     (fma (- y x) (/ (- z t) (- a t)) x)
     (+ y (* (- y x) (/ (- a z) t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -2.6e+97) {
		tmp = y + (((y - x) / t) * (a - z));
	} else if (t <= 8e+53) {
		tmp = fma((y - x), ((z - t) / (a - t)), x);
	} else {
		tmp = y + ((y - x) * ((a - z) / t));
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -2.6e+97)
		tmp = Float64(y + Float64(Float64(Float64(y - x) / t) * Float64(a - z)));
	elseif (t <= 8e+53)
		tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x);
	else
		tmp = Float64(y + Float64(Float64(y - x) * Float64(Float64(a - z) / t)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.6e+97], N[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e+53], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y + N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 35.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 66.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}} \]
    4. Step-by-step derivation
      1. associate--l+66.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. distribute-lft-out--66.0%

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

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

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

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

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

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

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

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

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

    if -2.6e97 < t < 7.9999999999999999e53

    1. Initial program 83.3%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified94.0%

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

    if 7.9999999999999999e53 < t

    1. Initial program 41.1%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified60.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num59.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow59.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr59.9%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-159.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified59.9%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 71.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}} \]
    10. Step-by-step derivation
      1. associate--l+71.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/71.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/71.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. mul-1-neg71.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+97}:\\ \;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+53}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 69.6% accurate, 0.4× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -4.99999999999999973e-21 or 1.05e7 < a

    1. Initial program 72.1%

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

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

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

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

    if -4.99999999999999973e-21 < a < -6.4e-50

    1. Initial program 51.9%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified51.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num51.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow51.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr51.5%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-151.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified51.5%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 84.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}} \]
    10. Step-by-step derivation
      1. associate--l+84.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/84.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/84.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. mul-1-neg84.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    14. Simplified99.5%

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

    if -6.4e-50 < a < -2.29999999999999995e-72

    1. Initial program 99.2%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num100.0%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow100.0%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr100.0%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-1100.0%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified100.0%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in z around inf 100.0%

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

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

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

    if -2.29999999999999995e-72 < a < -2.15e-136

    1. Initial program 80.0%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified83.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num83.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow83.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr83.7%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-183.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified83.7%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in y around inf 75.2%

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

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

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

    if -2.15e-136 < a < 1.05e7

    1. Initial program 60.3%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num72.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow72.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr72.7%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-172.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified72.7%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 80.2%

      \[\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}} \]
    10. Step-by-step derivation
      1. associate--l+80.2%

        \[\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/80.2%

        \[\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/80.2%

        \[\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. mul-1-neg80.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5 \cdot 10^{-21}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{-50}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-72}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq -2.15 \cdot 10^{-136}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 10500000:\\ \;\;\;\;y + \frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 76.7% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.19999999999999996e-20 or 2.5000000000000002e96 < a

    1. Initial program 73.9%

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

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

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

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

    if -1.19999999999999996e-20 < a < -1.65e-102

    1. Initial program 73.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 77.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}} \]
    4. Step-by-step derivation
      1. associate--l+77.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. distribute-lft-out--77.5%

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

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

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

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

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

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

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

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

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

    if -1.65e-102 < a < -8.49999999999999942e-135

    1. Initial program 85.4%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified92.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num92.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow92.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr92.3%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-192.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified92.3%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in y around -inf 69.7%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a - t}{z - t}}} \]
      3. div-inv84.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
      4. add-cube-cbrt83.2%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}{\frac{a - t}{z - t}} \]
      5. *-un-lft-identity83.2%

        \[\leadsto \frac{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}{\color{blue}{1 \cdot \frac{a - t}{z - t}}} \]
      6. times-frac83.2%

        \[\leadsto \color{blue}{\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{a - t}{z - t}}} \]
      7. pow283.2%

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{y}\right)}^{2}}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{a - t}{z - t}} \]
    11. Applied egg-rr83.2%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{y}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{a - t}{z - t}}} \]
    12. Step-by-step derivation
      1. /-rgt-identity83.2%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{y}\right)}^{2}} \cdot \frac{\sqrt[3]{y}}{\frac{a - t}{z - t}} \]
      2. associate-*r/83.2%

        \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{y}\right)}^{2} \cdot \sqrt[3]{y}}{\frac{a - t}{z - t}}} \]
      3. unpow283.2%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)} \cdot \sqrt[3]{y}}{\frac{a - t}{z - t}} \]
      4. rem-3cbrt-lft84.2%

        \[\leadsto \frac{\color{blue}{y}}{\frac{a - t}{z - t}} \]
    13. Simplified84.2%

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

    if -8.49999999999999942e-135 < a < 2.5000000000000002e96

    1. Initial program 60.4%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified74.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num74.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow74.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr74.3%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-174.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified74.3%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 74.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}} \]
    10. Step-by-step derivation
      1. associate--l+74.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/74.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/74.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. mul-1-neg74.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{-20}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-102}:\\ \;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-135}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{+96}:\\ \;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(y - x\right) \cdot \frac{a - z}{t}\\ t_2 := x + y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a \leq -5.2 \cdot 10^{-21}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-102}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.02 \cdot 10^{-134}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{+96}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ y (* (- y x) (/ (- a z) t))))
        (t_2 (+ x (* y (/ (- z t) (- a t))))))
   (if (<= a -5.2e-21)
     t_2
     (if (<= a -6.8e-102)
       t_1
       (if (<= a -1.02e-134)
         (/ y (/ (- a t) (- z t)))
         (if (<= a 2.5e+96) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y + ((y - x) * ((a - z) / t));
	double t_2 = x + (y * ((z - t) / (a - t)));
	double tmp;
	if (a <= -5.2e-21) {
		tmp = t_2;
	} else if (a <= -6.8e-102) {
		tmp = t_1;
	} else if (a <= -1.02e-134) {
		tmp = y / ((a - t) / (z - t));
	} else if (a <= 2.5e+96) {
		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 + ((y - x) * ((a - z) / t))
    t_2 = x + (y * ((z - t) / (a - t)))
    if (a <= (-5.2d-21)) then
        tmp = t_2
    else if (a <= (-6.8d-102)) then
        tmp = t_1
    else if (a <= (-1.02d-134)) then
        tmp = y / ((a - t) / (z - t))
    else if (a <= 2.5d+96) 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 + ((y - x) * ((a - z) / t));
	double t_2 = x + (y * ((z - t) / (a - t)));
	double tmp;
	if (a <= -5.2e-21) {
		tmp = t_2;
	} else if (a <= -6.8e-102) {
		tmp = t_1;
	} else if (a <= -1.02e-134) {
		tmp = y / ((a - t) / (z - t));
	} else if (a <= 2.5e+96) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y + ((y - x) * ((a - z) / t))
	t_2 = x + (y * ((z - t) / (a - t)))
	tmp = 0
	if a <= -5.2e-21:
		tmp = t_2
	elif a <= -6.8e-102:
		tmp = t_1
	elif a <= -1.02e-134:
		tmp = y / ((a - t) / (z - t))
	elif a <= 2.5e+96:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y + Float64(Float64(y - x) * Float64(Float64(a - z) / t)))
	t_2 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t))))
	tmp = 0.0
	if (a <= -5.2e-21)
		tmp = t_2;
	elseif (a <= -6.8e-102)
		tmp = t_1;
	elseif (a <= -1.02e-134)
		tmp = Float64(y / Float64(Float64(a - t) / Float64(z - t)));
	elseif (a <= 2.5e+96)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y + ((y - x) * ((a - z) / t));
	t_2 = x + (y * ((z - t) / (a - t)));
	tmp = 0.0;
	if (a <= -5.2e-21)
		tmp = t_2;
	elseif (a <= -6.8e-102)
		tmp = t_1;
	elseif (a <= -1.02e-134)
		tmp = y / ((a - t) / (z - t));
	elseif (a <= 2.5e+96)
		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[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.2e-21], t$95$2, If[LessEqual[a, -6.8e-102], t$95$1, If[LessEqual[a, -1.02e-134], N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.5e+96], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -6.8 \cdot 10^{-102}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 2.5 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.20000000000000035e-21 or 2.5000000000000002e96 < a

    1. Initial program 73.9%

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

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

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

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

    if -5.20000000000000035e-21 < a < -6.80000000000000026e-102 or -1.02e-134 < a < 2.5000000000000002e96

    1. Initial program 62.7%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified74.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num74.1%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow74.1%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr74.1%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-174.1%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified74.1%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 74.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}} \]
    10. Step-by-step derivation
      1. associate--l+74.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/74.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/74.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. mul-1-neg74.9%

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

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

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

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

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

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

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

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

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

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

    if -6.80000000000000026e-102 < a < -1.02e-134

    1. Initial program 85.4%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified92.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num92.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow92.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr92.3%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-192.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified92.3%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in y around -inf 69.7%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a - t}{z - t}}} \]
      3. div-inv84.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
      4. add-cube-cbrt83.2%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}{\frac{a - t}{z - t}} \]
      5. *-un-lft-identity83.2%

        \[\leadsto \frac{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}{\color{blue}{1 \cdot \frac{a - t}{z - t}}} \]
      6. times-frac83.2%

        \[\leadsto \color{blue}{\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{a - t}{z - t}}} \]
      7. pow283.2%

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{y}\right)}^{2}}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{a - t}{z - t}} \]
    11. Applied egg-rr83.2%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{y}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{a - t}{z - t}}} \]
    12. Step-by-step derivation
      1. /-rgt-identity83.2%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{y}\right)}^{2}} \cdot \frac{\sqrt[3]{y}}{\frac{a - t}{z - t}} \]
      2. associate-*r/83.2%

        \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{y}\right)}^{2} \cdot \sqrt[3]{y}}{\frac{a - t}{z - t}}} \]
      3. unpow283.2%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)} \cdot \sqrt[3]{y}}{\frac{a - t}{z - t}} \]
      4. rem-3cbrt-lft84.2%

        \[\leadsto \frac{\color{blue}{y}}{\frac{a - t}{z - t}} \]
    13. Simplified84.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.2 \cdot 10^{-21}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-102}:\\ \;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\ \mathbf{elif}\;a \leq -1.02 \cdot 10^{-134}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{+96}:\\ \;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 77.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x + t\_1\\ \mathbf{if}\;a \leq -1.8 \cdot 10^{-23}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-72}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq -1.12 \cdot 10^{-135}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-55}:\\ \;\;\;\;y + \frac{z}{t} \cdot \left(x - y\right)\\ \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 t_1)))
   (if (<= a -1.8e-23)
     t_2
     (if (<= a -1.2e-72)
       (* z (/ (- y x) (- a t)))
       (if (<= a -1.12e-135)
         t_1
         (if (<= a 1.45e-55) (+ y (* (/ z t) (- x y))) 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 + t_1;
	double tmp;
	if (a <= -1.8e-23) {
		tmp = t_2;
	} else if (a <= -1.2e-72) {
		tmp = z * ((y - x) / (a - t));
	} else if (a <= -1.12e-135) {
		tmp = t_1;
	} else if (a <= 1.45e-55) {
		tmp = y + ((z / t) * (x - y));
	} 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 + t_1
    if (a <= (-1.8d-23)) then
        tmp = t_2
    else if (a <= (-1.2d-72)) then
        tmp = z * ((y - x) / (a - t))
    else if (a <= (-1.12d-135)) then
        tmp = t_1
    else if (a <= 1.45d-55) then
        tmp = y + ((z / t) * (x - y))
    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 + t_1;
	double tmp;
	if (a <= -1.8e-23) {
		tmp = t_2;
	} else if (a <= -1.2e-72) {
		tmp = z * ((y - x) / (a - t));
	} else if (a <= -1.12e-135) {
		tmp = t_1;
	} else if (a <= 1.45e-55) {
		tmp = y + ((z / t) * (x - y));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	t_2 = x + t_1
	tmp = 0
	if a <= -1.8e-23:
		tmp = t_2
	elif a <= -1.2e-72:
		tmp = z * ((y - x) / (a - t))
	elif a <= -1.12e-135:
		tmp = t_1
	elif a <= 1.45e-55:
		tmp = y + ((z / t) * (x - y))
	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 + t_1)
	tmp = 0.0
	if (a <= -1.8e-23)
		tmp = t_2;
	elseif (a <= -1.2e-72)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	elseif (a <= -1.12e-135)
		tmp = t_1;
	elseif (a <= 1.45e-55)
		tmp = Float64(y + Float64(Float64(z / t) * Float64(x - y)));
	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 + t_1;
	tmp = 0.0;
	if (a <= -1.8e-23)
		tmp = t_2;
	elseif (a <= -1.2e-72)
		tmp = z * ((y - x) / (a - t));
	elseif (a <= -1.12e-135)
		tmp = t_1;
	elseif (a <= 1.45e-55)
		tmp = y + ((z / t) * (x - y));
	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 + t$95$1), $MachinePrecision]}, If[LessEqual[a, -1.8e-23], t$95$2, If[LessEqual[a, -1.2e-72], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.12e-135], t$95$1, If[LessEqual[a, 1.45e-55], N[(y + N[(N[(z / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -1.12 \cdot 10^{-135}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.7999999999999999e-23 or 1.45e-55 < a

    1. Initial program 70.7%

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

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

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

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

    if -1.7999999999999999e-23 < a < -1.2e-72

    1. Initial program 90.1%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified90.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num90.2%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow90.2%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr90.2%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-190.2%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified90.2%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in z around inf 99.8%

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
    11. Simplified99.8%

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

    if -1.2e-72 < a < -1.12e-135

    1. Initial program 80.0%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified83.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num83.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow83.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr83.7%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-183.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified83.7%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in y around inf 75.2%

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

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

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

    if -1.12e-135 < a < 1.45e-55

    1. Initial program 59.3%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num71.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow71.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr71.3%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-171.3%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 84.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}} \]
    10. Step-by-step derivation
      1. associate--l+84.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/84.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/84.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. mul-1-neg84.3%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 63.8% accurate, 0.4× speedup?

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

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

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

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

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


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

    1. Initial program 71.4%

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

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

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

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

    if -2.2500000000000001e-20 < a < -9.79999999999999948e-51

    1. Initial program 51.9%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified51.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num51.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow51.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr51.5%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-151.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified51.5%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 84.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}} \]
    10. Step-by-step derivation
      1. associate--l+84.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/84.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/84.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. mul-1-neg84.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    14. Simplified99.5%

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

    if -9.79999999999999948e-51 < a < -2.7999999999999998e-72

    1. Initial program 99.2%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num100.0%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow100.0%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr100.0%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-1100.0%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified100.0%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in z around inf 100.0%

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

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

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

    if -2.7999999999999998e-72 < a < 0.00125000000000000003

    1. Initial program 65.1%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified75.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num75.2%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow75.2%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr75.2%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-175.2%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified75.2%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in y around inf 72.1%

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

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

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

Alternative 7: 60.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -1.6 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.9999999999999998e-7 or 2.5999999999999999e111 < a

    1. Initial program 74.5%

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

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

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

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

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

    if -3.9999999999999998e-7 < a < -1.6e-72 or 15 < a < 2.5999999999999999e111

    1. Initial program 65.2%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified79.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num79.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow79.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr79.3%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-179.3%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in z around inf 64.6%

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

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

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

    if -1.6e-72 < a < 15

    1. Initial program 64.8%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified74.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num74.8%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow74.8%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr74.8%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-174.8%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified74.8%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in y around inf 71.8%

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

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    11. Simplified71.8%

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

Alternative 8: 56.3% accurate, 0.5× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 0.00156:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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


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

    1. Initial program 71.4%

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

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

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

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

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

    if -3.1999999999999997e-20 < a < -4e-52

    1. Initial program 51.9%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified51.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num51.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow51.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr51.5%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-151.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified51.5%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 84.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}} \]
    10. Step-by-step derivation
      1. associate--l+84.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/84.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/84.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. mul-1-neg84.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    14. Simplified99.5%

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

    if -4e-52 < a < -1.2e-72

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

    if -1.2e-72 < a < 0.00155999999999999997

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\frac{z}{t} + -1\right) \cdot y} \]
      5. distribute-lft-neg-in63.7%

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

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

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

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

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

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

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

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

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

Alternative 9: 38.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -1.7 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 0.0017:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 2.5 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.15e-6 or 2.5000000000000002e96 < a

    1. Initial program 73.6%

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

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

    if -1.15e-6 < a < -1.69999999999999991e-77 or 0.00169999999999999991 < a < 2.5000000000000002e96

    1. Initial program 66.9%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified78.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num78.8%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow78.8%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr78.8%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-178.8%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified78.8%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 53.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}} \]
    10. Step-by-step derivation
      1. associate--l+53.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/53.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/53.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. mul-1-neg53.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.69999999999999991e-77 < a < 0.00169999999999999991

    1. Initial program 64.8%

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 10: 60.6% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.99999999999999945e-21 or 7.00000000000000038e86 < a

    1. Initial program 73.3%

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

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

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

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

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

    if -9.99999999999999945e-21 < a < -6.2000000000000004e-50

    1. Initial program 51.9%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified51.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num51.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow51.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr51.5%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-151.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified51.5%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 84.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}} \]
    10. Step-by-step derivation
      1. associate--l+84.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/84.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/84.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. mul-1-neg84.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    14. Simplified99.5%

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

    if -6.2000000000000004e-50 < a < 7.00000000000000038e86

    1. Initial program 65.8%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified77.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num77.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow77.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr77.4%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-177.4%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in y around inf 67.1%

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

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

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

Alternative 11: 88.5% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 35.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 66.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}} \]
    4. Step-by-step derivation
      1. associate--l+66.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. distribute-lft-out--66.0%

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

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

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

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

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

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

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

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

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

    if -6.99999999999999953e100 < t < 7.9999999999999999e53

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.9999999999999999e53 < t

    1. Initial program 41.1%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified60.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num59.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow59.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr59.9%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-159.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified59.9%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 71.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}} \]
    10. Step-by-step derivation
      1. associate--l+71.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/71.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/71.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. mul-1-neg71.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 83.5% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 38.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 66.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}} \]
    4. Step-by-step derivation
      1. associate--l+66.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. distribute-lft-out--66.3%

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

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

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

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

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

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

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

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

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

    if -1.85e71 < t < 6.79999999999999995e53

    1. Initial program 83.5%

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

    if 6.79999999999999995e53 < t

    1. Initial program 41.1%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified60.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num59.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow59.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr59.9%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-159.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified59.9%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 71.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}} \]
    10. Step-by-step derivation
      1. associate--l+71.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/71.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/71.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. mul-1-neg71.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 48.4% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.19999999999999996e32 or 2.4e84 < a

    1. Initial program 74.0%

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

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

    if -1.19999999999999996e32 < a < -3.3999999999999998e-72

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.3999999999999998e-72 < a < 2.4e84

    1. Initial program 64.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\frac{z}{t} + -1\right) \cdot y} \]
      5. distribute-lft-neg-in58.3%

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

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

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

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

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

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

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

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

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

Alternative 14: 48.4% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.8500000000000001e-6 or 2.9000000000000001e90 < a

    1. Initial program 73.0%

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

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

    if -1.8500000000000001e-6 < a < -2.02000000000000007e-50

    1. Initial program 64.9%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified64.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num64.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow64.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr64.4%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-164.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified64.4%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 56.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}} \]
    10. Step-by-step derivation
      1. associate--l+56.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/56.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/56.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. mul-1-neg56.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    14. Simplified65.1%

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

    if -2.02000000000000007e-50 < a < 2.9000000000000001e90

    1. Initial program 65.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\frac{z}{t} + -1\right) \cdot y} \]
      5. distribute-lft-neg-in57.3%

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

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

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

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

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

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

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

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

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

Alternative 15: 38.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -1.1 \cdot 10^{-62}:\\
\;\;\;\;y \cdot \frac{z}{a}\\

\mathbf{elif}\;a \leq 7.7 \cdot 10^{+84}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.50000000000000029e-17 or 7.7000000000000003e84 < a

    1. Initial program 72.8%

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

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

    if -9.50000000000000029e-17 < a < -1.10000000000000009e-62

    1. Initial program 77.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    9. Simplified49.1%

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

    if -1.10000000000000009e-62 < a < 7.7000000000000003e84

    1. Initial program 64.5%

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 16: 38.5% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;a \leq 1.45 \cdot 10^{+84}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.46000000000000005e32 or 1.44999999999999994e84 < a

    1. Initial program 74.0%

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

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

    if -1.46000000000000005e32 < a < -5.10000000000000032e-77

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
    8. Simplified42.3%

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

    if -5.10000000000000032e-77 < a < 1.44999999999999994e84

    1. Initial program 63.7%

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 17: 38.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 1.4 \cdot 10^{+84}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.64999999999999998e-52 or 1.39999999999999991e84 < a

    1. Initial program 72.5%

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

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

    if -1.64999999999999998e-52 < a < 1.39999999999999991e84

    1. Initial program 65.6%

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 18: 26.0% 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 68.8%

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

    \[\leadsto \color{blue}{x} \]
  4. 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 2024091 
(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))))