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

Percentage Accurate: 69.2% → 90.4%
Time: 17.4s
Alternatives: 25
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 25 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: 69.2% accurate, 1.0× speedup?

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

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

Alternative 1: 90.4% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-275}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+263}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.9999999999999999e254 or 2.00000000000000003e263 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 39.7%

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

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

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

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

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

    if -1.9999999999999999e254 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.99999999999999987e-275 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2.00000000000000003e263

    1. Initial program 96.8%

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

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

    1. Initial program 4.7%

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

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

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

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

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

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

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

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

        \[\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} \]
    7. Simplified99.6%

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

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

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

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

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

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

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

Alternative 2: 90.8% accurate, 0.1× speedup?

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

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

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


\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.99999999999999987e-275 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 73.1%

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

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

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

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

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

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

    1. Initial program 4.7%

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

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

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

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

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

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

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

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

        \[\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} \]
    7. Simplified99.6%

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

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

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

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

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

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

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

Alternative 3: 86.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(z - a\right) \cdot \frac{x - y}{t}\\ t_2 := x + \frac{\left(x - y\right) \cdot \left(t - z\right)}{a - t}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-275}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;y + \frac{1}{\frac{t}{\left(z - a\right) \cdot \left(x - y\right)}}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+288}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ y (* (- z a) (/ (- x y) t))))
        (t_2 (+ x (/ (* (- x y) (- t z)) (- a t)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -2e-275)
       t_2
       (if (<= t_2 0.0)
         (+ y (/ 1.0 (/ t (* (- z a) (- x y)))))
         (if (<= t_2 2e+288) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y + ((z - a) * ((x - y) / t));
	double t_2 = x + (((x - y) * (t - z)) / (a - t));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -2e-275) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = y + (1.0 / (t / ((z - a) * (x - y))));
	} else if (t_2 <= 2e+288) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y + ((z - a) * ((x - y) / t));
	double t_2 = x + (((x - y) * (t - z)) / (a - t));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -2e-275) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = y + (1.0 / (t / ((z - a) * (x - y))));
	} else if (t_2 <= 2e+288) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y + ((z - a) * ((x - y) / t))
	t_2 = x + (((x - y) * (t - z)) / (a - t))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -2e-275:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = y + (1.0 / (t / ((z - a) * (x - y))))
	elif t_2 <= 2e+288:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y + Float64(Float64(z - a) * Float64(Float64(x - y) / t)))
	t_2 = Float64(x + Float64(Float64(Float64(x - y) * Float64(t - z)) / Float64(a - t)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -2e-275)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(y + Float64(1.0 / Float64(t / Float64(Float64(z - a) * Float64(x - y)))));
	elseif (t_2 <= 2e+288)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y + ((z - a) * ((x - y) / t));
	t_2 = x + (((x - y) * (t - z)) / (a - t));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -2e-275)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = y + (1.0 / (t / ((z - a) * (x - y))));
	elseif (t_2 <= 2e+288)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(N[(z - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(x - y), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -2e-275], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y + N[(1.0 / N[(t / N[(N[(z - a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+288], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-275}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+288}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 2e288 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 36.9%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{{\left(\sqrt[3]{a - t}\right)}^{3}}}, x\right) \]
    7. Taylor expanded in t around inf 43.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. mul-1-neg43.9%

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

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

        \[\leadsto y + \left(\color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right)}{t}} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right) \]
      4. associate-*r/43.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) \]
      5. associate-*r/43.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) \]
      6. div-sub45.1%

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.99999999999999987e-275 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2e288

    1. Initial program 96.3%

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

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

    1. Initial program 4.7%

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

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

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

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

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

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

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

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

        \[\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} \]
    7. Simplified99.6%

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

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

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

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

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

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

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

