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

Percentage Accurate: 68.2% → 90.6%
Time: 15.6s
Alternatives: 21
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 21 alternatives:

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

Initial Program: 68.2% accurate, 1.0× speedup?

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

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

Alternative 1: 90.6% 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 -1 \cdot 10^{-265} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y - \frac{\left(a - z\right) \cdot \left(x - y\right)}{t}\\ \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 -1e-265) (not (<= t_1 0.0)))
     (fma (- y x) (/ (- z t) (- a t)) x)
     (- y (/ (* (- a z) (- x y)) t)))))
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 <= -1e-265) || !(t_1 <= 0.0)) {
		tmp = fma((y - x), ((z - t) / (a - t)), x);
	} else {
		tmp = y - (((a - z) * (x - y)) / t);
	}
	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 <= -1e-265) || !(t_1 <= 0.0))
		tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x);
	else
		tmp = Float64(y - Float64(Float64(Float64(a - z) * Float64(x - y)) / t));
	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, -1e-265], 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[(N[(N[(a - z), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $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 -1 \cdot 10^{-265} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\

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


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

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

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

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

    1. Initial program 3.9%

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

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

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

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

      \[\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}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification88.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(x - y\right) \cdot \left(t - z\right)}{a - t} \leq -1 \cdot 10^{-265} \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{\left(a - z\right) \cdot \left(x - y\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 87.6% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(z - t\right) \cdot \left(\left(y - x\right) \cdot \frac{-1}{t - a}\right)\\ 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 -5 \cdot 10^{-205}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-227}:\\ \;\;\;\;y - \frac{\left(a - z\right) \cdot \left(x - y\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- z t) (* (- y x) (/ -1.0 (- t a))))))
        (t_2 (+ x (/ (* (- x y) (- t z)) (- a t)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -5e-205)
       t_2
       (if (<= t_2 2e-227) (- y (/ (* (- a z) (- x y)) t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((z - t) * ((y - x) * (-1.0 / (t - a))));
	double t_2 = x + (((x - y) * (t - z)) / (a - t));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -5e-205) {
		tmp = t_2;
	} else if (t_2 <= 2e-227) {
		tmp = y - (((a - z) * (x - y)) / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((z - t) * ((y - x) * (-1.0 / (t - a))));
	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 <= -5e-205) {
		tmp = t_2;
	} else if (t_2 <= 2e-227) {
		tmp = y - (((a - z) * (x - y)) / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((z - t) * ((y - x) * (-1.0 / (t - a))))
	t_2 = x + (((x - y) * (t - z)) / (a - t))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -5e-205:
		tmp = t_2
	elif t_2 <= 2e-227:
		tmp = y - (((a - z) * (x - y)) / t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) * Float64(-1.0 / Float64(t - a)))))
	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 <= -5e-205)
		tmp = t_2;
	elseif (t_2 <= 2e-227)
		tmp = Float64(y - Float64(Float64(Float64(a - z) * 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 - t) * ((y - x) * (-1.0 / (t - a))));
	t_2 = x + (((x - y) * (t - z)) / (a - t));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -5e-205)
		tmp = t_2;
	elseif (t_2 <= 2e-227)
		tmp = y - (((a - 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[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] * N[(-1.0 / N[(t - a), $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, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -5e-205], t$95$2, If[LessEqual[t$95$2, 2e-227], N[(y - N[(N[(N[(a - z), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(z - t\right) \cdot \left(\left(y - x\right) \cdot \frac{-1}{t - a}\right)\\
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 -5 \cdot 10^{-205}:\\
\;\;\;\;t\_2\\

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

\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 1.99999999999999989e-227 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 57.6%

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.00000000000000001e-205

    1. Initial program 96.4%

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

    if -5.00000000000000001e-205 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 1.99999999999999989e-227

    1. Initial program 25.0%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified30.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 88.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+88.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/88.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/88.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-neg88.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-sub88.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(x - y\right) \cdot \left(t - z\right)}{a - t} \leq -\infty:\\ \;\;\;\;x + \left(z - t\right) \cdot \left(\left(y - x\right) \cdot \frac{-1}{t - a}\right)\\ \mathbf{elif}\;x + \frac{\left(x - y\right) \cdot \left(t - z\right)}{a - t} \leq -5 \cdot 10^{-205}:\\ \;\;\;\;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 2 \cdot 10^{-227}:\\ \;\;\;\;y - \frac{\left(a - z\right) \cdot \left(x - y\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - t\right) \cdot \left(\left(y - x\right) \cdot \frac{-1}{t - a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 47.9% accurate, 0.4× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -3.10000000000000012e187 or 7.9999999999999997e99 < 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*68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(-\left(\frac{z}{t} + \color{blue}{-1}\right)\right) \]
    13. Simplified68.0%

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

    if -3.10000000000000012e187 < t < -2.89999999999999987e97

    1. Initial program 21.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.89999999999999987e97 < t < 8.49999999999999945e-33

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.49999999999999945e-33 < t < 5e15

    1. Initial program 81.2%

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

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

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

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

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

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

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

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

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

    if 5e15 < t < 7.9999999999999997e99

    1. Initial program 76.5%

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

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

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

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

      \[\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 y around 0 52.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{a - t}} \]
    7. Step-by-step derivation
      1. mul-1-neg52.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.1 \cdot 10^{+187}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;t \leq -2.9 \cdot 10^{+97}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-33}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+15}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+99}:\\ \;\;\;\;x \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 46.2% accurate, 0.4× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -6.30000000000000005e187 or 8.49999999999999984e99 < 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*68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.30000000000000005e187 < t < -1.57999999999999993e97

    1. Initial program 21.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.57999999999999993e97 < t < 9.50000000000000019e-33

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.50000000000000019e-33 < t < 5.5e16

    1. Initial program 81.2%

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

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

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

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

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

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

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

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

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

    if 5.5e16 < t < 8.49999999999999984e99

    1. Initial program 76.5%

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

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

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

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

      \[\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 y around 0 52.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{a - t}} \]
    7. Step-by-step derivation
      1. mul-1-neg52.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.3 \cdot 10^{+187}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.58 \cdot 10^{+97}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-33}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+16}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+99}:\\ \;\;\;\;x \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 46.0% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.10000000000000012e187 or 8.19999999999999959e99 < 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*68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.10000000000000012e187 < t < 1.00000000000000006e-32

    1. Initial program 79.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000006e-32 < t < 3.3e15

    1. Initial program 81.2%

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

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

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

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

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

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

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

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

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

    if 3.3e15 < t < 8.19999999999999959e99

    1. Initial program 76.5%

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

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

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

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

      \[\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 y around 0 52.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{a - t}} \]
    7. Step-by-step derivation
      1. mul-1-neg52.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.1 \cdot 10^{+187}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 10^{-32}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+15}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+99}:\\ \;\;\;\;x \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 72.6% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.5999999999999993e94 or 9.99999999999999927e74 < t

    1. Initial program 34.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.5999999999999993e94 < t < -9.39999999999999978e-147

    1. Initial program 76.1%

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

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

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

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

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

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

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

    if -9.39999999999999978e-147 < t < 9.99999999999999927e74

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

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

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

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

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

Alternative 7: 71.2% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.1999999999999999e95 or 8.19999999999999959e99 < t

    1. Initial program 32.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y + \color{blue}{a \cdot \frac{y - x}{t}} \]
    11. Simplified66.9%

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

    if -2.1999999999999999e95 < t < -1.15e-146

    1. Initial program 76.1%

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

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

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

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

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

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

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

    if -1.15e-146 < t < 8.19999999999999959e99

    1. Initial program 86.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{+95}:\\ \;\;\;\;y + a \cdot \frac{y - x}{t}\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{-146}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+99}:\\ \;\;\;\;x + z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + a \cdot \frac{y - x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 34.4% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -1.9 \cdot 10^{-240}:\\
\;\;\;\;x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.70000000000000009e185 or 7.9999999999999997e99 < t

    1. Initial program 34.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.70000000000000009e185 < t < -1.89999999999999994e-240

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

        \[\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 a around inf 32.4%

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

    if -1.89999999999999994e-240 < t < 2.35e-7

    1. Initial program 86.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    11. Step-by-step derivation
      1. clear-num45.2%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    12. Applied egg-rr46.1%

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

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

    if 2.35e-7 < t < 7.9999999999999997e99

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 34.4% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -9.2 \cdot 10^{-241}:\\
\;\;\;\;x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.70000000000000009e185 or 8.19999999999999959e99 < t

    1. Initial program 34.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.70000000000000009e185 < t < -9.1999999999999997e-241

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

        \[\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 a around inf 32.4%

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

    if -9.1999999999999997e-241 < t < 6.99999999999999968e-7

    1. Initial program 86.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.99999999999999968e-7 < t < 8.19999999999999959e99

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 62.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-146}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.15e-146

    1. Initial program 50.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15e-146 < t < 2.9000000000000001e-43

    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 t around 0 81.1%

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

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

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

    if 2.9000000000000001e-43 < t < 8.49999999999999984e99

    1. Initial program 82.1%

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{1}{\frac{a - t}{y - x}}} \]
      3. un-div-inv70.9%

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

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

    if 8.49999999999999984e99 < t

    1. Initial program 38.6%

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

        \[\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 z around inf 53.6%

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

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

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

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

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

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

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

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

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

Alternative 11: 57.9% accurate, 0.5× speedup?

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

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

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

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

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


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

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

        \[\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 y around 0 63.6%

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

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

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

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

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

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

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

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

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

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

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

    if -3.2000000000000001e144 < x < 1.6999999999999999e-20

    1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6999999999999999e-20 < x < 1.9e55

    1. Initial program 99.9%

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

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

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

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

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

    if 1.9e55 < x

    1. Initial program 37.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 76.4% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 24.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9e95 < t < 7.9999999999999996e196

    1. Initial program 82.8%

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

    if 7.9999999999999996e196 < t

    1. Initial program 20.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y + \color{blue}{a \cdot \frac{y - x}{t}} \]
    11. Simplified75.9%

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

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

Alternative 13: 71.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.45 \cdot 10^{+95} \lor \neg \left(t \leq 8 \cdot 10^{+99}\right):\\
\;\;\;\;y + a \cdot \frac{y - x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.4499999999999999e95 or 7.9999999999999997e99 < t

    1. Initial program 32.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y + \color{blue}{a \cdot \frac{y - x}{t}} \]
    11. Simplified66.9%

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

    if -2.4499999999999999e95 < t < 7.9999999999999997e99

    1. Initial program 84.3%

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

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

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

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

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

Alternative 14: 34.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 2.15 \cdot 10^{-145}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.70000000000000009e185 or 8.19999999999999959e99 < t

    1. Initial program 34.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.70000000000000009e185 < t < 2.15e-145

    1. Initial program 78.3%

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

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

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

    if 2.15e-145 < t < 8.19999999999999959e99

    1. Initial program 81.8%

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

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

        \[\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 y around 0 50.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 63.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-146} \lor \neg \left(t \leq 1.2 \cdot 10^{-32}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.15e-146 or 1.2000000000000001e-32 < t

    1. Initial program 52.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15e-146 < t < 1.2000000000000001e-32

    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 t around 0 80.2%

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

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

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

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

Alternative 16: 63.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.8 \cdot 10^{-147}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.8000000000000001e-147

    1. Initial program 50.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.8000000000000001e-147 < t < 9.19999999999999942e-33

    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 t around 0 80.2%

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

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

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

    if 9.19999999999999942e-33 < t

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    11. Step-by-step derivation
      1. clear-num61.5%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    12. Applied egg-rr61.5%

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

Alternative 17: 57.4% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.4000000000000001e144

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

        \[\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 y around 0 63.6%

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

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

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

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

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

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

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

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

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

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

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

    if -2.4000000000000001e144 < x < 1.9000000000000001e26

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9000000000000001e26 < x

    1. Initial program 40.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 47.0% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.10000000000000012e187 or 8.4999999999999996e71 < t

    1. Initial program 37.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} + x \]
      11. fma-define64.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    7. Simplified64.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    8. Taylor expanded in t around inf 60.6%

      \[\leadsto \color{blue}{y} \]

    if -3.10000000000000012e187 < t < 8.4999999999999996e71

    1. Initial program 79.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative79.0%

        \[\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 y around 0 47.1%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}} \]
    6. Step-by-step derivation
      1. *-rgt-identity47.1%

        \[\leadsto \color{blue}{x \cdot 1} + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t} \]
      2. mul-1-neg47.1%

        \[\leadsto x \cdot 1 + \color{blue}{\left(-\frac{x \cdot \left(z - t\right)}{a - t}\right)} \]
      3. associate-/l*53.7%

        \[\leadsto x \cdot 1 + \left(-\color{blue}{x \cdot \frac{z - t}{a - t}}\right) \]
      4. distribute-rgt-neg-in53.7%

        \[\leadsto x \cdot 1 + \color{blue}{x \cdot \left(-\frac{z - t}{a - t}\right)} \]
      5. mul-1-neg53.7%

        \[\leadsto x \cdot 1 + x \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{a - t}\right)} \]
      6. distribute-lft-in53.7%

        \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
      7. mul-1-neg53.7%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z - t}{a - t}\right)}\right) \]
      8. unsub-neg53.7%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    7. Simplified53.7%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z - t}{a - t}\right)} \]
    8. Taylor expanded in t around 0 46.3%

      \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 19: 36.1% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+185}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+47}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.7e+185) y (if (<= t 2.2e+47) x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.7e+185) {
		tmp = y;
	} else if (t <= 2.2e+47) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-1.7d+185)) then
        tmp = y
    else if (t <= 2.2d+47) then
        tmp = x
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.7e+185) {
		tmp = y;
	} else if (t <= 2.2e+47) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.7e+185:
		tmp = y
	elif t <= 2.2e+47:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.7e+185)
		tmp = y;
	elseif (t <= 2.2e+47)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -1.7e+185)
		tmp = y;
	elseif (t <= 2.2e+47)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.7e+185], y, If[LessEqual[t, 2.2e+47], x, y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{+185}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{+47}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.70000000000000009e185 or 2.1999999999999999e47 < t

    1. Initial program 37.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative37.6%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-/l*69.9%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. fma-define69.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified69.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 54.4%

      \[\leadsto \color{blue}{x + \left(-1 \cdot \frac{x \cdot \left(z - t\right)}{a - t} + y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutative54.4%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{x \cdot \left(z - t\right)}{a - t} + y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)\right) + x} \]
      2. +-commutative54.4%

        \[\leadsto \color{blue}{\left(y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right) + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}\right)} + x \]
      3. div-sub54.4%

        \[\leadsto \left(y \cdot \color{blue}{\frac{z - t}{a - t}} + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}\right) + x \]
      4. mul-1-neg54.4%

        \[\leadsto \left(y \cdot \frac{z - t}{a - t} + \color{blue}{\left(-\frac{x \cdot \left(z - t\right)}{a - t}\right)}\right) + x \]
      5. associate-/l*69.9%

        \[\leadsto \left(y \cdot \frac{z - t}{a - t} + \left(-\color{blue}{x \cdot \frac{z - t}{a - t}}\right)\right) + x \]
      6. distribute-lft-neg-in69.9%

        \[\leadsto \left(y \cdot \frac{z - t}{a - t} + \color{blue}{\left(-x\right) \cdot \frac{z - t}{a - t}}\right) + x \]
      7. distribute-rgt-in69.9%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y + \left(-x\right)\right)} + x \]
      8. sub-neg69.9%

        \[\leadsto \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} + x \]
      9. associate-*l/37.6%

        \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot \left(y - x\right)}{a - t}} + x \]
      10. associate-*r/65.7%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} + x \]
      11. fma-define65.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    7. Simplified65.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    8. Taylor expanded in t around inf 58.6%

      \[\leadsto \color{blue}{y} \]

    if -1.70000000000000009e185 < t < 2.1999999999999999e47

    1. Initial program 79.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative79.7%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-/l*90.8%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. fma-define90.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified90.8%

      \[\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.4%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 20: 25.3% accurate, 13.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 66.1%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. +-commutative66.1%

      \[\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. Taylor expanded in a around inf 19.6%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Alternative 21: 2.8% accurate, 13.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
def code(x, y, z, t, a):
	return 0.0
function code(x, y, z, t, a)
	return 0.0
end
function tmp = code(x, y, z, t, a)
	tmp = 0.0;
end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 66.1%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. +-commutative66.1%

      \[\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. Taylor expanded in y around 0 36.1%

    \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}} \]
  6. Step-by-step derivation
    1. *-rgt-identity36.1%

      \[\leadsto \color{blue}{x \cdot 1} + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t} \]
    2. mul-1-neg36.1%

      \[\leadsto x \cdot 1 + \color{blue}{\left(-\frac{x \cdot \left(z - t\right)}{a - t}\right)} \]
    3. associate-/l*41.7%

      \[\leadsto x \cdot 1 + \left(-\color{blue}{x \cdot \frac{z - t}{a - t}}\right) \]
    4. distribute-rgt-neg-in41.7%

      \[\leadsto x \cdot 1 + \color{blue}{x \cdot \left(-\frac{z - t}{a - t}\right)} \]
    5. mul-1-neg41.7%

      \[\leadsto x \cdot 1 + x \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{a - t}\right)} \]
    6. distribute-lft-in41.7%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
    7. mul-1-neg41.7%

      \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z - t}{a - t}\right)}\right) \]
    8. unsub-neg41.7%

      \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
  7. Simplified41.7%

    \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z - t}{a - t}\right)} \]
  8. Taylor expanded in t around inf 2.6%

    \[\leadsto x \cdot \left(1 - \color{blue}{1}\right) \]
  9. Taylor expanded in x around 0 2.6%

    \[\leadsto \color{blue}{0} \]
  10. Add Preprocessing

Developer Target 1: 86.5% 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 2024139 
(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))))