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

Percentage Accurate: 67.8% → 90.0%
Time: 15.3s
Alternatives: 17
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 67.8% 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.0% accurate, 0.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;y - \frac{x \cdot \left(a - z\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))) < -1.9999999999999999e-235 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 71.4%

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

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

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

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

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

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

    1. Initial program 4.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 83.0% accurate, 0.2× speedup?

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

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

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

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

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

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


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

    1. Initial program 36.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.9999999999999999e-235 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2e295

    1. Initial program 96.4%

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

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

    1. Initial program 4.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 88.4% 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}{a - t}\right)\\ t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-235}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;y - \frac{x \cdot \left(a - z\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 (- a t))))))
        (t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -2e-235)
       t_2
       (if (<= t_2 0.0) (- y (/ (* x (- a z)) 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 / (a - t))));
	double t_2 = x + (((y - x) * (z - t)) / (a - t));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -2e-235) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = y - ((x * (a - z)) / 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 / (a - t))));
	double t_2 = x + (((y - x) * (z - t)) / (a - t));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -2e-235) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = y - ((x * (a - z)) / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((z - t) * ((y - x) * (1.0 / (a - t))))
	t_2 = x + (((y - x) * (z - t)) / (a - t))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -2e-235:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = y - ((x * (a - z)) / 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(a - t)))))
	t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -2e-235)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(y - Float64(Float64(x * Float64(a - z)) / 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 / (a - t))));
	t_2 = x + (((y - x) * (z - t)) / (a - t));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -2e-235)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = y - ((x * (a - z)) / t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -2e-235], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y - N[(N[(x * N[(a - z), $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}{a - t}\right)\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y - \frac{x \cdot \left(a - z\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 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 58.8%

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

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

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

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

      \[\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))) < -1.9999999999999999e-235

    1. Initial program 95.4%

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

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

    1. Initial program 4.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 65.7% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.3000000000000002e78

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3000000000000002e78 < a < -1.5e-48

    1. Initial program 61.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5e-48 < a < 1.55999999999999996e-40

    1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.55999999999999996e-40 < a

    1. Initial program 71.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+78}:\\ \;\;\;\;x \cdot \left(\frac{z - t}{t - a} + 1\right)\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-48}:\\ \;\;\;\;y - \frac{x \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;a \leq 1.56 \cdot 10^{-40}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 60.7% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.3e11 or 6.5000000000000002e-12 < t

    1. Initial program 43.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.3e11 < t < -8.99999999999999933e-232

    1. Initial program 95.1%

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

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

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

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

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

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

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

    if -8.99999999999999933e-232 < t < 6.5000000000000002e-12

    1. Initial program 91.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -530000000000:\\ \;\;\;\;y + y \cdot \frac{a - z}{t}\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-232}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-12}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{else}:\\ \;\;\;\;y + y \cdot \frac{a - z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 59.1% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.19999999999999994e101 or 1.85e24 < t

    1. Initial program 37.7%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified66.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 53.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. +-commutative53.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. +-commutative53.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-sub53.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-neg53.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*66.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-in66.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-in66.7%

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

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

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

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

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

    if -1.19999999999999994e101 < t < -9.5999999999999998e-227

    1. Initial program 87.7%

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

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

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

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

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

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

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

    if -9.5999999999999998e-227 < t < 1.85e24

    1. Initial program 90.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{+101}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -9.6 \cdot 10^{-227}:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+24}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 50.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -23000000000000:\\
\;\;\;\;y\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.3e13 or 2.0199999999999999e24 < t

    1. Initial program 41.3%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified69.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 56.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. +-commutative56.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. +-commutative56.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-sub56.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-neg56.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*69.1%

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

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

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

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

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

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

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

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

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

    if -2.3e13 < t < -5.1999999999999996e-293

    1. Initial program 93.0%

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

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

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

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

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

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

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

    if -5.1999999999999996e-293 < t < 2.0199999999999999e24

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 37.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -7.5 \cdot 10^{-279}:\\
\;\;\;\;y\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.75e113 or 1.4500000000000001e57 < a

    1. Initial program 69.7%

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

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

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

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

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

    if -2.75e113 < a < -7.5e-279 or 1.24999999999999994e-178 < a < 1.4500000000000001e57

    1. Initial program 63.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.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. +-commutative71.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. +-commutative71.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-sub71.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-neg71.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*73.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-in73.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-in75.4%

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

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

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

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

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

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

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

    if -7.5e-279 < a < 1.24999999999999994e-178

    1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 73.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{+45} \lor \neg \left(a \leq 1.7 \cdot 10^{-40}\right):\\
\;\;\;\;x - \frac{z - t}{a} \cdot \left(x - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.9999999999999997e45 or 1.69999999999999992e-40 < a

    1. Initial program 69.3%

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

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

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

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

    if -3.9999999999999997e45 < a < 1.69999999999999992e-40

    1. Initial program 63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 71.4% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 41.2%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified68.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 59.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+59.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/59.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/59.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-neg59.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-sub59.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-neg59.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--59.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/59.6%

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

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

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

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

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

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

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

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

    if -8.5e9 < t < 2.4999999999999999e27

    1. Initial program 91.7%

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

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

    if 2.4999999999999999e27 < t

    1. Initial program 40.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 73.4% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.5e44

    1. Initial program 65.4%

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

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

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

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

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

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

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

    if -4.5e44 < a < 1.15999999999999991e-40

    1. Initial program 63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15999999999999991e-40 < a

    1. Initial program 71.8%

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

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

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

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

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

Alternative 12: 68.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{+45} \lor \neg \left(a \leq 9.6 \cdot 10^{-41}\right):\\
\;\;\;\;x - z \cdot \frac{x - y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.4999999999999998e45 or 9.60000000000000087e-41 < a

    1. Initial program 69.3%

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

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

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

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

    if -4.4999999999999998e45 < a < 9.60000000000000087e-41

    1. Initial program 63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 56.6% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.60000000000000026e98 or 2.2000000000000001e31 < t

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

        \[\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 y around 0 53.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. +-commutative53.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. +-commutative53.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-sub53.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-neg53.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*66.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-in66.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-in66.4%

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

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

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

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

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

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

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

    if -4.60000000000000026e98 < t < 2.2000000000000001e31

    1. Initial program 89.3%

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

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

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

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

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

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

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

Alternative 14: 48.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 2.2 \cdot 10^{+24}:\\
\;\;\;\;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 < -1.16000000000000001e33 or 2.20000000000000002e24 < t

    1. Initial program 40.7%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified69.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 56.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. +-commutative56.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. +-commutative56.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-sub56.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-neg56.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*69.1%

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

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

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

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

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

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

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

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

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

    if -1.16000000000000001e33 < t < 2.20000000000000002e24

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 38.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 3.3 \cdot 10^{+55}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.5000000000000001e113 or 3.3e55 < a

    1. Initial program 69.7%

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

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

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

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

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

    if -4.5000000000000001e113 < a < 3.3e55

    1. Initial program 64.9%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified76.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 69.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. +-commutative69.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. +-commutative69.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-sub69.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-neg69.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*73.1%

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

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

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

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

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

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

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

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

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

Alternative 16: 25.0% accurate, 13.0× speedup?

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

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

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

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

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

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

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

Alternative 17: 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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x \cdot \left(1 - \color{blue}{1}\right) \]
  9. Taylor expanded in x around 0 2.8%

    \[\leadsto \color{blue}{0} \]
  10. Add Preprocessing

Developer Target 1: 86.3% 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 2024144 
(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))))