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

Percentage Accurate: 68.3% → 90.0%
Time: 15.5s
Alternatives: 20
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 20 alternatives:

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

Initial Program: 68.3% accurate, 1.0× speedup?

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

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

Alternative 1: 90.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{+142} \lor \neg \left(t \leq 1.3 \cdot 10^{+155}\right):\\
\;\;\;\;y - \left(y - x\right) \cdot \frac{z - a}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.3000000000000002e142 or 1.3000000000000001e155 < t

    1. Initial program 30.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.3000000000000002e142 < t < 1.3000000000000001e155

    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. associate-/l*94.8%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 35.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -8.6 \cdot 10^{-142}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 2.5 \cdot 10^{+134}:\\
\;\;\;\;z \cdot \frac{y}{-t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.16e129 or 2.4999999999999999e134 < t

    1. Initial program 32.9%

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

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

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

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

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

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

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

    if -1.16e129 < t < -8.5999999999999995e-142

    1. Initial program 80.0%

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

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

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

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

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

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

    if -8.5999999999999995e-142 < t < 7.6999999999999998e-87

    1. Initial program 92.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    8. Simplified37.1%

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

    if 7.6999999999999998e-87 < t < 2.4999999999999999e134

    1. Initial program 82.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
    8. Applied egg-rr37.0%

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

        \[\leadsto \color{blue}{\frac{y \cdot z}{a - t}} \]
      2. *-commutative34.5%

        \[\leadsto \frac{\color{blue}{z \cdot y}}{a - t} \]
      3. associate-*r/36.9%

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{-1 \cdot y}{t}} \]
      2. mul-1-neg34.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.16 \cdot 10^{+129}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -8.6 \cdot 10^{-142}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 7.7 \cdot 10^{-87}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+134}:\\ \;\;\;\;z \cdot \frac{y}{-t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 33.2% accurate, 0.5× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 2.3 \cdot 10^{+202}:\\
\;\;\;\;y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.3500000000000001e22 or 2.29999999999999999e202 < a

    1. Initial program 70.3%

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

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

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

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

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

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

    if -1.3500000000000001e22 < a < -2.20000000000000004e-190

    1. Initial program 68.4%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
    8. Applied egg-rr35.1%

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

        \[\leadsto \color{blue}{\frac{y \cdot z}{a - t}} \]
      2. *-commutative30.8%

        \[\leadsto \frac{\color{blue}{z \cdot y}}{a - t} \]
      3. associate-*r/35.0%

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{-1 \cdot y}{t}} \]
      2. mul-1-neg35.2%

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

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

    if -2.20000000000000004e-190 < a < 32000

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 32000 < a < 2.29999999999999999e202

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{+22}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-190}:\\ \;\;\;\;z \cdot \frac{y}{-t}\\ \mathbf{elif}\;a \leq 32000:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+202}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 59.8% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.60000000000000027e128 or 1.25e137 < t

    1. Initial program 32.7%

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

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

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

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

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

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

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

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

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

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

    if -3.60000000000000027e128 < t < 2.40000000000000015e-105

    1. Initial program 88.4%

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

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

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

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

    if 2.40000000000000015e-105 < t < 1.25e137

    1. Initial program 79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{+128}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-105}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+137}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{a - z}{t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 57.3% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.2e23 or 4.79999999999999982 < a

    1. Initial program 71.3%

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

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

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

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

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

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

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

    if -1.2e23 < a < -1.3000000000000001e-192

    1. Initial program 69.1%

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

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

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

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

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

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

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

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

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

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

    if -1.3000000000000001e-192 < a < 4.79999999999999982

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 53.6% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.20000000000000002e26 or 0.849999999999999978 < a

    1. Initial program 71.3%

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

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

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

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

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

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

    if -1.20000000000000002e26 < a < -1.7600000000000001e-193

    1. Initial program 69.1%

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

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

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

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

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

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

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

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

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

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

    if -1.7600000000000001e-193 < a < 0.849999999999999978

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 89.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+154} \lor \neg \left(t \leq 7.5 \cdot 10^{+150}\right):\\
\;\;\;\;y - \left(y - x\right) \cdot \frac{z - a}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.7999999999999999e154 or 7.4999999999999998e150 < t

    1. Initial program 29.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7999999999999999e154 < t < 7.4999999999999998e150

    1. Initial program 85.2%

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

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

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

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

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

