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

Percentage Accurate: 68.3% → 88.7%
Time: 23.0s
Alternatives: 19
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 68.3% accurate, 1.0× speedup?

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

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

Alternative 1: 88.7% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.12 \cdot 10^{+182} \lor \neg \left(t \leq 1.2 \cdot 10^{+133}\right):\\
\;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.11999999999999994e182 or 1.1999999999999999e133 < t

    1. Initial program 30.8%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
    6. Applied egg-rr55.7%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
    7. Taylor expanded in t around inf 63.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}} \]
    8. Step-by-step derivation
      1. associate--l+63.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. distribute-lft-out--63.0%

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

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

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

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

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

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

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

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

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

    if -1.11999999999999994e182 < t < 1.1999999999999999e133

    1. Initial program 83.1%

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

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

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

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

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

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

Alternative 2: 86.1% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-252}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;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 2.00000000000000011e301 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 41.3%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
    6. Applied egg-rr76.5%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
    7. Taylor expanded in t around inf 49.7%

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    8. Step-by-step derivation
      1. associate--l+49.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. distribute-lft-out--49.7%

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.00000000000000008e-252 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2.00000000000000011e301

    1. Initial program 99.8%

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

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

    1. Initial program 4.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 51.5% accurate, 0.4× speedup?

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

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

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

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

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

\mathbf{elif}\;a \leq 1.7 \cdot 10^{+95}:\\
\;\;\;\;t \cdot \frac{y}{t - a}\\

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


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

    1. Initial program 65.0%

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

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

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

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

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

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

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

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

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

    if -4.7e52 < a < 7.49999999999999965e-209

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.49999999999999965e-209 < a < 4.2999999999999999e-39

    1. Initial program 61.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{z \cdot \left(y - x\right)}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \]
      7. add-sqr-sqrt10.7%

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

        \[\leadsto -\color{blue}{z \cdot \frac{y - x}{-t}} \]
      9. clear-num10.8%

        \[\leadsto -z \cdot \color{blue}{\frac{1}{\frac{-t}{y - x}}} \]
      10. un-div-inv10.8%

        \[\leadsto -\color{blue}{\frac{z}{\frac{-t}{y - x}}} \]
      11. add-sqr-sqrt1.1%

        \[\leadsto -\frac{z}{\frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{y - x}} \]
      12. sqrt-unprod25.8%

        \[\leadsto -\frac{z}{\frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{y - x}} \]
      13. sqr-neg25.8%

        \[\leadsto -\frac{z}{\frac{\sqrt{\color{blue}{t \cdot t}}}{y - x}} \]
      14. sqrt-unprod30.5%

        \[\leadsto -\frac{z}{\frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{y - x}} \]
      15. add-sqr-sqrt55.8%

        \[\leadsto -\frac{z}{\frac{\color{blue}{t}}{y - x}} \]
    10. Applied egg-rr55.8%

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

    if 4.2999999999999999e-39 < a < 5.7000000000000002e51

    1. Initial program 86.5%

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

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

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

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

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

    if 5.7000000000000002e51 < a < 1.70000000000000011e95

    1. Initial program 68.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{a - t}} \]
    9. Step-by-step derivation
      1. mul-1-neg53.0%

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

        \[\leadsto -\color{blue}{t \cdot \frac{y}{a - t}} \]
      3. distribute-rgt-neg-in75.1%

        \[\leadsto \color{blue}{t \cdot \left(-\frac{y}{a - t}\right)} \]
      4. distribute-frac-neg275.1%

        \[\leadsto t \cdot \color{blue}{\frac{y}{-\left(a - t\right)}} \]
      5. neg-sub075.1%

        \[\leadsto t \cdot \frac{y}{\color{blue}{0 - \left(a - t\right)}} \]
      6. associate--r-75.1%

        \[\leadsto t \cdot \frac{y}{\color{blue}{\left(0 - a\right) + t}} \]
      7. neg-sub075.1%

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

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

    if 1.70000000000000011e95 < a

    1. Initial program 66.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.7 \cdot 10^{+52}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-209}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{-39}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;a \leq 5.7 \cdot 10^{+51}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+95}:\\ \;\;\;\;t \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 37.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -6 \cdot 10^{-193}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 0.00065:\\
