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

Percentage Accurate: 68.0% → 88.6%
Time: 16.3s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 68.0% accurate, 1.0× speedup?

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

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

Alternative 1: 88.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{+175} \lor \neg \left(t \leq 1.65 \cdot 10^{+224}\right):\\ \;\;\;\;y + \left(y - x\right) \cdot \left(\frac{1}{t} \cdot \left(a - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -1.8e+175) (not (<= t 1.65e+224)))
   (+ y (* (- y x) (* (/ 1.0 t) (- a z))))
   (fma (- y x) (/ (- z t) (- a t)) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -1.8e+175) || !(t <= 1.65e+224)) {
		tmp = y + ((y - x) * ((1.0 / t) * (a - z)));
	} else {
		tmp = fma((y - x), ((z - t) / (a - t)), x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -1.8e+175) || !(t <= 1.65e+224))
		tmp = Float64(y + Float64(Float64(y - x) * Float64(Float64(1.0 / t) * Float64(a - z))));
	else
		tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.8e+175], N[Not[LessEqual[t, 1.65e+224]], $MachinePrecision]], N[(y + N[(N[(y - x), $MachinePrecision] * N[(N[(1.0 / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.80000000000000017e175 or 1.64999999999999998e224 < t

    1. Initial program 18.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    6. Step-by-step derivation
      1. associate--l+72.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/72.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/72.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-neg72.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. div-sub72.7%

        \[\leadsto y + \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - \left(-a \cdot \left(y - x\right)\right)}{t}} \]
      6. mul-1-neg72.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} \]
      7. distribute-lft-out--72.7%

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

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

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

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

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

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

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

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

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

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

    if -1.80000000000000017e175 < t < 1.64999999999999998e224

    1. Initial program 75.7%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification93.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{+175} \lor \neg \left(t \leq 1.65 \cdot 10^{+224}\right):\\ \;\;\;\;y + \left(y - x\right) \cdot \left(\frac{1}{t} \cdot \left(a - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 83.5% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.54999999999999992e175 or 1.21999999999999993e66 < t

    1. Initial program 26.6%

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

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

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

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

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

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

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

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

        \[\leadsto y + \left(\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right)}{t} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(y - x\right)\right)}{t}}\right) \]
      4. mul-1-neg64.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. div-sub64.3%

        \[\leadsto y + \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - \left(-a \cdot \left(y - x\right)\right)}{t}} \]
      6. mul-1-neg64.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} \]
      7. distribute-lft-out--64.3%

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

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

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

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

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

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

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

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

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

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

    if -1.54999999999999992e175 < t < -2.20000000000000001e70

    1. Initial program 40.2%

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

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

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

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

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

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

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

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

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

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

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

    if -2.20000000000000001e70 < t < 1.21999999999999993e66

    1. Initial program 88.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
  3. Recombined 3 regimes into one program.
  4. Final simplification86.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{+175}:\\ \;\;\;\;y + \left(y - x\right) \cdot \left(\frac{1}{t} \cdot \left(a - z\right)\right)\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{+70}:\\ \;\;\;\;x + \frac{1}{\frac{\frac{a - t}{y}}{z - t}}\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{+66}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + \left(y - x\right) \cdot \left(\frac{1}{t} \cdot \left(a - z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 77.7% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.5000000000000004e198 or 4.3999999999999997e84 < t

    1. Initial program 27.9%

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

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

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

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

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

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

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

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

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

        \[\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. div-sub68.8%

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

        \[\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} \]
      7. distribute-lft-out--68.8%

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

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

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

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

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

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

    if -5.5000000000000004e198 < t < -2.15000000000000013e66

    1. Initial program 33.7%

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

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

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

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

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

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

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

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

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

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

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

    if -2.15000000000000013e66 < t < 4.3999999999999997e84

    1. Initial program 87.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+198}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;t \leq -2.15 \cdot 10^{+66}:\\ \;\;\;\;x + \frac{1}{\frac{\frac{a - t}{y}}{z - t}}\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+84}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 72.9% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.5000000000000001e-36 or 3.5000000000000001e-37 < a

    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 a around inf 60.9%

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

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

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

    if -1.5000000000000001e-36 < a < 1.4500000000000001e-125

    1. Initial program 66.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    6. Step-by-step derivation
      1. associate--l+75.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/75.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/75.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-neg75.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. div-sub75.6%

        \[\leadsto y + \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - \left(-a \cdot \left(y - x\right)\right)}{t}} \]
      6. mul-1-neg75.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} \]
      7. distribute-lft-out--75.6%

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

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

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

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

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

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

    if 1.4500000000000001e-125 < a < 3.5000000000000001e-37

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.5 \cdot 10^{-36}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-125}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-37}:\\ \;\;\;\;x + \frac{1}{\frac{\frac{a - t}{y}}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 42.5% accurate, 0.5× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 3.9 \cdot 10^{-53}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.59999999999999994e-22 or 3.9000000000000002e-53 < a

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

    if -1.59999999999999994e-22 < a < -8.5000000000000003e-222 or 7.8000000000000006e-247 < a < 3.9000000000000002e-53

    1. Initial program 68.6%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified83.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-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 t around inf 49.3%

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

    if -8.5000000000000003e-222 < a < 7.8000000000000006e-247

    1. Initial program 61.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    6. Step-by-step derivation
      1. associate--l+84.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/84.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/84.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-neg84.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. div-sub84.7%

        \[\leadsto y + \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - \left(-a \cdot \left(y - x\right)\right)}{t}} \]
      6. mul-1-neg84.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} \]
      7. distribute-lft-out--84.7%

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

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

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

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

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

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

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

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

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