Alternative 8: 52.6% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.9e22 or 0.650000000000000022 < a

    1. Initial program 71.3%

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

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

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

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

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

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

    if -2.9e22 < a < -7.4999999999999998e-194

    1. Initial program 69.1%

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

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

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

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

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

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

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

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

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

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

    if -7.4999999999999998e-194 < a < 0.650000000000000022

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 47.0% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.95e40 or 4.2000000000000001e204 < a

    1. Initial program 70.0%

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

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

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

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

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

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

    if -1.95e40 < a < 7.8e5

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

    if 7.8e5 < a < 4.2000000000000001e204

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

Alternative 10: 38.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq -9 \cdot 10^{-142}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 7.8 \cdot 10^{+36}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.19999999999999986e128 or 7.80000000000000042e36 < t

    1. Initial program 37.6%

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

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

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

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

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

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

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

    if -3.19999999999999986e128 < t < -9.00000000000000037e-142 or 3.49999999999999987e-174 < t < 7.80000000000000042e36

    1. Initial program 86.0%

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

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

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

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

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

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

    if -9.00000000000000037e-142 < t < 3.49999999999999987e-174

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

Alternative 11: 80.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4e129 or 1.76e44 < t

    1. Initial program 37.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4e129 < t < 1.76e44

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 76.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{+128} \lor \neg \left(t \leq 2.5 \cdot 10^{+106}\right):\\
\;\;\;\;y - z \cdot \frac{y - x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.3999999999999999e128 or 2.4999999999999999e106 < t

    1. Initial program 33.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.3999999999999999e128 < t < 2.4999999999999999e106

    1. Initial program 88.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 75.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.80000000000000048e130 or 2.25e113 < t

    1. Initial program 33.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.80000000000000048e130 < t < 2.25e113

    1. Initial program 88.2%

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

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

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

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

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

Alternative 14: 63.4% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.3999999999999999e129 or 6.40000000000000009e44 < t

    1. Initial program 37.2%

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

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

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

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

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

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

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

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

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

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

    if -4.3999999999999999e129 < t < 6.40000000000000009e44

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 63.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.3 \cdot 10^{+129} \lor \neg \left(t \leq 2.5 \cdot 10^{+44}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.2999999999999999e129 or 2.4999999999999998e44 < t

    1. Initial program 37.2%

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

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

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

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

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

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

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

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

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

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

    if -5.2999999999999999e129 < t < 2.4999999999999998e44

    1. Initial program 88.4%

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

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

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

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

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

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

Alternative 16: 69.5% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 71.7%

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

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

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

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

    if -3.1000000000000002e22 < a < 225

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 225 < a

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 56.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{+128} \lor \neg \left(t \leq 1.9 \cdot 10^{+38}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.59999999999999996e128 or 1.8999999999999999e38 < t

    1. Initial program 37.6%

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

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

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

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

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

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

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

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

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

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

    if -4.59999999999999996e128 < t < 1.8999999999999999e38

    1. Initial program 88.8%

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

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

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

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

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

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

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

Alternative 18: 48.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq 1.9 \cdot 10^{+132}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.0000000000000002e47 or 1.90000000000000003e132 < a

    1. Initial program 70.7%

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

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

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

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

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

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

    if -4.0000000000000002e47 < a < 1.90000000000000003e132

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

Alternative 19: 38.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq 3.2 \cdot 10^{+35}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.19999999999999993e129 or 3.19999999999999983e35 < t

    1. Initial program 37.6%

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

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

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

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

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

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

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

    if -4.19999999999999993e129 < t < 3.19999999999999983e35

    1. Initial program 88.8%

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

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

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

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

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

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

Alternative 20: 25.2% 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 72.0%

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

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

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

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

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

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

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

  :alt
  (! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))

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