\;\;\;\;x \cdot \frac{z}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.2e52 or 9e108 < a

    1. Initial program 67.0%

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

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

    if -3.2e52 < a < -5.9999999999999998e-193

    1. Initial program 74.9%

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

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

    if -5.9999999999999998e-193 < a < 6.4999999999999997e-4

    1. Initial program 68.1%

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
      2. div-inv62.3%

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

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

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

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

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

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

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

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

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

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

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

    if 6.4999999999999997e-4 < a < 9e108

    1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{+52}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-193}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 0.00065:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+108}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 49.8% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.20000000000000002e-49 or 1.75e95 < a

    1. Initial program 69.6%

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

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

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

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

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

    if -3.20000000000000002e-49 < a < 2.75000000000000009e-39

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{z \cdot \left(y - x\right)}{t}} \]
      3. add-sqr-sqrt28.1%

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

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

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

        \[\leadsto -\frac{z \cdot \left(y - x\right)}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \]
      7. add-sqr-sqrt5.1%

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

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

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

        \[\leadsto -\color{blue}{\frac{z}{\frac{-t}{y - x}}} \]
      11. add-sqr-sqrt1.0%

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

        \[\leadsto -\frac{z}{\frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{y - x}} \]
      13. sqr-neg21.7%

        \[\leadsto -\frac{z}{\frac{\sqrt{\color{blue}{t \cdot t}}}{y - x}} \]
      14. sqrt-unprod30.6%

        \[\leadsto -\frac{z}{\frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{y - x}} \]
      15. add-sqr-sqrt54.2%

        \[\leadsto -\frac{z}{\frac{\color{blue}{t}}{y - x}} \]
    10. Applied egg-rr54.2%

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

    if 2.75000000000000009e-39 < a < 2.6000000000000001e51

    1. Initial program 86.5%

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

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

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

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

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

    if 2.6000000000000001e51 < a < 1.75e95

    1. Initial program 68.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{a - t}} \]
    9. Step-by-step derivation
      1. mul-1-neg53.0%

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

        \[\leadsto -\color{blue}{t \cdot \frac{y}{a - t}} \]
      3. distribute-rgt-neg-in75.1%

        \[\leadsto \color{blue}{t \cdot \left(-\frac{y}{a - t}\right)} \]
      4. distribute-frac-neg275.1%

        \[\leadsto t \cdot \color{blue}{\frac{y}{-\left(a - t\right)}} \]
      5. neg-sub075.1%

        \[\leadsto t \cdot \frac{y}{\color{blue}{0 - \left(a - t\right)}} \]
      6. associate--r-75.1%

        \[\leadsto t \cdot \frac{y}{\color{blue}{\left(0 - a\right) + t}} \]
      7. neg-sub075.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{-49}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 2.75 \cdot 10^{-39}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+51}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{+95}:\\ \;\;\;\;t \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 76.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -1.2 \cdot 10^{-46} \lor \neg \left(a \leq 2.3 \cdot 10^{-41}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\

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


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

    1. Initial program 64.1%

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

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

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

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

    if -3.8e105 < a < -1.20000000000000007e-46 or 2.3000000000000001e-41 < a

    1. Initial program 74.0%

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

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

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

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

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

    if -1.20000000000000007e-46 < a < 2.3000000000000001e-41

    1. Initial program 66.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 82.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}} \]
    4. Step-by-step derivation
      1. associate--l+82.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/82.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/82.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. div-sub83.6%

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

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

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

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

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

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

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

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

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

Alternative 7: 61.9% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 65.0%

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

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

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

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

    if -3e52 < a < 8.2000000000000002e-238

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.2000000000000002e-238 < a < 2.49999999999999986e-30

    1. Initial program 64.3%

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
      2. div-inv71.4%

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

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

    if 2.49999999999999986e-30 < 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 60.4%

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

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

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

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

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

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

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

Alternative 8: 88.7% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.60000000000000011e157 or 2.09999999999999992e127 < t

    1. Initial program 30.2%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
    6. Applied egg-rr57.0%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
    7. Taylor expanded in t around inf 62.6%

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    8. Step-by-step derivation
      1. associate--l+62.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. distribute-lft-out--62.6%

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

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

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

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

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

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

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

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

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

    if -2.60000000000000011e157 < t < 2.09999999999999992e127

    1. Initial program 83.8%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
    6. Applied egg-rr91.8%

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

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

