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

Percentage Accurate: 67.9% → 91.3%
Time: 19.1s
Alternatives: 22
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 22 alternatives:

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

Initial Program: 67.9% accurate, 1.0× speedup?

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

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

Alternative 1: 91.3% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{\left(t - z\right) \cdot \left(x - y\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-293} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\

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


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

    1. Initial program 69.8%

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

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

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

      \[\leadsto x + {\color{blue}{\left(\frac{a - t}{z - t} \cdot \frac{1}{y - x}\right)}}^{-1} \]
    7. Taylor expanded in t around inf 99.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}} \]
    8. Step-by-step derivation
      1. associate--l+99.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/99.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/99.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-neg99.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-sub99.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-neg99.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--99.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/99.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.3% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

      \[\leadsto x + {\color{blue}{\left(\frac{a - t}{z - t} \cdot \frac{1}{y - x}\right)}}^{-1} \]
    7. Taylor expanded in t around inf 99.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}} \]
    8. Step-by-step derivation
      1. associate--l+99.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/99.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/99.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-neg99.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-sub99.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-neg99.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--99.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/99.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 64.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + x \cdot \frac{z - a}{t}\\ t_2 := x + z \cdot \frac{y - x}{a}\\ \mathbf{if}\;a \leq -2.1 \cdot 10^{+240}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{+125}:\\ \;\;\;\;x + y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;a \leq -1.06 \cdot 10^{-10}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -4.3 \cdot 10^{-67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-277}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+73}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ y (* x (/ (- z a) t)))) (t_2 (+ x (* z (/ (- y x) a)))))
   (if (<= a -2.1e+240)
     (+ x (* (- y x) (/ z a)))
     (if (<= a -6.5e+125)
       (+ x (* y (/ t (- t a))))
       (if (<= a -1.06e-10)
         t_2
         (if (<= a -4.3e-67)
           t_1
           (if (<= a -2.2e-85)
             t_2
             (if (<= a 1.5e-277)
               t_1
               (if (<= a 3.6e+73)
                 (* y (/ (- z t) (- a t)))
                 (+ x (* y (/ (- z t) a))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y + (x * ((z - a) / t));
	double t_2 = x + (z * ((y - x) / a));
	double tmp;
	if (a <= -2.1e+240) {
		tmp = x + ((y - x) * (z / a));
	} else if (a <= -6.5e+125) {
		tmp = x + (y * (t / (t - a)));
	} else if (a <= -1.06e-10) {
		tmp = t_2;
	} else if (a <= -4.3e-67) {
		tmp = t_1;
	} else if (a <= -2.2e-85) {
		tmp = t_2;
	} else if (a <= 1.5e-277) {
		tmp = t_1;
	} else if (a <= 3.6e+73) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = x + (y * ((z - t) / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y + (x * ((z - a) / t))
    t_2 = x + (z * ((y - x) / a))
    if (a <= (-2.1d+240)) then
        tmp = x + ((y - x) * (z / a))
    else if (a <= (-6.5d+125)) then
        tmp = x + (y * (t / (t - a)))
    else if (a <= (-1.06d-10)) then
        tmp = t_2
    else if (a <= (-4.3d-67)) then
        tmp = t_1
    else if (a <= (-2.2d-85)) then
        tmp = t_2
    else if (a <= 1.5d-277) then
        tmp = t_1
    else if (a <= 3.6d+73) then
        tmp = y * ((z - t) / (a - t))
    else
        tmp = x + (y * ((z - t) / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y + (x * ((z - a) / t));
	double t_2 = x + (z * ((y - x) / a));
	double tmp;
	if (a <= -2.1e+240) {
		tmp = x + ((y - x) * (z / a));
	} else if (a <= -6.5e+125) {
		tmp = x + (y * (t / (t - a)));
	} else if (a <= -1.06e-10) {
		tmp = t_2;
	} else if (a <= -4.3e-67) {
		tmp = t_1;
	} else if (a <= -2.2e-85) {
		tmp = t_2;
	} else if (a <= 1.5e-277) {
		tmp = t_1;
	} else if (a <= 3.6e+73) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = x + (y * ((z - t) / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y + (x * ((z - a) / t))
	t_2 = x + (z * ((y - x) / a))
	tmp = 0
	if a <= -2.1e+240:
		tmp = x + ((y - x) * (z / a))
	elif a <= -6.5e+125:
		tmp = x + (y * (t / (t - a)))
	elif a <= -1.06e-10:
		tmp = t_2
	elif a <= -4.3e-67:
		tmp = t_1
	elif a <= -2.2e-85:
		tmp = t_2
	elif a <= 1.5e-277:
		tmp = t_1
	elif a <= 3.6e+73:
		tmp = y * ((z - t) / (a - t))
	else:
		tmp = x + (y * ((z - t) / a))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y + Float64(x * Float64(Float64(z - a) / t)))
	t_2 = Float64(x + Float64(z * Float64(Float64(y - x) / a)))
	tmp = 0.0
	if (a <= -2.1e+240)
		tmp = Float64(x + Float64(Float64(y - x) * Float64(z / a)));
	elseif (a <= -6.5e+125)
		tmp = Float64(x + Float64(y * Float64(t / Float64(t - a))));
	elseif (a <= -1.06e-10)
		tmp = t_2;
	elseif (a <= -4.3e-67)
		tmp = t_1;
	elseif (a <= -2.2e-85)
		tmp = t_2;
	elseif (a <= 1.5e-277)
		tmp = t_1;
	elseif (a <= 3.6e+73)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	else
		tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y + (x * ((z - a) / t));
	t_2 = x + (z * ((y - x) / a));
	tmp = 0.0;
	if (a <= -2.1e+240)
		tmp = x + ((y - x) * (z / a));
	elseif (a <= -6.5e+125)
		tmp = x + (y * (t / (t - a)));
	elseif (a <= -1.06e-10)
		tmp = t_2;
	elseif (a <= -4.3e-67)
		tmp = t_1;
	elseif (a <= -2.2e-85)
		tmp = t_2;
	elseif (a <= 1.5e-277)
		tmp = t_1;
	elseif (a <= 3.6e+73)
		tmp = y * ((z - t) / (a - t));
	else
		tmp = x + (y * ((z - t) / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.1e+240], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -6.5e+125], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.06e-10], t$95$2, If[LessEqual[a, -4.3e-67], t$95$1, If[LessEqual[a, -2.2e-85], t$95$2, If[LessEqual[a, 1.5e-277], t$95$1, If[LessEqual[a, 3.6e+73], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -6.5 \cdot 10^{+125}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\

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

\mathbf{elif}\;a \leq -4.3 \cdot 10^{-67}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -2.2 \cdot 10^{-85}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 1.5 \cdot 10^{-277}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -2.0999999999999999e240

    1. Initial program 45.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{1 \cdot \mathsf{fma}\left(\frac{1}{\frac{a - t}{z - t}}, y - x, x\right)} \]
    9. Step-by-step derivation
      1. *-lft-identity99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0999999999999999e240 < a < -6.4999999999999999e125

    1. Initial program 50.9%

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

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

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

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

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

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

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

        \[\leadsto x + y \cdot \frac{t}{\color{blue}{0 - \left(a - t\right)}} \]
      4. associate--r-82.6%

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

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

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

    if -6.4999999999999999e125 < a < -1.06e-10 or -4.30000000000000027e-67 < a < -2.2e-85

    1. Initial program 80.8%

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

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

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

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

    if -1.06e-10 < a < -4.30000000000000027e-67 or -2.2e-85 < a < 1.49999999999999989e-277

    1. Initial program 63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.49999999999999989e-277 < a < 3.5999999999999999e73

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

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

    if 3.5999999999999999e73 < a

    1. Initial program 64.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+240}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{+125}:\\ \;\;\;\;x + y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;a \leq -1.06 \cdot 10^{-10}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -4.3 \cdot 10^{-67}:\\ \;\;\;\;y + x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-85}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-277}:\\ \;\;\;\;y + x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+73}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 68.8% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;a \leq -2.1 \cdot 10^{-62}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;a \leq 3 \cdot 10^{-151}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 7.5 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.15000000000000004e-10

    1. Initial program 59.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15000000000000004e-10 < a < -2.0999999999999999e-62 or -1.60000000000000009e-127 < a < 3e-151

    1. Initial program 71.0%

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

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

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

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

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

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

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

      \[\leadsto x + {\color{blue}{\left(\frac{a - t}{z - t} \cdot \frac{1}{y - x}\right)}}^{-1} \]
    7. Taylor expanded in t around inf 85.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}} \]
    8. Step-by-step derivation
      1. associate--l+85.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/85.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/85.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-neg85.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-sub85.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-neg85.6%

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

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

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

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

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

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

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

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

    if -2.0999999999999999e-62 < a < -3.0999999999999997e-76

    1. Initial program 84.3%

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

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

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

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

    if -3.0999999999999997e-76 < a < -1.60000000000000009e-127 or 3e-151 < a < 7.5e74

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

    if 7.5e74 < a

    1. Initial program 64.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{-10}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-62}:\\ \;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-76}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-127}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-151}:\\ \;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{+74}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 68.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -2.6 \cdot 10^{+125}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -4.99999999999999995e238

    1. Initial program 45.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{1 \cdot \mathsf{fma}\left(\frac{1}{\frac{a - t}{z - t}}, y - x, x\right)} \]
    9. Step-by-step derivation
      1. *-lft-identity99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999995e238 < a < -2.60000000000000003e125

    1. Initial program 50.9%

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

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

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

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

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

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

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

        \[\leadsto x + y \cdot \frac{t}{\color{blue}{0 - \left(a - t\right)}} \]
      4. associate--r-82.6%

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

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

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

    if -2.60000000000000003e125 < a < -1.09999999999999995e-10

    1. Initial program 76.1%

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

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

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

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

    if -1.09999999999999995e-10 < a < 6.99999999999999991e-151

    1. Initial program 71.5%

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

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

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

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

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

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

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

      \[\leadsto x + {\color{blue}{\left(\frac{a - t}{z - t} \cdot \frac{1}{y - x}\right)}}^{-1} \]
    7. Taylor expanded in t around inf 78.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}} \]
    8. Step-by-step derivation
      1. associate--l+78.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/78.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/78.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-neg78.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-sub79.2%

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

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

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

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

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

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

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

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

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

    if 6.99999999999999991e-151 < a < 1.95000000000000004e74

    1. Initial program 64.3%

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

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

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

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

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

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

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

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

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

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

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

    if 1.95000000000000004e74 < a

    1. Initial program 64.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5 \cdot 10^{+238}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{+125}:\\ \;\;\;\;x + y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-10}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-151}:\\ \;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{+74}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 38.5% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+71}:\\