Alternative 6: 87.0% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.6e175 or 5.50000000000000008e85 < t

    1. Initial program 26.1%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    6. Step-by-step derivation
      1. associate--l+66.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/66.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/66.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-neg66.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. div-sub66.9%

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

        \[\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} \]
      7. distribute-lft-out--66.9%

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

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

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

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

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

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

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

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

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

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

    if -2.6e175 < t < 5.50000000000000008e85

    1. Initial program 81.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+175} \lor \neg \left(t \leq 5.5 \cdot 10^{+85}\right):\\ \;\;\;\;y + \left(y - x\right) \cdot \left(\frac{1}{t} \cdot \left(a - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - t\right) \cdot \left(\left(y - x\right) \cdot \frac{-1}{t - a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 53.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;z \leq -2.05 \cdot 10^{+43}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-270}:\\ \;\;\;\;x - t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+76}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* z (/ (- y x) (- a t)))))
   (if (<= z -2.05e+43)
     t_1
     (if (<= z 2.2e-270)
       (- x (* t (/ y a)))
       (if (<= z 3.6e+76) (+ y x) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -2.05e+43) {
		tmp = t_1;
	} else if (z <= 2.2e-270) {
		tmp = x - (t * (y / a));
	} else if (z <= 3.6e+76) {
		tmp = 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 = z * ((y - x) / (a - t))
    if (z <= (-2.05d+43)) then
        tmp = t_1
    else if (z <= 2.2d-270) then
        tmp = x - (t * (y / a))
    else if (z <= 3.6d+76) then
        tmp = 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 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -2.05e+43) {
		tmp = t_1;
	} else if (z <= 2.2e-270) {
		tmp = x - (t * (y / a));
	} else if (z <= 3.6e+76) {
		tmp = y + x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z * ((y - x) / (a - t))
	tmp = 0
	if z <= -2.05e+43:
		tmp = t_1
	elif z <= 2.2e-270:
		tmp = x - (t * (y / a))
	elif z <= 3.6e+76:
		tmp = y + x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z * Float64(Float64(y - x) / Float64(a - t)))
	tmp = 0.0
	if (z <= -2.05e+43)
		tmp = t_1;
	elseif (z <= 2.2e-270)
		tmp = Float64(x - Float64(t * Float64(y / a)));
	elseif (z <= 3.6e+76)
		tmp = Float64(y + x);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = z * ((y - x) / (a - t));
	tmp = 0.0;
	if (z <= -2.05e+43)
		tmp = t_1;
	elseif (z <= 2.2e-270)
		tmp = x - (t * (y / a));
	elseif (z <= 3.6e+76)
		tmp = y + x;
	else
		tmp = t_1;
	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]}, If[LessEqual[z, -2.05e+43], t$95$1, If[LessEqual[z, 2.2e-270], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+76], N[(y + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+76}:\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.05e43 or 3.6000000000000003e76 < z

    1. Initial program 61.7%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified89.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-num89.4%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr89.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-189.4%

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

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

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

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

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

    if -2.05e43 < z < 2.1999999999999998e-270

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1999999999999998e-270 < z < 3.6000000000000003e76

    1. Initial program 66.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+43}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-270}:\\ \;\;\;\;x - t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+76}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 49.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+198}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -19:\\