Alternative 4: 86.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(z - a\right) \cdot \frac{x - y}{t}\\ t_2 := x + \frac{\left(x - y\right) \cdot \left(t - z\right)}{a - t}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-275}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;y + \frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+288}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ y (* (- z a) (/ (- x y) t))))
        (t_2 (+ x (/ (* (- x y) (- t z)) (- a t)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -2e-275)
       t_2
       (if (<= t_2 0.0)
         (+ y (/ (* x (- z a)) t))
         (if (<= t_2 2e+288) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y + ((z - a) * ((x - y) / t));
	double t_2 = x + (((x - y) * (t - z)) / (a - t));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -2e-275) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = y + ((x * (z - a)) / t);
	} else if (t_2 <= 2e+288) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y + ((z - a) * ((x - y) / t));
	double t_2 = x + (((x - y) * (t - z)) / (a - t));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -2e-275) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = y + ((x * (z - a)) / t);
	} else if (t_2 <= 2e+288) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y + ((z - a) * ((x - y) / t))
	t_2 = x + (((x - y) * (t - z)) / (a - t))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -2e-275:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = y + ((x * (z - a)) / t)
	elif t_2 <= 2e+288:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y + Float64(Float64(z - a) * Float64(Float64(x - y) / t)))
	t_2 = Float64(x + Float64(Float64(Float64(x - y) * Float64(t - z)) / Float64(a - t)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -2e-275)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(y + Float64(Float64(x * Float64(z - a)) / t));
	elseif (t_2 <= 2e+288)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y + ((z - a) * ((x - y) / t));
	t_2 = x + (((x - y) * (t - z)) / (a - t));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -2e-275)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = y + ((x * (z - a)) / t);
	elseif (t_2 <= 2e+288)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(N[(z - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(x - y), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -2e-275], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(x * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+288], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-275}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+288}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 2e288 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 36.9%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{{\left(\sqrt[3]{a - t}\right)}^{3}}}, x\right) \]
    7. Taylor expanded in t around inf 43.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. mul-1-neg43.9%

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

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

        \[\leadsto y + \left(\color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right)}{t}} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right) \]
      4. associate-*r/43.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) \]
      5. associate-*r/43.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) \]
      6. div-sub45.1%

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.99999999999999987e-275 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2e288

    1. Initial program 96.3%

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

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

    1. Initial program 4.7%

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

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

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

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

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

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

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

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

        \[\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} \]
    7. Simplified99.6%

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

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

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

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

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

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

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

Alternative 5: 54.8% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.8499999999999998e54 or 2.15e101 < t

    1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - z \cdot \frac{\color{blue}{-1 \cdot x}}{t} \]
    12. Step-by-step derivation
      1. neg-mul-157.8%

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

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

    if -2.8499999999999998e54 < t < 4.6999999999999999e-287

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.6999999999999999e-287 < t < 2.8500000000000001e-150

    1. Initial program 90.9%

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

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

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

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

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

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

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

    if 2.8500000000000001e-150 < t < 2.15e101

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.85 \cdot 10^{+54}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{-287}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 2.85 \cdot 10^{-150}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{+101}:\\ \;\;\;\;x - \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 52.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := y - y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -1.32 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.3200000000000001e54 or 2.2500000000000001e101 < t

    1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
    13. Simplified50.5%

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

    if -1.3200000000000001e54 < t < 1.0599999999999999e-286

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0599999999999999e-286 < t < 2.79999999999999996e-150

    1. Initial program 90.9%

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

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

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

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

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

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

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

    if 2.79999999999999996e-150 < t < 2.2500000000000001e101

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.32 \cdot 10^{+54}:\\ \;\;\;\;y - y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 1.06 \cdot 10^{-286}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-150}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+101}:\\ \;\;\;\;x - \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;y - y \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 49.1% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.39999999999999998e54 or 1.14999999999999997e199 < t

    1. Initial program 34.7%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{{\left(\sqrt[3]{a - t}\right)}^{3}}}, x\right) \]
    7. Taylor expanded in t around inf 47.4%

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

    if -2.39999999999999998e54 < t < 4.0000000000000002e-286

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.0000000000000002e-286 < t < 2.7000000000000001e-150

    1. Initial program 90.9%

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

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

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

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

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

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

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

    if 2.7000000000000001e-150 < t < 1.14999999999999997e199

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{a}} \]
      3. *-commutative40.1%

        \[\leadsto x - \frac{\color{blue}{y \cdot t}}{a} \]
      4. *-lft-identity40.1%

        \[\leadsto x - \frac{y \cdot t}{\color{blue}{1 \cdot a}} \]
      5. times-frac41.4%

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

        \[\leadsto x - \color{blue}{y} \cdot \frac{t}{a} \]
    15. Simplified41.4%

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