\;\;\;\;x + y\\

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+199}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.1999999999999998e176

    1. Initial program 60.2%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg33.0%

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

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

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

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

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

    if -3.1999999999999998e176 < z < -2.05e49

    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 z around inf 73.8%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    7. Simplified51.7%

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

    if -2.05e49 < z < 4.39999999999999989e71 or 5.00000000000000029e135 < z < 2.4999999999999999e199

    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 y around inf 64.3%

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

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

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

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

    if 4.39999999999999989e71 < z < 5.00000000000000029e135

    1. Initial program 75.8%

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

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

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \frac{y}{t} - -1 \cdot \frac{x}{t}\right)} \]
    5. Step-by-step derivation
      1. distribute-lft-out--43.5%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{z}{t}} \]
      3. distribute-rgt-neg-in44.2%

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

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

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

    if 2.4999999999999999e199 < z

    1. Initial program 60.0%

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
    6. Step-by-step derivation
      1. *-commutative33.4%

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

        \[\leadsto \frac{z \cdot y}{\color{blue}{1 \cdot a}} \]
      3. times-frac45.3%

        \[\leadsto \color{blue}{\frac{z}{1} \cdot \frac{y}{a}} \]
      4. /-rgt-identity45.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+176}:\\ \;\;\;\;x \cdot \frac{z}{-a}\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{+49}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+71}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+135}:\\ \;\;\;\;y \cdot \frac{-z}{t}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+199}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 60.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -1.1 \cdot 10^{+148}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 4.2 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.15e174 or 4.19999999999999997e75 < a

    1. Initial program 58.5%

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

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

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

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

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

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

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

    if -3.15e174 < a < -1.0999999999999999e148 or -6.5000000000000002e-12 < a < 4.19999999999999997e75

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

    if -1.0999999999999999e148 < a < -6.5000000000000002e-12

    1. Initial program 77.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.15 \cdot 10^{+174}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{+148}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-12}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+75}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 44.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{y - x}{a}\\ \mathbf{if}\;z \leq -5.3 \cdot 10^{+48}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+70}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+156}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+196}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* z (/ (- y x) a))))
   (if (<= z -5.3e+48)
     t_1
     (if (<= z 1.75e+70)
       (+ x y)
       (if (<= z 6.2e+156)
         (* z (/ y (- a t)))
         (if (<= z 2.35e+196) (+ x y) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z * ((y - x) / a);
	double tmp;
	if (z <= -5.3e+48) {
		tmp = t_1;
	} else if (z <= 1.75e+70) {
		tmp = x + y;
	} else if (z <= 6.2e+156) {
		tmp = z * (y / (a - t));
	} else if (z <= 2.35e+196) {
		tmp = x + y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = z * ((y - x) / a)
    if (z <= (-5.3d+48)) then
        tmp = t_1
    else if (z <= 1.75d+70) then
        tmp = x + y
    else if (z <= 6.2d+156) then
        tmp = z * (y / (a - t))
    else if (z <= 2.35d+196) then
        tmp = x + y
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = z * ((y - x) / a);
	double tmp;
	if (z <= -5.3e+48) {
		tmp = t_1;
	} else if (z <= 1.75e+70) {
		tmp = x + y;
	} else if (z <= 6.2e+156) {
		tmp = z * (y / (a - t));
	} else if (z <= 2.35e+196) {
		tmp = x + y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z * ((y - x) / a)
	tmp = 0
	if z <= -5.3e+48:
		tmp = t_1
	elif z <= 1.75e+70:
		tmp = x + y
	elif z <= 6.2e+156:
		tmp = z * (y / (a - t))
	elif z <= 2.35e+196:
		tmp = x + y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z * Float64(Float64(y - x) / a))
	tmp = 0.0
	if (z <= -5.3e+48)
		tmp = t_1;
	elseif (z <= 1.75e+70)
		tmp = Float64(x + y);
	elseif (z <= 6.2e+156)
		tmp = Float64(z * Float64(y / Float64(a - t)));
	elseif (z <= 2.35e+196)
		tmp = Float64(x + y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = z * ((y - x) / a);
	tmp = 0.0;
	if (z <= -5.3e+48)
		tmp = t_1;
	elseif (z <= 1.75e+70)
		tmp = x + y;
	elseif (z <= 6.2e+156)
		tmp = z * (y / (a - t));
	elseif (z <= 2.35e+196)
		tmp = x + y;
	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] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.3e+48], t$95$1, If[LessEqual[z, 1.75e+70], N[(x + y), $MachinePrecision], If[LessEqual[z, 6.2e+156], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.35e+196], N[(x + y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.75 \cdot 10^{+70}:\\
\;\;\;\;x + y\\

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

\mathbf{elif}\;z \leq 2.35 \cdot 10^{+196}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.3e48 or 2.3500000000000001e196 < z

    1. Initial program 63.3%

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

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

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

    if -5.3e48 < z < 1.75000000000000001e70 or 6.2000000000000004e156 < z < 2.3500000000000001e196

    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 65.3%

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

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

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

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

    if 1.75000000000000001e70 < z < 6.2000000000000004e156

    1. Initial program 70.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.3 \cdot 10^{+48}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+70}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+156}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+196}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 51.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -2.45 \cdot 10^{+146}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

\mathbf{elif}\;t \leq -9.4 \cdot 10^{+33}:\\
\;\;\;\;y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5.7999999999999999e218 or -2.4500000000000001e146 < t < -9.3999999999999996e33

    1. Initial program 34.8%

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

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

    if -5.7999999999999999e218 < t < -2.4500000000000001e146

    1. Initial program 28.2%

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

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

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

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

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

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

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

      \[\leadsto x + {\color{blue}{\left(\frac{a - t}{z - t} \cdot \frac{1}{y - x}\right)}}^{-1} \]
    7. Taylor expanded in t around inf 59.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}} \]
    8. Step-by-step derivation
      1. associate--l+59.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/59.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/59.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-neg59.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-sub59.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-neg59.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--59.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/59.9%

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

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

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

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

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

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

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

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

    if -9.3999999999999996e33 < t < 5.2000000000000002e-26

    1. Initial program 87.1%

      \[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. associate-/l*74.7%

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

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

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

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

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

    if 5.2000000000000002e-26 < t

    1. Initial program 47.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+218}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2.45 \cdot 10^{+146}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -9.4 \cdot 10^{+33}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-26}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 79.8% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 24.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15999999999999997e80 < t < 3.5000000000000002e23

    1. Initial program 86.7%

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

    if 3.5000000000000002e23 < t

    1. Initial program 42.1%

      \[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. associate-/l*79.3%

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

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

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

Alternative 11: 41.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -3.9 \cdot 10^{+48} \lor \neg \left(z \leq 2.46 \cdot 10^{+70}\right):\\
\;\;\;\;z \cdot \frac{y}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.61999999999999999e177

    1. Initial program 60.2%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg33.0%

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

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

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

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

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

    if -1.61999999999999999e177 < z < -3.9000000000000001e48 or 2.45999999999999995e70 < z

    1. Initial program 63.2%

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

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

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

    if -3.9000000000000001e48 < z < 2.45999999999999995e70

    1. Initial program 68.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.62 \cdot 10^{+177}:\\ \;\;\;\;x \cdot \frac{z}{-a}\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{+48} \lor \neg \left(z \leq 2.46 \cdot 10^{+70}\right):\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 72.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{+169} \lor \neg \left(x \leq 2 \cdot 10^{+67}\right):\\
\;\;\;\;x \cdot \left(\frac{z - t}{t - a} + 1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.15e169 or 1.99999999999999997e67 < x

    1. Initial program 47.4%

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

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

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

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

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

    if -1.15e169 < x < 1.99999999999999997e67

    1. Initial program 73.4%

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

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

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

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

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

Alternative 13: 39.2% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;z \leq 5.5 \cdot 10^{+198}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.9500000000000001e176

    1. Initial program 60.2%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg33.0%

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

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

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

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

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

    if -1.9500000000000001e176 < z < -1.12000000000000005e49

    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 z around inf 73.8%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    7. Simplified51.7%

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

    if -1.12000000000000005e49 < z < 5.5000000000000004e198

    1. Initial program 67.5%

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

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

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

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

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

    if 5.5000000000000004e198 < z

    1. Initial program 60.0%

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
    6. Step-by-step derivation
      1. *-commutative33.4%

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

        \[\leadsto \frac{z \cdot y}{\color{blue}{1 \cdot a}} \]
      3. times-frac45.3%

        \[\leadsto \color{blue}{\frac{z}{1} \cdot \frac{y}{a}} \]
      4. /-rgt-identity45.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{+176}:\\ \;\;\;\;x \cdot \frac{z}{-a}\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{+49}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+198}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 65.1% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.19999999999999979e-12 or 1.90000000000000011e73 < a

    1. Initial program 62.1%

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

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

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

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

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

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

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

    if -8.19999999999999979e-12 < a < 1.90000000000000011e73

    1. Initial program 68.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 64.9% accurate, 0.7× speedup?

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

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

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

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


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

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

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

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

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

    if -4.19999999999999989e-8 < a < 3.19999999999999985e75

    1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

    if 3.19999999999999985e75 < a

    1. Initial program 64.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.2 \cdot 10^{-8}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+75}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 65.1% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 58.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{1 \cdot \mathsf{fma}\left(\frac{1}{\frac{a - t}{z - t}}, y - x, x\right)} \]
    9. Step-by-step derivation
      1. *-lft-identity95.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - x}{1} \cdot \frac{z}{a}} + x \]
      4. /-rgt-identity74.0%

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

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

    if -9.80000000000000007e-9 < a < 3.10000000000000021e74

    1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

    if 3.10000000000000021e74 < a

    1. Initial program 64.5%

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

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

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

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

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

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

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

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