Alternative 9: 56.1% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;x \leq 76:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


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

    1. Initial program 44.7%

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

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

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

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

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

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

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

    if -4.5999999999999998e108 < x < -1.64999999999999986e-51

    1. Initial program 75.0%

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

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

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

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

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

    if -1.64999999999999986e-51 < x < 76

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

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

    if 76 < x

    1. Initial program 64.6%

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \frac{z}{a}} \]
    8. Simplified57.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.6 \cdot 10^{+108}:\\ \;\;\;\;x \cdot \frac{z}{t - a}\\ \mathbf{elif}\;x \leq -1.65 \cdot 10^{-51}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq 76:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 56.6% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;x \leq 47:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


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

    1. Initial program 44.7%

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

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

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

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

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

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

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

    if -5.2000000000000005e108 < x < -8.7999999999999998e-54

    1. Initial program 75.0%

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

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

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

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

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

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

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

    if -8.7999999999999998e-54 < x < 47

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

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

    if 47 < x

    1. Initial program 64.6%

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \frac{z}{a}} \]
    8. Simplified57.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.2 \cdot 10^{+108}:\\ \;\;\;\;x \cdot \frac{z}{t - a}\\ \mathbf{elif}\;x \leq -8.8 \cdot 10^{-54}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;x \leq 47:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 61.4% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 65.0%

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

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

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

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

    if -4.2e52 < a < 4.7999999999999999e-240

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.7999999999999999e-240 < a < 1.6000000000000001e-32

    1. Initial program 64.3%

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

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

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

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

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

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

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

    if 1.6000000000000001e-32 < 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 60.4%

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

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

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

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

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

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

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

Alternative 12: 67.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-72} \lor \neg \left(z \leq 4.5 \cdot 10^{+172}\right):\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot \frac{-1}{t - a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.40000000000000005e-72 or 4.5000000000000002e172 < z

    1. Initial program 68.1%

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
      2. div-inv79.6%

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

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

    if -4.40000000000000005e-72 < z < 4.5000000000000002e172

    1. Initial program 70.9%

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

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

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

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

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

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

Alternative 13: 71.6% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 30.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    8. Step-by-step derivation
      1. clear-num64.4%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    9. Applied egg-rr64.4%

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

    if -4.49999999999999973e155 < t < 1.52e47

    1. Initial program 83.9%

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

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

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

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

    if 1.52e47 < t

    1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 37.4% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.3e52 or 1.1499999999999999e-31 < a

    1. Initial program 69.2%

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

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

    if -2.3e52 < a < -7.5000000000000001e-192

    1. Initial program 74.9%

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

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

    if -7.5000000000000001e-192 < a < 1.1499999999999999e-31

    1. Initial program 66.9%

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
      2. div-inv65.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+52}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-192}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-31}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 61.1% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.00000000000000065e-5 or 0.0054000000000000003 < x

    1. Initial program 60.4%

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

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

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

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

    if -8.00000000000000065e-5 < x < 0.0054000000000000003

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

Alternative 16: 50.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.7000000000000001e-49 or 1.5e-37 < a

    1. Initial program 72.0%

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

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

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

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

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

    if -3.7000000000000001e-49 < a < 1.5e-37

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{z \cdot \left(y - x\right)}{t}} \]
      3. add-sqr-sqrt28.1%

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

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

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

        \[\leadsto -\frac{z \cdot \left(y - x\right)}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \]
      7. add-sqr-sqrt5.1%

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

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

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

        \[\leadsto -\color{blue}{\frac{z}{\frac{-t}{y - x}}} \]
      11. add-sqr-sqrt1.0%

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

        \[\leadsto -\frac{z}{\frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{y - x}} \]
      13. sqr-neg21.7%

        \[\leadsto -\frac{z}{\frac{\sqrt{\color{blue}{t \cdot t}}}{y - x}} \]
      14. sqrt-unprod30.6%

        \[\leadsto -\frac{z}{\frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{y - x}} \]
      15. add-sqr-sqrt54.2%

        \[\leadsto -\frac{z}{\frac{\color{blue}{t}}{y - x}} \]
    10. Applied egg-rr54.2%

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

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

Alternative 17: 51.7% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.4999999999999999e139 or 6.19999999999999985e49 < t

    1. Initial program 40.6%

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

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

    if -4.4999999999999999e139 < t < 6.19999999999999985e49

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

Alternative 18: 38.5% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+51}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.3e96 or 1.8999999999999999e51 < t

    1. Initial program 42.9%

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

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

    if -1.3e96 < t < 1.8999999999999999e51

    1. Initial program 87.6%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{+96}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+51}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 25.6% 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 69.8%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification24.7%

    \[\leadsto x \]
  5. Add Preprocessing

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

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

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