Alternative 8: 34.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -1 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.8 \cdot 10^{-44}:\\
\;\;\;\;x\\

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

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


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

    1. Initial program 53.2%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
    12. Step-by-step derivation
      1. clear-num51.4%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t}{z}}} \]
      2. un-div-inv51.7%

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    13. Applied egg-rr51.7%

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

    if -2.2e224 < z < -9.99999999999999946e33 or 2.09999999999999997e200 < z

    1. Initial program 71.9%

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

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

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

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

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

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

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

    if -9.99999999999999946e33 < z < 4.80000000000000017e-44

    1. Initial program 68.3%

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

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

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

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

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

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

    if 4.80000000000000017e-44 < z < 2.09999999999999997e200

    1. Initial program 69.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 70.7% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;z \leq 4.9 \cdot 10^{+20}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.00000000000000005e142 or 4.9e20 < z

    1. Initial program 70.0%

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

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

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

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

    if -1.00000000000000005e142 < z < 6.19999999999999993e-55

    1. Initial program 69.1%

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

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

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

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

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

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

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

    if 6.19999999999999993e-55 < z < 4.9e20

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+142}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a - t}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-55}:\\ \;\;\;\;x - \frac{y}{a - t} \cdot \left(t - z\right)\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{+20}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 75.2% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.3000000000000001e61 or 2.9000000000000001e198 < t

    1. Initial program 34.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.3000000000000001e61 < t < 6.4999999999999999e98

    1. Initial program 87.7%

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

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

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

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

    if 6.4999999999999999e98 < t < 2.9000000000000001e198

    1. Initial program 36.9%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{{\left(\sqrt[3]{a - t}\right)}^{3}}}, x\right) \]
    7. Taylor expanded in y around inf 65.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.3 \cdot 10^{+61}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{+98}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a - t}\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+198}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 67.4% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t \leq 3.9 \cdot 10^{+198}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.0000000000000003e-20 or 1.1e97 < t < 3.9e198

    1. Initial program 48.7%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{{\left(\sqrt[3]{a - t}\right)}^{3}}}, x\right) \]
    7. Taylor expanded in y around inf 62.4%

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

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

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

    if -9.0000000000000003e-20 < t < 1.1e97

    1. Initial program 88.4%

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

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

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

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

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

    if 3.9e198 < t

    1. Initial program 18.5%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - z \cdot \frac{\color{blue}{-1 \cdot x}}{t} \]
    12. Step-by-step derivation
      1. neg-mul-175.0%

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

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

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

Alternative 12: 66.1% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t \leq 3.4 \cdot 10^{+198}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.4000000000000001e-20 or 3.20000000000000016e97 < t < 3.4e198

    1. Initial program 48.7%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{{\left(\sqrt[3]{a - t}\right)}^{3}}}, x\right) \]
    7. Taylor expanded in y around inf 62.4%

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

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

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

    if -1.4000000000000001e-20 < t < 3.20000000000000016e97

    1. Initial program 88.4%

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

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

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

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

    if 3.4e198 < t

    1. Initial program 18.5%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - z \cdot \frac{\color{blue}{-1 \cdot x}}{t} \]
    12. Step-by-step derivation
      1. neg-mul-175.0%

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

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

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