\;\;\;\;y + x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.15e198 or 4.5999999999999998e84 < t

    1. Initial program 27.9%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified61.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-num61.2%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr61.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-161.2%

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

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

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

    if -1.15e198 < t < -19

    1. Initial program 47.3%

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

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

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

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

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

    if -19 < t < 4.5999999999999998e84

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{+198}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -19:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+84}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 73.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.41999999999999996e-36 or 7.50000000000000023e-55 < a

    1. Initial program 66.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.3%

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

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

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

    if -1.41999999999999996e-36 < a < 7.50000000000000023e-55

    1. Initial program 67.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    6. Step-by-step derivation
      1. associate--l+73.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/73.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/73.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-neg73.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. div-sub73.1%

        \[\leadsto y + \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - \left(-a \cdot \left(y - x\right)\right)}{t}} \]
      6. mul-1-neg73.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} \]
      7. distribute-lft-out--73.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.42 \cdot 10^{-36} \lor \neg \left(a \leq 7.5 \cdot 10^{-55}\right):\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 64.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.64999999999999992e-24 or 3.1999999999999999e-37 < a

    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 a around inf 60.7%

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

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

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

    if -1.64999999999999992e-24 < a < 3.1999999999999999e-37

    1. Initial program 68.8%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified81.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-num81.7%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr81.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-181.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified81.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 70.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.65 \cdot 10^{-24} \lor \neg \left(a \leq 3.2 \cdot 10^{-37}\right):\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\ \mathbf{else}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 59.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.00068 \lor \neg \left(a \leq 2.75 \cdot 10^{-37}\right):\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.8e-4 or 2.7499999999999999e-37 < a

    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 0 62.1%

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

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

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

    if -6.8e-4 < a < 2.7499999999999999e-37

    1. Initial program 68.8%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified81.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-num81.3%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr81.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-181.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified81.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 70.5%

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

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

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

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

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

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

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

Alternative 12: 60.1% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.6000000000000001e-24 or 4.99999999999999973e65 < a

    1. Initial program 65.5%

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

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

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

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

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

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

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

    if -3.6000000000000001e-24 < a < 4.99999999999999973e65

    1. Initial program 68.4%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified81.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-num81.8%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr81.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-181.8%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified81.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 66.3%

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

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

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

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

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

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

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

Alternative 13: 59.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.00042:\\
\;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.2000000000000002e-4

    1. Initial program 68.5%

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

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

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

      \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
    6. Step-by-step derivation
      1. clear-num73.1%

        \[\leadsto x + z \cdot \color{blue}{\frac{1}{\frac{a}{y - x}}} \]
      2. un-div-inv73.2%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    7. Applied egg-rr73.2%

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

    if -4.2000000000000002e-4 < a < 2.64999999999999998e-37

    1. Initial program 68.8%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified81.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-num81.3%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr81.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-181.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified81.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 70.5%

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

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

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

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

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

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

    if 2.64999999999999998e-37 < a

    1. Initial program 62.6%

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

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

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

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

Alternative 14: 53.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.00047:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.69999999999999986e-4

    1. Initial program 68.5%

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

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

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

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

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

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

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

    if -4.69999999999999986e-4 < a < 3.40000000000000018e-37

    1. Initial program 68.8%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified81.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-num81.3%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr81.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-181.3%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified81.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 70.5%

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

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

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

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

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

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

    if 3.40000000000000018e-37 < a

    1. Initial program 62.6%

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

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

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

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

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

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

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

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

Alternative 15: 52.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{+196}:\\
\;\;\;\;y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.4e196 or 1.75e51 < t

    1. Initial program 29.5%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified65.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-num65.6%

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

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

      \[\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-165.6%

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

      \[\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.7%

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

    if -3.4e196 < t < 1.75e51

    1. Initial program 81.1%

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    8. Simplified57.7%

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

Alternative 16: 38.6% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 1.5 \cdot 10^{+60}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.3000000000000001e-23 or 1.4999999999999999e60 < a

    1. Initial program 65.5%

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

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

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

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

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

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

    if -2.3000000000000001e-23 < a < 1.4999999999999999e60

    1. Initial program 68.4%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified81.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-num81.8%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr81.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-181.8%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified81.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 41.2%

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

Alternative 17: 24.9% accurate, 13.0× speedup?

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer Target 1: 87.0% 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 2024170 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))

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