Alternative 17: 38.8% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;a \leq 8.6 \cdot 10^{+75}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.95e62 or 8.6000000000000002e75 < a

    1. Initial program 57.6%

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

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

    if -1.95e62 < a < -4.89999999999999982e-90

    1. Initial program 81.0%

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

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

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

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

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

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

    if -4.89999999999999982e-90 < a < 8.6000000000000002e75

    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 inf 40.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.95 \cdot 10^{+62}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.9 \cdot 10^{-90}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{+75}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 38.7% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;a \leq 8.5 \cdot 10^{+75}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.89999999999999992e62 or 8.4999999999999993e75 < a

    1. Initial program 57.6%

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

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

    if -1.89999999999999992e62 < a < -3.15000000000000022e-88

    1. Initial program 81.0%

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
    6. Step-by-step derivation
      1. *-commutative38.9%

        \[\leadsto \frac{\color{blue}{z \cdot y}}{a} \]
      2. *-lft-identity38.9%

        \[\leadsto \frac{z \cdot y}{\color{blue}{1 \cdot a}} \]
      3. times-frac38.9%

        \[\leadsto \color{blue}{\frac{z}{1} \cdot \frac{y}{a}} \]
      4. /-rgt-identity38.9%

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

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

    if -3.15000000000000022e-88 < a < 8.4999999999999993e75

    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 inf 40.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.9 \cdot 10^{+62}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.15 \cdot 10^{-88}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+75}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 39.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+49} \lor \neg \left(z \leq 6.2 \cdot 10^{+198}\right):\\
\;\;\;\;z \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.99999999999999946e48 or 6.1999999999999995e198 < z

    1. Initial program 62.4%

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
    6. Step-by-step derivation
      1. *-commutative30.5%

        \[\leadsto \frac{\color{blue}{z \cdot y}}{a} \]
      2. *-lft-identity30.5%

        \[\leadsto \frac{z \cdot y}{\color{blue}{1 \cdot a}} \]
      3. times-frac40.6%

        \[\leadsto \color{blue}{\frac{z}{1} \cdot \frac{y}{a}} \]
      4. /-rgt-identity40.6%

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

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

    if -9.99999999999999946e48 < z < 6.1999999999999995e198

    1. Initial program 67.5%

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

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

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

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

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

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

Alternative 20: 38.9% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 8.6 \cdot 10^{+75}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.6e-13 or 8.6000000000000002e75 < a

    1. Initial program 62.1%

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

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

    if -1.6e-13 < a < 8.6000000000000002e75

    1. Initial program 68.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{-13}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{+75}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 2.8% accurate, 13.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 0 \]
  11. Add Preprocessing

Alternative 22: 25.4% 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 66.0%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification22.8%

    \[\leadsto x \]
  5. Add Preprocessing

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

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

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