Alternative 13: 62.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -1.08 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 4 \cdot 10^{+198}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.07999999999999992e-11 or 1.75000000000000002e-63 < t < 4.00000000000000007e198

    1. Initial program 58.5%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{{\left(\sqrt[3]{a - t}\right)}^{3}}}, x\right) \]
    7. Taylor expanded in y around inf 56.0%

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

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

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

    if -1.07999999999999992e-11 < t < 1.75000000000000002e-63

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000007e198 < t

    1. Initial program 18.5%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - z \cdot \frac{\color{blue}{-1 \cdot x}}{t} \]
    12. Step-by-step derivation
      1. neg-mul-175.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.08 \cdot 10^{-11}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-63}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+198}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 60.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -7.6 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.7 \cdot 10^{+198}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.5999999999999996e-18 or 7.5999999999999997e-114 < t < 2.6999999999999999e198

    1. Initial program 60.5%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{{\left(\sqrt[3]{a - t}\right)}^{3}}}, x\right) \]
    7. Taylor expanded in y around inf 55.9%

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

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

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

    if -7.5999999999999996e-18 < t < 7.5999999999999997e-114

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.6999999999999999e198 < t

    1. Initial program 18.5%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - z \cdot \frac{\color{blue}{-1 \cdot x}}{t} \]
    12. Step-by-step derivation
      1. neg-mul-175.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.6 \cdot 10^{-18}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{-114}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+198}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 56.3% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.2e54 or 5.99999999999999958e112 < t

    1. Initial program 35.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
    13. Simplified51.0%

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

    if -3.2e54 < t < 9.49999999999999927e28

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.49999999999999927e28 < t < 5.99999999999999958e112

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-z \cdot \frac{y - x}{t}} \]
      5. distribute-lft-neg-in54.3%

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

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

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

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

Alternative 16: 36.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 5 \cdot 10^{-45}:\\
\;\;\;\;x\\

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

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


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

    1. Initial program 66.9%

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

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

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

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

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

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

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

    if -5.39999999999999973e37 < z < 4.99999999999999976e-45

    1. Initial program 68.3%

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

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

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

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

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

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

    if 4.99999999999999976e-45 < z < 1.0000000000000001e209

    1. Initial program 69.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0000000000000001e209 < z

    1. Initial program 68.3%

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

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

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

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

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

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

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

Alternative 17: 32.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{z - a}{t}\\
\mathbf{if}\;z \leq -42000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 7.2 \cdot 10^{-42}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.2 \cdot 10^{+235}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.2e10 or 7.2000000000000004e-42 < z < 5.1999999999999996e235

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.2e10 < z < 7.2000000000000004e-42

    1. Initial program 69.1%

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

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

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

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

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

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

    if 5.1999999999999996e235 < z

    1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
    13. Simplified52.4%

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z}{-t}} \]
    16. Simplified52.4%

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

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

Alternative 18: 78.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.2e53 or 2.2500000000000001e101 < t

    1. Initial program 35.0%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{{\left(\sqrt[3]{a - t}\right)}^{3}}}, x\right) \]
    7. Taylor expanded in t around inf 57.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. mul-1-neg57.3%

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

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

        \[\leadsto y + \left(\color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right)}{t}} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right) \]
      4. associate-*r/57.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) \]
      5. associate-*r/57.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) \]
      6. div-sub57.3%

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

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

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

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

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

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

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

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

    if -3.2e53 < t < 2.2500000000000001e101

    1. Initial program 88.2%

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

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

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

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

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

