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

Percentage Accurate: 67.9% → 89.4%
Time: 11.6s
Alternatives: 22
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 67.9% accurate, 1.0× speedup?

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

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

Alternative 1: 89.4% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{+161} \lor \neg \left(t \leq 1.1 \cdot 10^{+176}\right):\\ \;\;\;\;y + \frac{a - z}{\frac{t}{y - x}}\\ \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 -9.5e+161) (not (<= t 1.1e+176)))
   (+ y (/ (- a z) (/ t (- y x))))
   (fma (- y x) (/ (- z t) (- a t)) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -9.5e+161) || !(t <= 1.1e+176)) {
		tmp = y + ((a - z) / (t / (y - x)));
	} else {
		tmp = fma((y - x), ((z - t) / (a - t)), x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -9.5e+161) || !(t <= 1.1e+176))
		tmp = Float64(y + Float64(Float64(a - z) / Float64(t / Float64(y - x))));
	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, -9.5e+161], N[Not[LessEqual[t, 1.1e+176]], $MachinePrecision]], N[(y + N[(N[(a - z), $MachinePrecision] / N[(t / N[(y - x), $MachinePrecision]), $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 -9.5 \cdot 10^{+161} \lor \neg \left(t \leq 1.1 \cdot 10^{+176}\right):\\
\;\;\;\;y + \frac{a - z}{\frac{t}{y - x}}\\

\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 < -9.50000000000000061e161 or 1.10000000000000004e176 < t

    1. Initial program 24.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.50000000000000061e161 < t < 1.10000000000000004e176

    1. Initial program 77.4%

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

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

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

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

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

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

Alternative 2: 82.8% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.2000000000000006e95 or 1.6e178 < t

    1. Initial program 24.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 74.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+74.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--74.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-sub74.6%

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

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

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub74.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*81.7%

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

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

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

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

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

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

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

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

    if -6.2000000000000006e95 < t < 0.032000000000000001

    1. Initial program 84.8%

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

    if 0.032000000000000001 < t < 1.6e178

    1. Initial program 56.6%

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

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

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

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

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

Alternative 3: 80.6% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.20000000000000022e51

    1. Initial program 30.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.20000000000000022e51 < t < 1.25e-108

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

    if 1.25e-108 < t < 9.5e179

    1. Initial program 72.2%

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

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

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

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

    if 9.5e179 < t

    1. Initial program 24.0%

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

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

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

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

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

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

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

        \[\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*86.5%

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

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

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

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

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

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

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

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

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

Alternative 4: 80.7% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.44999999999999992e51 or 2.19999999999999997e178 < t

    1. Initial program 28.3%

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

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

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

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub72.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*78.3%

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

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

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

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

    if -2.44999999999999992e51 < t < 1.10000000000000006e-107

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

    if 1.10000000000000006e-107 < t < 2.19999999999999997e178

    1. Initial program 72.2%

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

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

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

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

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

Alternative 5: 78.8% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.79999999999999969e51 or 2.05e186 < t

    1. Initial program 26.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.79999999999999969e51 < t < 1.15000000000000002e-107

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

    if 1.15000000000000002e-107 < t < 2.05e186

    1. Initial program 73.1%

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

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

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

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

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

Alternative 6: 39.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq -1.7 \cdot 10^{-104}:\\
\;\;\;\;y + x\\

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

\mathbf{elif}\;t \leq 7.5 \cdot 10^{+181}:\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.9999999999999997e66 or 7.5000000000000005e181 < t

    1. Initial program 24.6%

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

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

    if -8.9999999999999997e66 < t < -1.70000000000000008e-104 or 9.1999999999999998e-129 < t < 7.5000000000000005e181

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

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

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

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

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

    if -1.70000000000000008e-104 < t < 9.1999999999999998e-129

    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 a around inf 34.7%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification45.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{+66}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-104}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{-129}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+181}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 89.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.56 \cdot 10^{+159} \lor \neg \left(t \leq 1.8 \cdot 10^{+185}\right):\\
\;\;\;\;y + \frac{a - z}{\frac{t}{y - x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.56e159 or 1.80000000000000014e185 < t

    1. Initial program 22.7%

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

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

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

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

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

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

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

        \[\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*83.3%

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

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

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

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

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

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

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

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

    if -1.56e159 < t < 1.80000000000000014e185

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 74.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.7 \cdot 10^{-67} \lor \neg \left(a \leq 6.2 \cdot 10^{-126}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.7000000000000002e-67 or 6.2000000000000003e-126 < 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 y around inf 65.8%

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

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

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

    if -5.7000000000000002e-67 < a < 6.2000000000000003e-126

    1. Initial program 53.1%

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

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

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

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub85.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*83.7%

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

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

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

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

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

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

Alternative 9: 65.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+67} \lor \neg \left(t \leq 8 \cdot 10^{-125}\right):\\
\;\;\;\;\frac{y}{\frac{t - a}{t - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.80000000000000004e67 or 8.0000000000000001e-125 < t

    1. Initial program 46.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    11. Applied egg-rr71.8%

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

    if -4.80000000000000004e67 < t < 8.0000000000000001e-125

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 65.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+77} \lor \neg \left(t \leq 1.05 \cdot 10^{-124}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.50000000000000024e77 or 1.05e-124 < t

    1. Initial program 46.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.50000000000000024e77 < t < 1.05e-124

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 64.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{-99} \lor \neg \left(t \leq 10^{-124}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.4e-99 or 9.99999999999999933e-125 < t

    1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4e-99 < t < 9.99999999999999933e-125

    1. Initial program 87.3%

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

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

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

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

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

Alternative 12: 65.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+54} \lor \neg \left(a \leq 3.25 \cdot 10^{+42}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.8000000000000001e54 or 3.25000000000000026e42 < a

    1. Initial program 70.1%

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

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

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

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

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

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

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

    if -1.8000000000000001e54 < a < 3.25000000000000026e42

    1. Initial program 62.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 62.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{+141} \lor \neg \left(a \leq 1.65 \cdot 10^{+38}\right):\\
\;\;\;\;x + y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.02e141 or 1.65e38 < a

    1. Initial program 69.5%

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

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

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

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

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

    if -1.02e141 < a < 1.65e38

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 68.3% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 30.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e51 < t < 1.05e-124

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

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

    if 1.05e-124 < t

    1. Initial program 55.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    10. Step-by-step derivation
      1. clear-num68.6%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    11. Applied egg-rr68.6%

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

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

Alternative 15: 68.5% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 30.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e51 < t < 8.0000000000000001e-125

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

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

    if 8.0000000000000001e-125 < t

    1. Initial program 55.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    10. Step-by-step derivation
      1. clear-num68.6%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    11. Applied egg-rr68.6%

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

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

Alternative 16: 56.7% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.5e51 or 9.8000000000000005e35 < a

    1. Initial program 70.1%

      \[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. Taylor expanded in y around inf 60.2%

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

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

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

    if -5.5e51 < a < 9.8000000000000005e35

    1. Initial program 62.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 56.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+54} \lor \neg \left(a \leq 3.45 \cdot 10^{+34}\right):\\
\;\;\;\;x + y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.0000000000000001e54 or 3.45000000000000019e34 < a

    1. Initial program 70.1%

      \[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. Taylor expanded in y around inf 60.2%

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

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

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

    if -1.0000000000000001e54 < a < 3.45000000000000019e34

    1. Initial program 62.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 54.1% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.7999999999999999e65 or 3.60000000000000001e104 < t

    1. Initial program 27.5%

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

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

    if -6.7999999999999999e65 < t < 3.60000000000000001e104

    1. Initial program 83.8%

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

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

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

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

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

Alternative 19: 48.9% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.40000000000000003e68 or 4.4999999999999998e104 < t

    1. Initial program 26.6%

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

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

    if -8.40000000000000003e68 < t < 4.4999999999999998e104

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

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

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

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

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

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

Alternative 20: 38.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.06 \cdot 10^{+148} \lor \neg \left(z \leq 2 \cdot 10^{-36}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.06e148 or 1.9999999999999999e-36 < z

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    12. Simplified41.0%

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

    if -1.06e148 < z < 1.9999999999999999e-36

    1. Initial program 64.7%

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

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

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

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

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

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

Alternative 21: 39.5% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 310000:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.69999999999999999e53 or 3.1e5 < a

    1. Initial program 72.7%

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

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

    if -1.69999999999999999e53 < a < 3.1e5

    1. Initial program 59.6%

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

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

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

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

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

Developer target: 86.6% 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 2024106 
(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))))