Alternative 19: 32.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 4.7 \cdot 10^{-45}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 7.8 \cdot 10^{+235}:\\
\;\;\;\;x \cdot \frac{z}{t}\\

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


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

    1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
    12. Step-by-step derivation
      1. clear-num46.7%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t}{z}}} \]
      2. un-div-inv46.9%

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    13. Applied egg-rr46.9%

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

    if -1.49999999999999987e142 < z < 4.6999999999999998e-45

    1. Initial program 68.8%

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

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

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

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

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

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

    if 4.6999999999999998e-45 < z < 7.8000000000000005e235

    1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.8000000000000005e235 < z

    1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
    13. Simplified52.4%

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z}{-t}} \]
    16. Simplified52.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+142}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-45}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+235}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{t} \cdot \left(-y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 69.0% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.5000000000000006e-40 < a < 1.60000000000000006e-41

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.60000000000000006e-41 < a

    1. Initial program 65.9%

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

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

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

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

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

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

Alternative 21: 56.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+53} \lor \neg \left(t \leq 2.5 \cdot 10^{+101}\right):\\
\;\;\;\;y - y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.5000000000000002e53 or 2.49999999999999994e101 < t

    1. Initial program 35.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
    13. Simplified51.0%

      \[\leadsto \color{blue}{y - y \cdot \frac{z}{t}} \]

    if -8.5000000000000002e53 < t < 2.49999999999999994e101

    1. Initial program 87.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 68.2%

      \[\leadsto x + \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*71.8%

        \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a}} \]
    5. Simplified71.8%

      \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a}} \]
    6. Step-by-step derivation
      1. clear-num71.8%

        \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\frac{1}{\frac{a}{z - t}}} \]
      2. inv-pow71.8%

        \[\leadsto x + \left(y - x\right) \cdot \color{blue}{{\left(\frac{a}{z - t}\right)}^{-1}} \]
    7. Applied egg-rr71.8%

      \[\leadsto x + \left(y - x\right) \cdot \color{blue}{{\left(\frac{a}{z - t}\right)}^{-1}} \]
    8. Step-by-step derivation
      1. unpow-171.8%

        \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\frac{1}{\frac{a}{z - t}}} \]
    9. Simplified71.8%

      \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\frac{1}{\frac{a}{z - t}}} \]
    10. Taylor expanded in y around inf 56.0%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    11. Step-by-step derivation
      1. associate-*r/59.4%

        \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a}} \]
    12. Simplified59.4%

      \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a}} \]
    13. Taylor expanded in z around inf 55.2%

      \[\leadsto x + y \cdot \frac{\color{blue}{z}}{a} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification53.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.5 \cdot 10^{+53} \lor \neg \left(t \leq 2.5 \cdot 10^{+101}\right):\\ \;\;\;\;y - y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 54.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{+54}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+102}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -3.4e+54) y (if (<= t 9.5e+102) (+ x (* y (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -3.4e+54) {
		tmp = y;
	} else if (t <= 9.5e+102) {
		tmp = x + (y * (z / a));
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-3.4d+54)) then
        tmp = y
    else if (t <= 9.5d+102) then
        tmp = x + (y * (z / a))
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -3.4e+54) {
		tmp = y;
	} else if (t <= 9.5e+102) {
		tmp = x + (y * (z / a));
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -3.4e+54:
		tmp = y
	elif t <= 9.5e+102:
		tmp = x + (y * (z / a))
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -3.4e+54)
		tmp = y;
	elseif (t <= 9.5e+102)
		tmp = Float64(x + Float64(y * Float64(z / a)));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -3.4e+54)
		tmp = y;
	elseif (t <= 9.5e+102)
		tmp = x + (y * (z / a));
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.4e+54], y, If[LessEqual[t, 9.5e+102], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{+54}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 9.5 \cdot 10^{+102}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.4000000000000001e54 or 9.4999999999999992e102 < t

    1. Initial program 35.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative35.7%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-/l*71.4%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. fma-define71.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified71.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt70.3%

        \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{\left(\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}\right) \cdot \sqrt[3]{a - t}}}, x\right) \]
      2. pow370.3%

        \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{{\left(\sqrt[3]{a - t}\right)}^{3}}}, x\right) \]
    6. Applied egg-rr70.3%

      \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{{\left(\sqrt[3]{a - t}\right)}^{3}}}, x\right) \]
    7. Taylor expanded in t around inf 41.5%

      \[\leadsto \color{blue}{y} \]

    if -3.4000000000000001e54 < t < 9.4999999999999992e102

    1. Initial program 87.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 68.2%

      \[\leadsto x + \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*71.8%

        \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a}} \]
    5. Simplified71.8%

      \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a}} \]
    6. Step-by-step derivation
      1. clear-num71.8%

        \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\frac{1}{\frac{a}{z - t}}} \]
      2. inv-pow71.8%

        \[\leadsto x + \left(y - x\right) \cdot \color{blue}{{\left(\frac{a}{z - t}\right)}^{-1}} \]
    7. Applied egg-rr71.8%

      \[\leadsto x + \left(y - x\right) \cdot \color{blue}{{\left(\frac{a}{z - t}\right)}^{-1}} \]
    8. Step-by-step derivation
      1. unpow-171.8%

        \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\frac{1}{\frac{a}{z - t}}} \]
    9. Simplified71.8%

      \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\frac{1}{\frac{a}{z - t}}} \]
    10. Taylor expanded in y around inf 56.0%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    11. Step-by-step derivation
      1. associate-*r/59.4%

        \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a}} \]
    12. Simplified59.4%

      \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a}} \]
    13. Taylor expanded in z around inf 55.2%

      \[\leadsto x + y \cdot \frac{\color{blue}{z}}{a} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 23: 36.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{-34}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-41}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2.6e-34) x (if (<= a 2e-41) (* x (/ z t)) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.6e-34) {
		tmp = x;
	} else if (a <= 2e-41) {
		tmp = x * (z / t);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-2.6d-34)) then
        tmp = x
    else if (a <= 2d-41) then
        tmp = x * (z / t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.6e-34) {
		tmp = x;
	} else if (a <= 2e-41) {
		tmp = x * (z / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2.6e-34:
		tmp = x
	elif a <= 2e-41:
		tmp = x * (z / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2.6e-34)
		tmp = x;
	elseif (a <= 2e-41)
		tmp = Float64(x * Float64(z / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2.6e-34)
		tmp = x;
	elseif (a <= 2e-41)
		tmp = x * (z / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.6e-34], x, If[LessEqual[a, 2e-41], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.6 \cdot 10^{-34}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2 \cdot 10^{-41}:\\
\;\;\;\;x \cdot \frac{z}{t}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.5999999999999999e-34 or 2.00000000000000001e-41 < a

    1. Initial program 68.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative68.1%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-/l*87.8%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. fma-define87.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified87.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 41.8%

      \[\leadsto \color{blue}{x} \]

    if -2.5999999999999999e-34 < a < 2.00000000000000001e-41

    1. Initial program 68.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative68.5%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-/l*78.3%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. fma-define78.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified78.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 58.4%

      \[\leadsto \color{blue}{z \cdot \left(\frac{y}{a - t} - \frac{x}{a - t}\right)} \]
    6. Taylor expanded in y around 0 37.7%

      \[\leadsto z \cdot \color{blue}{\left(-1 \cdot \frac{x}{a - t}\right)} \]
    7. Step-by-step derivation
      1. neg-mul-137.7%

        \[\leadsto z \cdot \color{blue}{\left(-\frac{x}{a - t}\right)} \]
      2. distribute-neg-frac37.7%

        \[\leadsto z \cdot \color{blue}{\frac{-x}{a - t}} \]
    8. Simplified37.7%

      \[\leadsto z \cdot \color{blue}{\frac{-x}{a - t}} \]
    9. Taylor expanded in a around 0 30.3%

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. associate-/l*38.6%

        \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
    11. Simplified38.6%

      \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 24: 39.4% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+53}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+102}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -7.5e+53) y (if (<= t 8.5e+102) x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -7.5e+53) {
		tmp = y;
	} else if (t <= 8.5e+102) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-7.5d+53)) then
        tmp = y
    else if (t <= 8.5d+102) then
        tmp = x
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -7.5e+53) {
		tmp = y;
	} else if (t <= 8.5e+102) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -7.5e+53:
		tmp = y
	elif t <= 8.5e+102:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -7.5e+53)
		tmp = y;
	elseif (t <= 8.5e+102)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -7.5e+53)
		tmp = y;
	elseif (t <= 8.5e+102)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7.5e+53], y, If[LessEqual[t, 8.5e+102], x, y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+53}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 8.5 \cdot 10^{+102}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.4999999999999997e53 or 8.4999999999999996e102 < t

    1. Initial program 35.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative35.7%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-/l*71.4%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. fma-define71.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified71.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt70.3%

        \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{\left(\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}\right) \cdot \sqrt[3]{a - t}}}, x\right) \]
      2. pow370.3%

        \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{{\left(\sqrt[3]{a - t}\right)}^{3}}}, x\right) \]
    6. Applied egg-rr70.3%

      \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{{\left(\sqrt[3]{a - t}\right)}^{3}}}, x\right) \]
    7. Taylor expanded in t around inf 41.5%

      \[\leadsto \color{blue}{y} \]

    if -7.4999999999999997e53 < t < 8.4999999999999996e102

    1. Initial program 87.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative87.2%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-/l*90.6%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. fma-define90.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified90.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 35.1%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 25: 26.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 68.3%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. +-commutative68.3%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
    2. associate-/l*83.5%

      \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
    3. fma-define83.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
  3. Simplified83.5%

    \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in a around inf 26.1%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer Target 1: 86.7% 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 2024180 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))

  (+ x (/ (* (- y x) (- z t)) (- a t))))