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

Percentage Accurate: 67.7% → 85.9%
Time: 16.6s
Alternatives: 27
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 27 alternatives:

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

Initial Program: 67.7% 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: 85.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ t_2 := y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{if}\;t \leq -2.1 \cdot 10^{+113}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.66 \cdot 10^{-116}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-64}:\\ \;\;\;\;x - \frac{\left(y - x\right) \cdot \left(z - t\right)}{t - a}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+68}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- z t) (/ (- y x) (- a t)))))
        (t_2 (+ y (* (- z a) (/ (- x y) t)))))
   (if (<= t -2.1e+113)
     t_2
     (if (<= t -1.66e-116)
       t_1
       (if (<= t 9e-64)
         (- x (/ (* (- y x) (- z t)) (- t a)))
         (if (<= t 1.5e+68) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((z - t) * ((y - x) / (a - t)));
	double t_2 = y + ((z - a) * ((x - y) / t));
	double tmp;
	if (t <= -2.1e+113) {
		tmp = t_2;
	} else if (t <= -1.66e-116) {
		tmp = t_1;
	} else if (t <= 9e-64) {
		tmp = x - (((y - x) * (z - t)) / (t - a));
	} else if (t <= 1.5e+68) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = x + ((z - t) * ((y - x) / (a - t)))
    t_2 = y + ((z - a) * ((x - y) / t))
    if (t <= (-2.1d+113)) then
        tmp = t_2
    else if (t <= (-1.66d-116)) then
        tmp = t_1
    else if (t <= 9d-64) then
        tmp = x - (((y - x) * (z - t)) / (t - a))
    else if (t <= 1.5d+68) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((z - t) * ((y - x) / (a - t)));
	double t_2 = y + ((z - a) * ((x - y) / t));
	double tmp;
	if (t <= -2.1e+113) {
		tmp = t_2;
	} else if (t <= -1.66e-116) {
		tmp = t_1;
	} else if (t <= 9e-64) {
		tmp = x - (((y - x) * (z - t)) / (t - a));
	} else if (t <= 1.5e+68) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((z - t) * ((y - x) / (a - t)))
	t_2 = y + ((z - a) * ((x - y) / t))
	tmp = 0
	if t <= -2.1e+113:
		tmp = t_2
	elif t <= -1.66e-116:
		tmp = t_1
	elif t <= 9e-64:
		tmp = x - (((y - x) * (z - t)) / (t - a))
	elif t <= 1.5e+68:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) / Float64(a - t))))
	t_2 = Float64(y + Float64(Float64(z - a) * Float64(Float64(x - y) / t)))
	tmp = 0.0
	if (t <= -2.1e+113)
		tmp = t_2;
	elseif (t <= -1.66e-116)
		tmp = t_1;
	elseif (t <= 9e-64)
		tmp = Float64(x - Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(t - a)));
	elseif (t <= 1.5e+68)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((z - t) * ((y - x) / (a - t)));
	t_2 = y + ((z - a) * ((x - y) / t));
	tmp = 0.0;
	if (t <= -2.1e+113)
		tmp = t_2;
	elseif (t <= -1.66e-116)
		tmp = t_1;
	elseif (t <= 9e-64)
		tmp = x - (((y - x) * (z - t)) / (t - a));
	elseif (t <= 1.5e+68)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(N[(z - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+113], t$95$2, If[LessEqual[t, -1.66e-116], t$95$1, If[LessEqual[t, 9e-64], N[(x - N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e+68], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.66 \cdot 10^{-116}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.5 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.0999999999999999e113 or 1.5000000000000001e68 < t

    1. Initial program 28.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0999999999999999e113 < t < -1.65999999999999988e-116 or 9.00000000000000019e-64 < t < 1.5000000000000001e68

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.65999999999999988e-116 < t < 9.00000000000000019e-64

    1. Initial program 96.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
  3. Recombined 3 regimes into one program.
  4. Final simplification91.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+113}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -1.66 \cdot 10^{-116}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-64}:\\ \;\;\;\;x - \frac{\left(y - x\right) \cdot \left(z - t\right)}{t - a}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+68}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 90.0% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 69.3%

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

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

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

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

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

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

    1. Initial program 3.3%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num3.3%

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-13.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - x \cdot \color{blue}{\frac{z - a}{-t}} \]
    14. Simplified99.8%

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

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

Alternative 3: 62.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - z\right) \cdot \frac{y}{t - a}\\ t_2 := y + x \cdot \frac{z}{t}\\ \mathbf{if}\;t \leq -8.5 \cdot 10^{+111}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{+29}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{+23}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -6.8 \cdot 10^{-49}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-161}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-106}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+102}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- t z) (/ y (- t a)))) (t_2 (+ y (* x (/ z t)))))
   (if (<= t -8.5e+111)
     t_2
     (if (<= t -8.2e+29)
       (- x (* y (/ (- t z) a)))
       (if (<= t -4.1e+23)
         (* x (/ (- z a) t))
         (if (<= t -6.8e-49)
           (+ x (* z (/ (- y x) a)))
           (if (<= t -1.8e-98)
             t_1
             (if (<= t -1.1e-161)
               (* z (/ (- y x) (- a t)))
               (if (<= t 2.8e-106)
                 (+ x (/ (* (- y x) z) a))
                 (if (<= t 1.7e+102) t_1 t_2))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (t - z) * (y / (t - a));
	double t_2 = y + (x * (z / t));
	double tmp;
	if (t <= -8.5e+111) {
		tmp = t_2;
	} else if (t <= -8.2e+29) {
		tmp = x - (y * ((t - z) / a));
	} else if (t <= -4.1e+23) {
		tmp = x * ((z - a) / t);
	} else if (t <= -6.8e-49) {
		tmp = x + (z * ((y - x) / a));
	} else if (t <= -1.8e-98) {
		tmp = t_1;
	} else if (t <= -1.1e-161) {
		tmp = z * ((y - x) / (a - t));
	} else if (t <= 2.8e-106) {
		tmp = x + (((y - x) * z) / a);
	} else if (t <= 1.7e+102) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = (t - z) * (y / (t - a))
    t_2 = y + (x * (z / t))
    if (t <= (-8.5d+111)) then
        tmp = t_2
    else if (t <= (-8.2d+29)) then
        tmp = x - (y * ((t - z) / a))
    else if (t <= (-4.1d+23)) then
        tmp = x * ((z - a) / t)
    else if (t <= (-6.8d-49)) then
        tmp = x + (z * ((y - x) / a))
    else if (t <= (-1.8d-98)) then
        tmp = t_1
    else if (t <= (-1.1d-161)) then
        tmp = z * ((y - x) / (a - t))
    else if (t <= 2.8d-106) then
        tmp = x + (((y - x) * z) / a)
    else if (t <= 1.7d+102) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (t - z) * (y / (t - a));
	double t_2 = y + (x * (z / t));
	double tmp;
	if (t <= -8.5e+111) {
		tmp = t_2;
	} else if (t <= -8.2e+29) {
		tmp = x - (y * ((t - z) / a));
	} else if (t <= -4.1e+23) {
		tmp = x * ((z - a) / t);
	} else if (t <= -6.8e-49) {
		tmp = x + (z * ((y - x) / a));
	} else if (t <= -1.8e-98) {
		tmp = t_1;
	} else if (t <= -1.1e-161) {
		tmp = z * ((y - x) / (a - t));
	} else if (t <= 2.8e-106) {
		tmp = x + (((y - x) * z) / a);
	} else if (t <= 1.7e+102) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (t - z) * (y / (t - a))
	t_2 = y + (x * (z / t))
	tmp = 0
	if t <= -8.5e+111:
		tmp = t_2
	elif t <= -8.2e+29:
		tmp = x - (y * ((t - z) / a))
	elif t <= -4.1e+23:
		tmp = x * ((z - a) / t)
	elif t <= -6.8e-49:
		tmp = x + (z * ((y - x) / a))
	elif t <= -1.8e-98:
		tmp = t_1
	elif t <= -1.1e-161:
		tmp = z * ((y - x) / (a - t))
	elif t <= 2.8e-106:
		tmp = x + (((y - x) * z) / a)
	elif t <= 1.7e+102:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(t - z) * Float64(y / Float64(t - a)))
	t_2 = Float64(y + Float64(x * Float64(z / t)))
	tmp = 0.0
	if (t <= -8.5e+111)
		tmp = t_2;
	elseif (t <= -8.2e+29)
		tmp = Float64(x - Float64(y * Float64(Float64(t - z) / a)));
	elseif (t <= -4.1e+23)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (t <= -6.8e-49)
		tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a)));
	elseif (t <= -1.8e-98)
		tmp = t_1;
	elseif (t <= -1.1e-161)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	elseif (t <= 2.8e-106)
		tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / a));
	elseif (t <= 1.7e+102)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (t - z) * (y / (t - a));
	t_2 = y + (x * (z / t));
	tmp = 0.0;
	if (t <= -8.5e+111)
		tmp = t_2;
	elseif (t <= -8.2e+29)
		tmp = x - (y * ((t - z) / a));
	elseif (t <= -4.1e+23)
		tmp = x * ((z - a) / t);
	elseif (t <= -6.8e-49)
		tmp = x + (z * ((y - x) / a));
	elseif (t <= -1.8e-98)
		tmp = t_1;
	elseif (t <= -1.1e-161)
		tmp = z * ((y - x) / (a - t));
	elseif (t <= 2.8e-106)
		tmp = x + (((y - x) * z) / a);
	elseif (t <= 1.7e+102)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - z), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e+111], t$95$2, If[LessEqual[t, -8.2e+29], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.1e+23], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.8e-49], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.8e-98], t$95$1, If[LessEqual[t, -1.1e-161], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-106], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e+102], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;t \leq -1.8 \cdot 10^{-98}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;t \leq 1.7 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if t < -8.49999999999999983e111 or 1.7e102 < t

    1. Initial program 27.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num66.3%

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-166.3%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 66.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}} \]
    10. Step-by-step derivation
      1. associate--l+66.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/66.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/66.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-neg66.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-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--66.0%

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

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

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

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

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

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

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

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

      \[\leadsto y - \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    16. Step-by-step derivation
      1. mul-1-neg64.8%

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

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

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

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

        \[\leadsto y - x \cdot \color{blue}{\frac{-1 \cdot z}{t}} \]
      6. neg-mul-176.3%

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

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

    if -8.49999999999999983e111 < t < -8.2000000000000007e29

    1. Initial program 74.8%

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

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

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

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

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

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

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

    if -8.2000000000000007e29 < t < -4.09999999999999996e23

    1. Initial program 51.3%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num51.3%

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-151.3%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 75.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}} \]
    10. Step-by-step derivation
      1. associate--l+75.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/75.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/75.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-neg75.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-sub75.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-neg75.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--75.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/75.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    14. Simplified100.0%

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

    if -4.09999999999999996e23 < t < -6.8000000000000001e-49

    1. Initial program 81.0%

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

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

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

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

    if -6.8000000000000001e-49 < t < -1.8000000000000001e-98 or 2.79999999999999988e-106 < t < 1.7e102

    1. Initial program 79.1%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num91.0%

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-191.0%

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

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

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

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

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

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

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

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

    if -1.8000000000000001e-98 < t < -1.10000000000000001e-161

    1. Initial program 92.4%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num85.2%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr85.2%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-185.2%

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
    11. Simplified77.3%

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

    if -1.10000000000000001e-161 < t < 2.79999999999999988e-106

    1. Initial program 95.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.5 \cdot 10^{+111}:\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{+29}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{+23}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -6.8 \cdot 10^{-49}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-98}:\\ \;\;\;\;\left(t - z\right) \cdot \frac{y}{t - a}\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-161}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-106}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+102}:\\ \;\;\;\;\left(t - z\right) \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 90.0% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 69.3%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.3%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num3.3%

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-13.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - x \cdot \color{blue}{\frac{z - a}{-t}} \]
    14. Simplified99.8%

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

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

Alternative 5: 46.4% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t \leq -8.4 \cdot 10^{-49}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.2 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 6.6 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.30000000000000002e111 or 3e115 < t

    1. Initial program 29.6%

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

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

    if -2.30000000000000002e111 < t < -8.3999999999999995e-49 or -8.99999999999999994e-98 < t < 2.19999999999999994e-106 or 3.20000000000000023e-16 < t < 6.6e62

    1. Initial program 86.6%

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

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

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

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

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

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

    if -8.3999999999999995e-49 < t < -8.99999999999999994e-98

    1. Initial program 93.2%

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

        \[\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. Step-by-step derivation
      1. clear-num93.2%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr93.2%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-193.2%

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

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

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

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

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

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

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

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

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

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

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

    if 2.19999999999999994e-106 < t < 3.20000000000000023e-16

    1. Initial program 85.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.8%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr99.8%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-199.8%

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

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

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

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

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

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

    if 6.6e62 < t < 3e115

    1. Initial program 30.9%

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

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

        \[\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. Step-by-step derivation
      1. clear-num61.2%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr61.2%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-161.2%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 56.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}} \]
    10. Step-by-step derivation
      1. associate--l+56.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/56.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/56.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-neg56.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-sub56.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-neg56.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--56.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/56.8%

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

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

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

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

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

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

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

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

Alternative 6: 46.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{a - t}\\ t_2 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;t \leq -2.8 \cdot 10^{+111}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-49}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-79}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-107}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+66}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+115}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ z (- a t)))) (t_2 (* x (- 1.0 (/ z a)))))
   (if (<= t -2.8e+111)
     y
     (if (<= t -8.5e-49)
       t_2
       (if (<= t -5.5e-79)
         t_1
         (if (<= t 1.25e-107)
           t_2
           (if (<= t 8e-12)
             t_1
             (if (<= t 3.2e+66)
               t_2
               (if (<= t 3.6e+115) (* x (/ (- z a) t)) y)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / (a - t));
	double t_2 = x * (1.0 - (z / a));
	double tmp;
	if (t <= -2.8e+111) {
		tmp = y;
	} else if (t <= -8.5e-49) {
		tmp = t_2;
	} else if (t <= -5.5e-79) {
		tmp = t_1;
	} else if (t <= 1.25e-107) {
		tmp = t_2;
	} else if (t <= 8e-12) {
		tmp = t_1;
	} else if (t <= 3.2e+66) {
		tmp = t_2;
	} else if (t <= 3.6e+115) {
		tmp = x * ((z - a) / t);
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * (z / (a - t))
    t_2 = x * (1.0d0 - (z / a))
    if (t <= (-2.8d+111)) then
        tmp = y
    else if (t <= (-8.5d-49)) then
        tmp = t_2
    else if (t <= (-5.5d-79)) then
        tmp = t_1
    else if (t <= 1.25d-107) then
        tmp = t_2
    else if (t <= 8d-12) then
        tmp = t_1
    else if (t <= 3.2d+66) then
        tmp = t_2
    else if (t <= 3.6d+115) then
        tmp = x * ((z - a) / t)
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / (a - t));
	double t_2 = x * (1.0 - (z / a));
	double tmp;
	if (t <= -2.8e+111) {
		tmp = y;
	} else if (t <= -8.5e-49) {
		tmp = t_2;
	} else if (t <= -5.5e-79) {
		tmp = t_1;
	} else if (t <= 1.25e-107) {
		tmp = t_2;
	} else if (t <= 8e-12) {
		tmp = t_1;
	} else if (t <= 3.2e+66) {
		tmp = t_2;
	} else if (t <= 3.6e+115) {
		tmp = x * ((z - a) / t);
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z / (a - t))
	t_2 = x * (1.0 - (z / a))
	tmp = 0
	if t <= -2.8e+111:
		tmp = y
	elif t <= -8.5e-49:
		tmp = t_2
	elif t <= -5.5e-79:
		tmp = t_1
	elif t <= 1.25e-107:
		tmp = t_2
	elif t <= 8e-12:
		tmp = t_1
	elif t <= 3.2e+66:
		tmp = t_2
	elif t <= 3.6e+115:
		tmp = x * ((z - a) / t)
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z / Float64(a - t)))
	t_2 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (t <= -2.8e+111)
		tmp = y;
	elseif (t <= -8.5e-49)
		tmp = t_2;
	elseif (t <= -5.5e-79)
		tmp = t_1;
	elseif (t <= 1.25e-107)
		tmp = t_2;
	elseif (t <= 8e-12)
		tmp = t_1;
	elseif (t <= 3.2e+66)
		tmp = t_2;
	elseif (t <= 3.6e+115)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z / (a - t));
	t_2 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (t <= -2.8e+111)
		tmp = y;
	elseif (t <= -8.5e-49)
		tmp = t_2;
	elseif (t <= -5.5e-79)
		tmp = t_1;
	elseif (t <= 1.25e-107)
		tmp = t_2;
	elseif (t <= 8e-12)
		tmp = t_1;
	elseif (t <= 3.2e+66)
		tmp = t_2;
	elseif (t <= 3.6e+115)
		tmp = x * ((z - a) / t);
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+111], y, If[LessEqual[t, -8.5e-49], t$95$2, If[LessEqual[t, -5.5e-79], t$95$1, If[LessEqual[t, 1.25e-107], t$95$2, If[LessEqual[t, 8e-12], t$95$1, If[LessEqual[t, 3.2e+66], t$95$2, If[LessEqual[t, 3.6e+115], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], y]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -8.5 \cdot 10^{-49}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -5.5 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.25 \cdot 10^{-107}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 8 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{+66}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.7999999999999999e111 or 3.6000000000000001e115 < t

    1. Initial program 29.6%

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

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

    if -2.7999999999999999e111 < t < -8.50000000000000069e-49 or -5.4999999999999997e-79 < t < 1.24999999999999993e-107 or 7.99999999999999984e-12 < t < 3.2e66

    1. Initial program 87.0%

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

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

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

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

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

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

    if -8.50000000000000069e-49 < t < -5.4999999999999997e-79 or 1.24999999999999993e-107 < t < 7.99999999999999984e-12

    1. Initial program 87.2%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.5%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr96.5%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-196.5%

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

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

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

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

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

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

    if 3.2e66 < t < 3.6000000000000001e115

    1. Initial program 30.9%

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

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

        \[\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. Step-by-step derivation
      1. clear-num61.2%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr61.2%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-161.2%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 56.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}} \]
    10. Step-by-step derivation
      1. associate--l+56.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/56.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/56.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-neg56.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-sub56.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-neg56.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--56.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/56.8%

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

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

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

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

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

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

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

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

Alternative 7: 65.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - x}{\frac{a}{z}}\\ t_2 := y + x \cdot \frac{z}{t}\\ \mathbf{if}\;t \leq -2.25 \cdot 10^{+111}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.16 \cdot 10^{+29}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{+23}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -9.2 \cdot 10^{-49}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-79}:\\ \;\;\;\;\left(t - z\right) \cdot \frac{y}{t - a}\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+62}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (- y x) (/ a z)))) (t_2 (+ y (* x (/ z t)))))
   (if (<= t -2.25e+111)
     t_2
     (if (<= t -1.16e+29)
       (- x (* y (/ (- t z) a)))
       (if (<= t -4.1e+23)
         (* x (/ (- z a) t))
         (if (<= t -9.2e-49)
           t_1
           (if (<= t -4.5e-79)
             (* (- t z) (/ y (- t a)))
             (if (<= t 1.45e+62) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - x) / (a / z));
	double t_2 = y + (x * (z / t));
	double tmp;
	if (t <= -2.25e+111) {
		tmp = t_2;
	} else if (t <= -1.16e+29) {
		tmp = x - (y * ((t - z) / a));
	} else if (t <= -4.1e+23) {
		tmp = x * ((z - a) / t);
	} else if (t <= -9.2e-49) {
		tmp = t_1;
	} else if (t <= -4.5e-79) {
		tmp = (t - z) * (y / (t - a));
	} else if (t <= 1.45e+62) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = x + ((y - x) / (a / z))
    t_2 = y + (x * (z / t))
    if (t <= (-2.25d+111)) then
        tmp = t_2
    else if (t <= (-1.16d+29)) then
        tmp = x - (y * ((t - z) / a))
    else if (t <= (-4.1d+23)) then
        tmp = x * ((z - a) / t)
    else if (t <= (-9.2d-49)) then
        tmp = t_1
    else if (t <= (-4.5d-79)) then
        tmp = (t - z) * (y / (t - a))
    else if (t <= 1.45d+62) then
        tmp = t_1
    else
        tmp = t_2
    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) / (a / z));
	double t_2 = y + (x * (z / t));
	double tmp;
	if (t <= -2.25e+111) {
		tmp = t_2;
	} else if (t <= -1.16e+29) {
		tmp = x - (y * ((t - z) / a));
	} else if (t <= -4.1e+23) {
		tmp = x * ((z - a) / t);
	} else if (t <= -9.2e-49) {
		tmp = t_1;
	} else if (t <= -4.5e-79) {
		tmp = (t - z) * (y / (t - a));
	} else if (t <= 1.45e+62) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - x) / (a / z))
	t_2 = y + (x * (z / t))
	tmp = 0
	if t <= -2.25e+111:
		tmp = t_2
	elif t <= -1.16e+29:
		tmp = x - (y * ((t - z) / a))
	elif t <= -4.1e+23:
		tmp = x * ((z - a) / t)
	elif t <= -9.2e-49:
		tmp = t_1
	elif t <= -4.5e-79:
		tmp = (t - z) * (y / (t - a))
	elif t <= 1.45e+62:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - x) / Float64(a / z)))
	t_2 = Float64(y + Float64(x * Float64(z / t)))
	tmp = 0.0
	if (t <= -2.25e+111)
		tmp = t_2;
	elseif (t <= -1.16e+29)
		tmp = Float64(x - Float64(y * Float64(Float64(t - z) / a)));
	elseif (t <= -4.1e+23)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (t <= -9.2e-49)
		tmp = t_1;
	elseif (t <= -4.5e-79)
		tmp = Float64(Float64(t - z) * Float64(y / Float64(t - a)));
	elseif (t <= 1.45e+62)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - x) / (a / z));
	t_2 = y + (x * (z / t));
	tmp = 0.0;
	if (t <= -2.25e+111)
		tmp = t_2;
	elseif (t <= -1.16e+29)
		tmp = x - (y * ((t - z) / a));
	elseif (t <= -4.1e+23)
		tmp = x * ((z - a) / t);
	elseif (t <= -9.2e-49)
		tmp = t_1;
	elseif (t <= -4.5e-79)
		tmp = (t - z) * (y / (t - a));
	elseif (t <= 1.45e+62)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.25e+111], t$95$2, If[LessEqual[t, -1.16e+29], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.1e+23], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.2e-49], t$95$1, If[LessEqual[t, -4.5e-79], N[(N[(t - z), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+62], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y - x}{\frac{a}{z}}\\
t_2 := y + x \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -2.25 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;t \leq -9.2 \cdot 10^{-49}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.45 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.25e111 or 1.44999999999999992e62 < 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*66.7%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num66.7%

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-166.7%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 65.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}} \]
    10. Step-by-step derivation
      1. associate--l+65.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/65.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/65.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-neg65.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-sub65.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-neg65.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--65.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/65.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    16. Step-by-step derivation
      1. mul-1-neg62.4%

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

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

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

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

        \[\leadsto y - x \cdot \color{blue}{\frac{-1 \cdot z}{t}} \]
      6. neg-mul-174.0%

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

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

    if -2.25e111 < t < -1.16e29

    1. Initial program 74.8%

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

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

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

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

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

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

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

    if -1.16e29 < t < -4.09999999999999996e23

    1. Initial program 51.3%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num51.3%

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-151.3%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 75.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}} \]
    10. Step-by-step derivation
      1. associate--l+75.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/75.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/75.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-neg75.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-sub75.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-neg75.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--75.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/75.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    14. Simplified100.0%

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

    if -4.09999999999999996e23 < t < -9.1999999999999996e-49 or -4.5000000000000003e-79 < t < 1.44999999999999992e62

    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. div-inv88.7%

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

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

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

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

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

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

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

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

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

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

    if -9.1999999999999996e-49 < t < -4.5000000000000003e-79

    1. Initial program 91.5%

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

        \[\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. Step-by-step derivation
      1. clear-num91.6%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr91.6%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-191.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
      4. *-commutative86.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.25 \cdot 10^{+111}:\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -1.16 \cdot 10^{+29}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{+23}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -9.2 \cdot 10^{-49}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-79}:\\ \;\;\;\;\left(t - z\right) \cdot \frac{y}{t - a}\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+62}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 84.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ t_2 := y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{if}\;t \leq -1.4 \cdot 10^{+113}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+68}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+117}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+173}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+240}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- z t) (/ (- y x) (- a t)))))
        (t_2 (+ y (* (- z a) (/ (- x y) t)))))
   (if (<= t -1.4e+113)
     t_2
     (if (<= t 1.55e+68)
       t_1
       (if (<= t 1.7e+117)
         t_2
         (if (<= t 1.9e+173)
           t_1
           (if (<= t 9e+240) (+ y (/ (* (- y x) (- a z)) t)) t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((z - t) * ((y - x) / (a - t)));
	double t_2 = y + ((z - a) * ((x - y) / t));
	double tmp;
	if (t <= -1.4e+113) {
		tmp = t_2;
	} else if (t <= 1.55e+68) {
		tmp = t_1;
	} else if (t <= 1.7e+117) {
		tmp = t_2;
	} else if (t <= 1.9e+173) {
		tmp = t_1;
	} else if (t <= 9e+240) {
		tmp = y + (((y - x) * (a - z)) / t);
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = x + ((z - t) * ((y - x) / (a - t)))
    t_2 = y + ((z - a) * ((x - y) / t))
    if (t <= (-1.4d+113)) then
        tmp = t_2
    else if (t <= 1.55d+68) then
        tmp = t_1
    else if (t <= 1.7d+117) then
        tmp = t_2
    else if (t <= 1.9d+173) then
        tmp = t_1
    else if (t <= 9d+240) then
        tmp = y + (((y - x) * (a - z)) / t)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((z - t) * ((y - x) / (a - t)));
	double t_2 = y + ((z - a) * ((x - y) / t));
	double tmp;
	if (t <= -1.4e+113) {
		tmp = t_2;
	} else if (t <= 1.55e+68) {
		tmp = t_1;
	} else if (t <= 1.7e+117) {
		tmp = t_2;
	} else if (t <= 1.9e+173) {
		tmp = t_1;
	} else if (t <= 9e+240) {
		tmp = y + (((y - x) * (a - z)) / t);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((z - t) * ((y - x) / (a - t)))
	t_2 = y + ((z - a) * ((x - y) / t))
	tmp = 0
	if t <= -1.4e+113:
		tmp = t_2
	elif t <= 1.55e+68:
		tmp = t_1
	elif t <= 1.7e+117:
		tmp = t_2
	elif t <= 1.9e+173:
		tmp = t_1
	elif t <= 9e+240:
		tmp = y + (((y - x) * (a - z)) / t)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) / Float64(a - t))))
	t_2 = Float64(y + Float64(Float64(z - a) * Float64(Float64(x - y) / t)))
	tmp = 0.0
	if (t <= -1.4e+113)
		tmp = t_2;
	elseif (t <= 1.55e+68)
		tmp = t_1;
	elseif (t <= 1.7e+117)
		tmp = t_2;
	elseif (t <= 1.9e+173)
		tmp = t_1;
	elseif (t <= 9e+240)
		tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((z - t) * ((y - x) / (a - t)));
	t_2 = y + ((z - a) * ((x - y) / t));
	tmp = 0.0;
	if (t <= -1.4e+113)
		tmp = t_2;
	elseif (t <= 1.55e+68)
		tmp = t_1;
	elseif (t <= 1.7e+117)
		tmp = t_2;
	elseif (t <= 1.9e+173)
		tmp = t_1;
	elseif (t <= 9e+240)
		tmp = y + (((y - x) * (a - z)) / t);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(N[(z - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.4e+113], t$95$2, If[LessEqual[t, 1.55e+68], t$95$1, If[LessEqual[t, 1.7e+117], t$95$2, If[LessEqual[t, 1.9e+173], t$95$1, If[LessEqual[t, 9e+240], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 1.55 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.7 \cdot 10^{+117}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+173}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.39999999999999999e113 or 1.5499999999999999e68 < t < 1.7e117 or 8.99999999999999957e240 < t

    1. Initial program 22.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.39999999999999999e113 < t < 1.5499999999999999e68 or 1.7e117 < t < 1.90000000000000005e173

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.90000000000000005e173 < t < 8.99999999999999957e240

    1. Initial program 47.1%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num56.0%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr56.0%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-156.0%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 92.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}} \]
    10. Step-by-step derivation
      1. associate--l+92.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/92.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/92.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-neg92.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-sub92.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-neg92.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--92.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/92.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{+113}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+68}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+117}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+173}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+240}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 59.0% accurate, 0.4× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4.3e14 or 1.5e59 < t

    1. Initial program 37.1%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num70.4%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr70.4%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-170.4%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 61.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}} \]
    10. Step-by-step derivation
      1. associate--l+61.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/61.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/61.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-neg61.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-sub61.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-neg61.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--61.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/61.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    16. Step-by-step derivation
      1. mul-1-neg57.0%

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

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

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

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

        \[\leadsto y - x \cdot \color{blue}{\frac{-1 \cdot z}{t}} \]
      6. neg-mul-167.0%

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

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

    if -4.3e14 < t < -1.69999999999999991e-190

    1. Initial program 88.4%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num90.5%

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-190.5%

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

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

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

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

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

    if -1.69999999999999991e-190 < t < -3.39999999999999979e-227

    1. Initial program 99.5%

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

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

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

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

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

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

    if -3.39999999999999979e-227 < t < -6.49999999999999942e-250

    1. Initial program 100.0%

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

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

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

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

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

    if -6.49999999999999942e-250 < t < 1.5e59

    1. Initial program 87.5%

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

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

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

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

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    7. Step-by-step derivation
      1. clear-num66.3%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      2. un-div-inv66.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.3 \cdot 10^{+14}:\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-190}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-227}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-250}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+59}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 54.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y - x \cdot \frac{a}{t}\\ t_2 := z \cdot \frac{x - y}{t}\\ \mathbf{if}\;t \leq -2.25 \cdot 10^{+111}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{-107}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -3.9 \cdot 10^{-180}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 5.3 \cdot 10^{+56}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 10^{+105}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- y (* x (/ a t)))) (t_2 (* z (/ (- x y) t))))
   (if (<= t -2.25e+111)
     t_1
     (if (<= t -1.15e-107)
       (+ x (* y (/ z a)))
       (if (<= t -3.9e-180)
         t_2
         (if (<= t 5.3e+56)
           (+ x (/ y (/ a z)))
           (if (<= t 1e+105) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y - (x * (a / t));
	double t_2 = z * ((x - y) / t);
	double tmp;
	if (t <= -2.25e+111) {
		tmp = t_1;
	} else if (t <= -1.15e-107) {
		tmp = x + (y * (z / a));
	} else if (t <= -3.9e-180) {
		tmp = t_2;
	} else if (t <= 5.3e+56) {
		tmp = x + (y / (a / z));
	} else if (t <= 1e+105) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = y - (x * (a / t))
    t_2 = z * ((x - y) / t)
    if (t <= (-2.25d+111)) then
        tmp = t_1
    else if (t <= (-1.15d-107)) then
        tmp = x + (y * (z / a))
    else if (t <= (-3.9d-180)) then
        tmp = t_2
    else if (t <= 5.3d+56) then
        tmp = x + (y / (a / z))
    else if (t <= 1d+105) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y - (x * (a / t));
	double t_2 = z * ((x - y) / t);
	double tmp;
	if (t <= -2.25e+111) {
		tmp = t_1;
	} else if (t <= -1.15e-107) {
		tmp = x + (y * (z / a));
	} else if (t <= -3.9e-180) {
		tmp = t_2;
	} else if (t <= 5.3e+56) {
		tmp = x + (y / (a / z));
	} else if (t <= 1e+105) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y - (x * (a / t))
	t_2 = z * ((x - y) / t)
	tmp = 0
	if t <= -2.25e+111:
		tmp = t_1
	elif t <= -1.15e-107:
		tmp = x + (y * (z / a))
	elif t <= -3.9e-180:
		tmp = t_2
	elif t <= 5.3e+56:
		tmp = x + (y / (a / z))
	elif t <= 1e+105:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y - Float64(x * Float64(a / t)))
	t_2 = Float64(z * Float64(Float64(x - y) / t))
	tmp = 0.0
	if (t <= -2.25e+111)
		tmp = t_1;
	elseif (t <= -1.15e-107)
		tmp = Float64(x + Float64(y * Float64(z / a)));
	elseif (t <= -3.9e-180)
		tmp = t_2;
	elseif (t <= 5.3e+56)
		tmp = Float64(x + Float64(y / Float64(a / z)));
	elseif (t <= 1e+105)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y - (x * (a / t));
	t_2 = z * ((x - y) / t);
	tmp = 0.0;
	if (t <= -2.25e+111)
		tmp = t_1;
	elseif (t <= -1.15e-107)
		tmp = x + (y * (z / a));
	elseif (t <= -3.9e-180)
		tmp = t_2;
	elseif (t <= 5.3e+56)
		tmp = x + (y / (a / z));
	elseif (t <= 1e+105)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(x * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.25e+111], t$95$1, If[LessEqual[t, -1.15e-107], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.9e-180], t$95$2, If[LessEqual[t, 5.3e+56], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e+105], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -3.9 \cdot 10^{-180}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 10^{+105}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.25e111 or 9.9999999999999994e104 < t

    1. Initial program 28.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num65.6%

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-165.6%

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

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

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

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

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

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

        \[\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-sub67.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-neg67.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--67.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/67.2%

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

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

        \[\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} \]
    11. Simplified67.3%

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

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

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

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

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

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

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

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

    if -2.25e111 < t < -1.15000000000000002e-107

    1. Initial program 79.8%

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

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

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

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

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

    if -1.15000000000000002e-107 < t < -3.9000000000000003e-180 or 5.3000000000000002e56 < t < 9.9999999999999994e104

    1. Initial program 74.3%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num82.3%

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-182.3%

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{-t}} \]
    12. Simplified67.4%

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

    if -3.9000000000000003e-180 < t < 5.3000000000000002e56

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.25 \cdot 10^{+111}:\\ \;\;\;\;y - x \cdot \frac{a}{t}\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{-107}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -3.9 \cdot 10^{-180}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 5.3 \cdot 10^{+56}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 10^{+105}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;y - x \cdot \frac{a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 81.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -5.2 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 7.7 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.1999999999999999e111 or 7.6999999999999999e56 < t

    1. Initial program 29.6%

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999999e111 < t < -5.1999999999999998e38 or 6.99999999999999999e-128 < t < 7.6999999999999999e56

    1. Initial program 81.3%

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

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

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

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

    if -5.1999999999999998e38 < t < 6.99999999999999999e-128

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+111}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{+38}:\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-128}:\\ \;\;\;\;x - \frac{y - x}{\frac{t - a}{z}}\\ \mathbf{elif}\;t \leq 7.7 \cdot 10^{+56}:\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 78.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{z - t}{t - a}\\ t_2 := y + x \cdot \frac{z - a}{t}\\ \mathbf{if}\;t \leq -3.4 \cdot 10^{+112}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{+35}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{-128}:\\ \;\;\;\;x - \frac{y - x}{\frac{t - a}{z}}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+67}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y (/ (- z t) (- t a))))) (t_2 (+ y (* x (/ (- z a) t)))))
   (if (<= t -3.4e+112)
     t_2
     (if (<= t -5.4e+35)
       t_1
       (if (<= t 6.6e-128)
         (- x (/ (- y x) (/ (- t a) z)))
         (if (<= t 2.8e+67) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * ((z - t) / (t - a)));
	double t_2 = y + (x * ((z - a) / t));
	double tmp;
	if (t <= -3.4e+112) {
		tmp = t_2;
	} else if (t <= -5.4e+35) {
		tmp = t_1;
	} else if (t <= 6.6e-128) {
		tmp = x - ((y - x) / ((t - a) / z));
	} else if (t <= 2.8e+67) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = x - (y * ((z - t) / (t - a)))
    t_2 = y + (x * ((z - a) / t))
    if (t <= (-3.4d+112)) then
        tmp = t_2
    else if (t <= (-5.4d+35)) then
        tmp = t_1
    else if (t <= 6.6d-128) then
        tmp = x - ((y - x) / ((t - a) / z))
    else if (t <= 2.8d+67) then
        tmp = t_1
    else
        tmp = t_2
    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) / (t - a)));
	double t_2 = y + (x * ((z - a) / t));
	double tmp;
	if (t <= -3.4e+112) {
		tmp = t_2;
	} else if (t <= -5.4e+35) {
		tmp = t_1;
	} else if (t <= 6.6e-128) {
		tmp = x - ((y - x) / ((t - a) / z));
	} else if (t <= 2.8e+67) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * ((z - t) / (t - a)))
	t_2 = y + (x * ((z - a) / t))
	tmp = 0
	if t <= -3.4e+112:
		tmp = t_2
	elif t <= -5.4e+35:
		tmp = t_1
	elif t <= 6.6e-128:
		tmp = x - ((y - x) / ((t - a) / z))
	elif t <= 2.8e+67:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y * Float64(Float64(z - t) / Float64(t - a))))
	t_2 = Float64(y + Float64(x * Float64(Float64(z - a) / t)))
	tmp = 0.0
	if (t <= -3.4e+112)
		tmp = t_2;
	elseif (t <= -5.4e+35)
		tmp = t_1;
	elseif (t <= 6.6e-128)
		tmp = Float64(x - Float64(Float64(y - x) / Float64(Float64(t - a) / z)));
	elseif (t <= 2.8e+67)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y * ((z - t) / (t - a)));
	t_2 = y + (x * ((z - a) / t));
	tmp = 0.0;
	if (t <= -3.4e+112)
		tmp = t_2;
	elseif (t <= -5.4e+35)
		tmp = t_1;
	elseif (t <= 6.6e-128)
		tmp = x - ((y - x) / ((t - a) / z));
	elseif (t <= 2.8e+67)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e+112], t$95$2, If[LessEqual[t, -5.4e+35], t$95$1, If[LessEqual[t, 6.6e-128], N[(x - N[(N[(y - x), $MachinePrecision] / N[(N[(t - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+67], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - y \cdot \frac{z - t}{t - a}\\
t_2 := y + x \cdot \frac{z - a}{t}\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+112}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -5.4 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.8 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.39999999999999993e112 or 2.7999999999999998e67 < 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*66.7%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num66.7%

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-166.7%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 65.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}} \]
    10. Step-by-step derivation
      1. associate--l+65.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/65.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/65.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-neg65.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-sub65.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-neg65.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--65.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/65.5%

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

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

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

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

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

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

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

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

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

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

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

    if -3.39999999999999993e112 < t < -5.40000000000000005e35 or 6.6e-128 < t < 2.7999999999999998e67

    1. Initial program 79.9%

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

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

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

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

    if -5.40000000000000005e35 < t < 6.6e-128

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{+112}:\\ \;\;\;\;y + x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{+35}:\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{-128}:\\ \;\;\;\;x - \frac{y - x}{\frac{t - a}{z}}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+67}:\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + x \cdot \frac{z - a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 77.1% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := x - y \cdot \frac{z - t}{t - a}\\
t_2 := y + x \cdot \frac{z - a}{t}\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{+113}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -5.8 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 8 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.39999999999999983e113 or 8.00000000000000046e63 < 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*66.7%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num66.7%

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-166.7%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 65.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}} \]
    10. Step-by-step derivation
      1. associate--l+65.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/65.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/65.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-neg65.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-sub65.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-neg65.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--65.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/65.5%

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

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

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

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

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

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

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

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

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

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

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

    if -2.39999999999999983e113 < t < -5.80000000000000004e-95 or 2.1999999999999999e-130 < t < 8.00000000000000046e63

    1. Initial program 81.3%

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

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

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

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

    if -5.80000000000000004e-95 < t < 2.1999999999999999e-130

    1. Initial program 94.4%

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

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

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

Alternative 14: 76.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{z - t}{t - a}\\ t_2 := y + x \cdot \frac{z - a}{t}\\ \mathbf{if}\;t \leq -2.6 \cdot 10^{+113}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -3.6 \cdot 10^{-99}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-132}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+65}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y (/ (- z t) (- t a))))) (t_2 (+ y (* x (/ (- z a) t)))))
   (if (<= t -2.6e+113)
     t_2
     (if (<= t -3.6e-99)
       t_1
       (if (<= t 4.3e-132)
         (+ x (/ (- y x) (/ a z)))
         (if (<= t 1.2e+65) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * ((z - t) / (t - a)));
	double t_2 = y + (x * ((z - a) / t));
	double tmp;
	if (t <= -2.6e+113) {
		tmp = t_2;
	} else if (t <= -3.6e-99) {
		tmp = t_1;
	} else if (t <= 4.3e-132) {
		tmp = x + ((y - x) / (a / z));
	} else if (t <= 1.2e+65) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = x - (y * ((z - t) / (t - a)))
    t_2 = y + (x * ((z - a) / t))
    if (t <= (-2.6d+113)) then
        tmp = t_2
    else if (t <= (-3.6d-99)) then
        tmp = t_1
    else if (t <= 4.3d-132) then
        tmp = x + ((y - x) / (a / z))
    else if (t <= 1.2d+65) then
        tmp = t_1
    else
        tmp = t_2
    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) / (t - a)));
	double t_2 = y + (x * ((z - a) / t));
	double tmp;
	if (t <= -2.6e+113) {
		tmp = t_2;
	} else if (t <= -3.6e-99) {
		tmp = t_1;
	} else if (t <= 4.3e-132) {
		tmp = x + ((y - x) / (a / z));
	} else if (t <= 1.2e+65) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * ((z - t) / (t - a)))
	t_2 = y + (x * ((z - a) / t))
	tmp = 0
	if t <= -2.6e+113:
		tmp = t_2
	elif t <= -3.6e-99:
		tmp = t_1
	elif t <= 4.3e-132:
		tmp = x + ((y - x) / (a / z))
	elif t <= 1.2e+65:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y * Float64(Float64(z - t) / Float64(t - a))))
	t_2 = Float64(y + Float64(x * Float64(Float64(z - a) / t)))
	tmp = 0.0
	if (t <= -2.6e+113)
		tmp = t_2;
	elseif (t <= -3.6e-99)
		tmp = t_1;
	elseif (t <= 4.3e-132)
		tmp = Float64(x + Float64(Float64(y - x) / Float64(a / z)));
	elseif (t <= 1.2e+65)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y * ((z - t) / (t - a)));
	t_2 = y + (x * ((z - a) / t));
	tmp = 0.0;
	if (t <= -2.6e+113)
		tmp = t_2;
	elseif (t <= -3.6e-99)
		tmp = t_1;
	elseif (t <= 4.3e-132)
		tmp = x + ((y - x) / (a / z));
	elseif (t <= 1.2e+65)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.6e+113], t$95$2, If[LessEqual[t, -3.6e-99], t$95$1, If[LessEqual[t, 4.3e-132], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e+65], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - y \cdot \frac{z - t}{t - a}\\
t_2 := y + x \cdot \frac{z - a}{t}\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{+113}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -3.6 \cdot 10^{-99}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.2 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.5999999999999999e113 or 1.2000000000000001e65 < 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*66.7%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num66.7%

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-166.7%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 65.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}} \]
    10. Step-by-step derivation
      1. associate--l+65.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/65.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/65.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-neg65.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-sub65.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-neg65.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--65.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/65.5%

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

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

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

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

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

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

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

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

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

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

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

    if -2.5999999999999999e113 < t < -3.6000000000000001e-99 or 4.2999999999999997e-132 < t < 1.2000000000000001e65

    1. Initial program 81.3%

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

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

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

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

    if -3.6000000000000001e-99 < t < 4.2999999999999997e-132

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+113}:\\ \;\;\;\;y + x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -3.6 \cdot 10^{-99}:\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-132}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+65}:\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + x \cdot \frac{z - a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 59.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z}{a}\\ \mathbf{if}\;a \leq -4.6 \cdot 10^{+142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -7.8 \cdot 10^{-72}:\\ \;\;\;\;\left(t - z\right) \cdot \frac{y}{t - a}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-172}:\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+83}:\\ \;\;\;\;z \cdot \frac{y - x}{a - 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 -4.6e+142)
     t_1
     (if (<= a -7.8e-72)
       (* (- t z) (/ y (- t a)))
       (if (<= a 2.8e-172)
         (+ y (* x (/ z t)))
         (if (<= a 1.55e+83) (* z (/ (- y x) (- a 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 <= -4.6e+142) {
		tmp = t_1;
	} else if (a <= -7.8e-72) {
		tmp = (t - z) * (y / (t - a));
	} else if (a <= 2.8e-172) {
		tmp = y + (x * (z / t));
	} else if (a <= 1.55e+83) {
		tmp = z * ((y - x) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (y * (z / a))
    if (a <= (-4.6d+142)) then
        tmp = t_1
    else if (a <= (-7.8d-72)) then
        tmp = (t - z) * (y / (t - a))
    else if (a <= 2.8d-172) then
        tmp = y + (x * (z / t))
    else if (a <= 1.55d+83) then
        tmp = z * ((y - x) / (a - t))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (z / a));
	double tmp;
	if (a <= -4.6e+142) {
		tmp = t_1;
	} else if (a <= -7.8e-72) {
		tmp = (t - z) * (y / (t - a));
	} else if (a <= 2.8e-172) {
		tmp = y + (x * (z / t));
	} else if (a <= 1.55e+83) {
		tmp = z * ((y - x) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (z / a))
	tmp = 0
	if a <= -4.6e+142:
		tmp = t_1
	elif a <= -7.8e-72:
		tmp = (t - z) * (y / (t - a))
	elif a <= 2.8e-172:
		tmp = y + (x * (z / t))
	elif a <= 1.55e+83:
		tmp = z * ((y - x) / (a - 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 <= -4.6e+142)
		tmp = t_1;
	elseif (a <= -7.8e-72)
		tmp = Float64(Float64(t - z) * Float64(y / Float64(t - a)));
	elseif (a <= 2.8e-172)
		tmp = Float64(y + Float64(x * Float64(z / t)));
	elseif (a <= 1.55e+83)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - 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 <= -4.6e+142)
		tmp = t_1;
	elseif (a <= -7.8e-72)
		tmp = (t - z) * (y / (t - a));
	elseif (a <= 2.8e-172)
		tmp = y + (x * (z / t));
	elseif (a <= 1.55e+83)
		tmp = z * ((y - x) / (a - 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, -4.6e+142], t$95$1, If[LessEqual[a, -7.8e-72], N[(N[(t - z), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8e-172], N[(y + N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e+83], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.60000000000000004e142 or 1.54999999999999996e83 < a

    1. Initial program 71.0%

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

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

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

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

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

    if -4.60000000000000004e142 < a < -7.8e-72

    1. Initial program 63.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num83.6%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr83.6%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-183.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
      4. *-commutative54.9%

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

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

    if -7.8e-72 < a < 2.80000000000000011e-172

    1. Initial program 58.2%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num77.5%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr77.5%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-177.5%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 81.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}} \]
    10. Step-by-step derivation
      1. associate--l+81.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/81.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/81.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-neg81.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-sub81.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-neg81.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--81.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/81.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto y - x \cdot \color{blue}{\frac{z - a}{-t}} \]
    14. Simplified75.3%

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

      \[\leadsto y - \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    16. Step-by-step derivation
      1. mul-1-neg65.1%

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

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

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

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

        \[\leadsto y - x \cdot \color{blue}{\frac{-1 \cdot z}{t}} \]
      6. neg-mul-173.4%

        \[\leadsto y - x \cdot \frac{\color{blue}{-z}}{t} \]
    17. Simplified73.4%

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

    if 2.80000000000000011e-172 < a < 1.54999999999999996e83

    1. Initial program 66.4%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num76.3%

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-176.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.6 \cdot 10^{+142}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -7.8 \cdot 10^{-72}:\\ \;\;\;\;\left(t - z\right) \cdot \frac{y}{t - a}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-172}:\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+83}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 57.2% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t \leq -4.5 \cdot 10^{-180}:\\
\;\;\;\;z \cdot \frac{x - y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.25e111 or 1.6999999999999999e63 < 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*66.7%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num66.7%

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-166.7%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 65.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}} \]
    10. Step-by-step derivation
      1. associate--l+65.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/65.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/65.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-neg65.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-sub65.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-neg65.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--65.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/65.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    16. Step-by-step derivation
      1. mul-1-neg62.4%

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

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

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

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

        \[\leadsto y - x \cdot \color{blue}{\frac{-1 \cdot z}{t}} \]
      6. neg-mul-174.0%

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

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

    if -2.25e111 < t < -1.12e-107

    1. Initial program 79.8%

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

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

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

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

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

    if -1.12e-107 < t < -4.50000000000000009e-180

    1. Initial program 99.3%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num83.9%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr83.9%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-183.9%

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{-t}} \]
    12. Simplified65.1%

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

    if -4.50000000000000009e-180 < t < 1.6999999999999999e63

    1. Initial program 89.0%

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

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

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

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

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    7. Step-by-step derivation
      1. clear-num64.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.25 \cdot 10^{+111}:\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -1.12 \cdot 10^{-107}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-180}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+63}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 61.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{t - z}{a}\\ \mathbf{if}\;a \leq -1.1 \cdot 10^{-66}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-172}:\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+71}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y (/ (- t z) a)))))
   (if (<= a -1.1e-66)
     t_1
     (if (<= a 1.9e-172)
       (+ y (* x (/ z t)))
       (if (<= a 2.4e+71) (* z (/ (- y x) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * ((t - z) / a));
	double tmp;
	if (a <= -1.1e-66) {
		tmp = t_1;
	} else if (a <= 1.9e-172) {
		tmp = y + (x * (z / t));
	} else if (a <= 2.4e+71) {
		tmp = z * ((y - x) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - (y * ((t - z) / a))
    if (a <= (-1.1d-66)) then
        tmp = t_1
    else if (a <= 1.9d-172) then
        tmp = y + (x * (z / t))
    else if (a <= 2.4d+71) then
        tmp = z * ((y - x) / (a - t))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * ((t - z) / a));
	double tmp;
	if (a <= -1.1e-66) {
		tmp = t_1;
	} else if (a <= 1.9e-172) {
		tmp = y + (x * (z / t));
	} else if (a <= 2.4e+71) {
		tmp = z * ((y - x) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * ((t - z) / a))
	tmp = 0
	if a <= -1.1e-66:
		tmp = t_1
	elif a <= 1.9e-172:
		tmp = y + (x * (z / t))
	elif a <= 2.4e+71:
		tmp = z * ((y - x) / (a - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y * Float64(Float64(t - z) / a)))
	tmp = 0.0
	if (a <= -1.1e-66)
		tmp = t_1;
	elseif (a <= 1.9e-172)
		tmp = Float64(y + Float64(x * Float64(z / t)));
	elseif (a <= 2.4e+71)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y * ((t - z) / a));
	tmp = 0.0;
	if (a <= -1.1e-66)
		tmp = t_1;
	elseif (a <= 1.9e-172)
		tmp = y + (x * (z / t));
	elseif (a <= 2.4e+71)
		tmp = z * ((y - x) / (a - 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[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.1e-66], t$95$1, If[LessEqual[a, 1.9e-172], N[(y + N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.4e+71], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.1000000000000001e-66 or 2.39999999999999981e71 < a

    1. Initial program 69.3%

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

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

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

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

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

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

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

    if -1.1000000000000001e-66 < a < 1.89999999999999993e-172

    1. Initial program 58.1%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num78.0%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr78.0%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-178.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - x \cdot \color{blue}{\frac{z - a}{-t}} \]
    14. Simplified74.7%

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

      \[\leadsto y - \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    16. Step-by-step derivation
      1. mul-1-neg64.8%

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

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

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

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

        \[\leadsto y - x \cdot \color{blue}{\frac{-1 \cdot z}{t}} \]
      6. neg-mul-172.9%

        \[\leadsto y - x \cdot \frac{\color{blue}{-z}}{t} \]
    17. Simplified72.9%

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

    if 1.89999999999999993e-172 < a < 2.39999999999999981e71

    1. Initial program 65.2%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num75.4%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr75.4%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-175.4%

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

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

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

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

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

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

Alternative 18: 52.5% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.99999999999999965e111 or 2.50000000000000013e116 < t

    1. Initial program 29.6%

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

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

    if -7.99999999999999965e111 < t < 2.4999999999999999e59

    1. Initial program 87.0%

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

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

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

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

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    7. Step-by-step derivation
      1. clear-num56.3%

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

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

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

    if 2.4999999999999999e59 < t < 2.50000000000000013e116

    1. Initial program 30.9%

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

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

        \[\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. Step-by-step derivation
      1. clear-num61.2%

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

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr61.2%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-161.2%

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 56.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}} \]
    10. Step-by-step derivation
      1. associate--l+56.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/56.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/56.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-neg56.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-sub56.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-neg56.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--56.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/56.8%

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

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

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

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

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

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

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

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

Alternative 19: 52.6% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.20000000000000008e111 or 1.12e116 < t

    1. Initial program 29.6%

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

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

    if -9.20000000000000008e111 < t < 7.2e66

    1. Initial program 87.0%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified56.3%

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]

    if 7.2e66 < t < 1.12e116

    1. Initial program 30.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative30.9%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-/l*61.1%

        \[\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. Step-by-step derivation
      1. clear-num61.2%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow61.2%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr61.2%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-161.2%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified61.2%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 56.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}} \]
    10. Step-by-step derivation
      1. associate--l+56.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/56.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/56.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-neg56.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-sub56.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-neg56.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--56.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/56.8%

        \[\leadsto y + \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      9. mul-1-neg56.8%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      10. unsub-neg56.8%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      11. distribute-rgt-out--56.8%

        \[\leadsto y - \frac{\color{blue}{\left(y - x\right) \cdot \left(z - a\right)}}{t} \]
    11. Simplified56.8%

      \[\leadsto \color{blue}{y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}} \]
    12. Taylor expanded in y around 0 28.7%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - a\right)}{t}} \]
    13. Step-by-step derivation
      1. associate-/l*58.8%

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    14. Simplified58.8%

      \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 20: 47.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{+111}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+58}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+115}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -3.8e+111)
   y
   (if (<= t 1.6e+58)
     (* x (- 1.0 (/ z a)))
     (if (<= t 1.2e+115) (* x (/ (- z a) t)) y))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -3.8e+111) {
		tmp = y;
	} else if (t <= 1.6e+58) {
		tmp = x * (1.0 - (z / a));
	} else if (t <= 1.2e+115) {
		tmp = x * ((z - a) / t);
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-3.8d+111)) then
        tmp = y
    else if (t <= 1.6d+58) then
        tmp = x * (1.0d0 - (z / a))
    else if (t <= 1.2d+115) then
        tmp = x * ((z - a) / t)
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -3.8e+111) {
		tmp = y;
	} else if (t <= 1.6e+58) {
		tmp = x * (1.0 - (z / a));
	} else if (t <= 1.2e+115) {
		tmp = x * ((z - a) / t);
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -3.8e+111:
		tmp = y
	elif t <= 1.6e+58:
		tmp = x * (1.0 - (z / a))
	elif t <= 1.2e+115:
		tmp = x * ((z - a) / t)
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -3.8e+111)
		tmp = y;
	elseif (t <= 1.6e+58)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	elseif (t <= 1.2e+115)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -3.8e+111)
		tmp = y;
	elseif (t <= 1.6e+58)
		tmp = x * (1.0 - (z / a));
	elseif (t <= 1.2e+115)
		tmp = x * ((z - a) / t);
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.8e+111], y, If[LessEqual[t, 1.6e+58], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e+115], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], y]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{+111}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1.6 \cdot 10^{+58}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\

\mathbf{elif}\;t \leq 1.2 \cdot 10^{+115}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.79999999999999976e111 or 1.2e115 < t

    1. Initial program 29.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 65.0%

      \[\leadsto \color{blue}{y} \]

    if -3.79999999999999976e111 < t < 1.60000000000000008e58

    1. Initial program 87.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 65.8%

      \[\leadsto x + \color{blue}{\frac{z \cdot \left(y - x\right)}{a}} \]
    4. Taylor expanded in x around inf 50.3%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{a}\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg50.3%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z}{a}\right)}\right) \]
      2. unsub-neg50.3%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]
    6. Simplified50.3%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{a}\right)} \]

    if 1.60000000000000008e58 < t < 1.2e115

    1. Initial program 30.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative30.9%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-/l*61.1%

        \[\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. Step-by-step derivation
      1. clear-num61.2%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow61.2%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr61.2%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-161.2%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified61.2%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 56.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}} \]
    10. Step-by-step derivation
      1. associate--l+56.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/56.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/56.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-neg56.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-sub56.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-neg56.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--56.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/56.8%

        \[\leadsto y + \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      9. mul-1-neg56.8%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      10. unsub-neg56.8%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      11. distribute-rgt-out--56.8%

        \[\leadsto y - \frac{\color{blue}{\left(y - x\right) \cdot \left(z - a\right)}}{t} \]
    11. Simplified56.8%

      \[\leadsto \color{blue}{y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}} \]
    12. Taylor expanded in y around 0 28.7%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - a\right)}{t}} \]
    13. Step-by-step derivation
      1. associate-/l*58.8%

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    14. Simplified58.8%

      \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 21: 35.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+111}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-6}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -5.1 \cdot 10^{-250}:\\ \;\;\;\;x \cdot \frac{z}{-a}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+64}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -4.2e+111)
   y
   (if (<= t -4e-6)
     x
     (if (<= t -5.1e-250) (* x (/ z (- a))) (if (<= t 1.7e+64) x y)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -4.2e+111) {
		tmp = y;
	} else if (t <= -4e-6) {
		tmp = x;
	} else if (t <= -5.1e-250) {
		tmp = x * (z / -a);
	} else if (t <= 1.7e+64) {
		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+111)) then
        tmp = y
    else if (t <= (-4d-6)) then
        tmp = x
    else if (t <= (-5.1d-250)) then
        tmp = x * (z / -a)
    else if (t <= 1.7d+64) 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+111) {
		tmp = y;
	} else if (t <= -4e-6) {
		tmp = x;
	} else if (t <= -5.1e-250) {
		tmp = x * (z / -a);
	} else if (t <= 1.7e+64) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -4.2e+111:
		tmp = y
	elif t <= -4e-6:
		tmp = x
	elif t <= -5.1e-250:
		tmp = x * (z / -a)
	elif t <= 1.7e+64:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -4.2e+111)
		tmp = y;
	elseif (t <= -4e-6)
		tmp = x;
	elseif (t <= -5.1e-250)
		tmp = Float64(x * Float64(z / Float64(-a)));
	elseif (t <= 1.7e+64)
		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+111)
		tmp = y;
	elseif (t <= -4e-6)
		tmp = x;
	elseif (t <= -5.1e-250)
		tmp = x * (z / -a);
	elseif (t <= 1.7e+64)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.2e+111], y, If[LessEqual[t, -4e-6], x, If[LessEqual[t, -5.1e-250], N[(x * N[(z / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e+64], x, y]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{+111}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -4 \cdot 10^{-6}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq -5.1 \cdot 10^{-250}:\\
\;\;\;\;x \cdot \frac{z}{-a}\\

\mathbf{elif}\;t \leq 1.7 \cdot 10^{+64}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.1999999999999999e111 or 1.7000000000000001e64 < t

    1. Initial program 29.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 57.6%

      \[\leadsto \color{blue}{y} \]

    if -4.1999999999999999e111 < t < -3.99999999999999982e-6 or -5.1000000000000002e-250 < t < 1.7000000000000001e64

    1. Initial program 85.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 38.0%

      \[\leadsto \color{blue}{x} \]

    if -3.99999999999999982e-6 < t < -5.1000000000000002e-250

    1. Initial program 90.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 66.8%

      \[\leadsto x + \color{blue}{\frac{z \cdot \left(y - x\right)}{a}} \]
    4. Taylor expanded in y around 0 47.3%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot z}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg47.3%

        \[\leadsto x + \color{blue}{\left(-\frac{x \cdot z}{a}\right)} \]
      2. unsub-neg47.3%

        \[\leadsto \color{blue}{x - \frac{x \cdot z}{a}} \]
      3. associate-/l*52.8%

        \[\leadsto x - \color{blue}{x \cdot \frac{z}{a}} \]
    6. Simplified52.8%

      \[\leadsto \color{blue}{x - x \cdot \frac{z}{a}} \]
    7. Taylor expanded in z around inf 30.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{a}} \]
    8. Step-by-step derivation
      1. mul-1-neg30.0%

        \[\leadsto \color{blue}{-\frac{x \cdot z}{a}} \]
      2. associate-*r/33.5%

        \[\leadsto -\color{blue}{x \cdot \frac{z}{a}} \]
      3. distribute-rgt-neg-in33.5%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{z}{a}\right)} \]
      4. distribute-neg-frac233.5%

        \[\leadsto x \cdot \color{blue}{\frac{z}{-a}} \]
    9. Simplified33.5%

      \[\leadsto \color{blue}{x \cdot \frac{z}{-a}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 22: 37.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{+75}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-198}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -7.7 \cdot 10^{-261}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+80}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1e+75)
   x
   (if (<= a -2.05e-198)
     y
     (if (<= a -7.7e-261) (* x (/ z t)) (if (<= a 4.5e+80) y x)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1e+75) {
		tmp = x;
	} else if (a <= -2.05e-198) {
		tmp = y;
	} else if (a <= -7.7e-261) {
		tmp = x * (z / t);
	} else if (a <= 4.5e+80) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-1d+75)) then
        tmp = x
    else if (a <= (-2.05d-198)) then
        tmp = y
    else if (a <= (-7.7d-261)) then
        tmp = x * (z / t)
    else if (a <= 4.5d+80) then
        tmp = y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1e+75) {
		tmp = x;
	} else if (a <= -2.05e-198) {
		tmp = y;
	} else if (a <= -7.7e-261) {
		tmp = x * (z / t);
	} else if (a <= 4.5e+80) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1e+75:
		tmp = x
	elif a <= -2.05e-198:
		tmp = y
	elif a <= -7.7e-261:
		tmp = x * (z / t)
	elif a <= 4.5e+80:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1e+75)
		tmp = x;
	elseif (a <= -2.05e-198)
		tmp = y;
	elseif (a <= -7.7e-261)
		tmp = Float64(x * Float64(z / t));
	elseif (a <= 4.5e+80)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1e+75)
		tmp = x;
	elseif (a <= -2.05e-198)
		tmp = y;
	elseif (a <= -7.7e-261)
		tmp = x * (z / t);
	elseif (a <= 4.5e+80)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1e+75], x, If[LessEqual[a, -2.05e-198], y, If[LessEqual[a, -7.7e-261], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.5e+80], y, x]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+75}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -2.05 \cdot 10^{-198}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq -7.7 \cdot 10^{-261}:\\
\;\;\;\;x \cdot \frac{z}{t}\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{+80}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.99999999999999927e74 or 4.50000000000000007e80 < a

    1. Initial program 71.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 53.1%

      \[\leadsto \color{blue}{x} \]

    if -9.99999999999999927e74 < a < -2.05000000000000006e-198 or -7.6999999999999997e-261 < a < 4.50000000000000007e80

    1. Initial program 60.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 37.7%

      \[\leadsto \color{blue}{y} \]

    if -2.05000000000000006e-198 < a < -7.6999999999999997e-261

    1. Initial program 66.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative66.2%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-/l*79.1%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. fma-define79.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified79.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num79.1%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow79.1%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr79.1%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-179.1%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified79.1%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 80.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}} \]
    10. Step-by-step derivation
      1. associate--l+80.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/80.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/80.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-neg80.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-sub80.4%

        \[\leadsto y + \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - \left(-a \cdot \left(y - x\right)\right)}{t}} \]
      6. mul-1-neg80.4%

        \[\leadsto y + \frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - \color{blue}{-1 \cdot \left(a \cdot \left(y - x\right)\right)}}{t} \]
      7. distribute-lft-out--80.4%

        \[\leadsto y + \frac{\color{blue}{-1 \cdot \left(z \cdot \left(y - x\right) - a \cdot \left(y - x\right)\right)}}{t} \]
      8. associate-*r/80.4%

        \[\leadsto y + \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      9. mul-1-neg80.4%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      10. unsub-neg80.4%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      11. distribute-rgt-out--80.4%

        \[\leadsto y - \frac{\color{blue}{\left(y - x\right) \cdot \left(z - a\right)}}{t} \]
    11. Simplified80.4%

      \[\leadsto \color{blue}{y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}} \]
    12. Taylor expanded in y around 0 53.0%

      \[\leadsto y - \color{blue}{-1 \cdot \frac{x \cdot \left(z - a\right)}{t}} \]
    13. Step-by-step derivation
      1. mul-1-neg53.0%

        \[\leadsto y - \color{blue}{\left(-\frac{x \cdot \left(z - a\right)}{t}\right)} \]
      2. associate-/l*72.6%

        \[\leadsto y - \left(-\color{blue}{x \cdot \frac{z - a}{t}}\right) \]
      3. distribute-rgt-neg-in72.6%

        \[\leadsto y - \color{blue}{x \cdot \left(-\frac{z - a}{t}\right)} \]
      4. distribute-neg-frac272.6%

        \[\leadsto y - x \cdot \color{blue}{\frac{z - a}{-t}} \]
    14. Simplified72.6%

      \[\leadsto y - \color{blue}{x \cdot \frac{z - a}{-t}} \]
    15. Taylor expanded in z around inf 36.5%

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    16. Step-by-step derivation
      1. associate-/l*56.0%

        \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
    17. Simplified56.0%

      \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 23: 67.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{-47} \lor \neg \left(a \leq 1.25 \cdot 10^{+81}\right):\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= a -2.3e-47) (not (<= a 1.25e+81)))
   (- x (* y (/ (- t z) a)))
   (+ y (* z (/ (- x y) t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -2.3e-47) || !(a <= 1.25e+81)) {
		tmp = x - (y * ((t - z) / a));
	} else {
		tmp = y + (z * ((x - y) / t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((a <= (-2.3d-47)) .or. (.not. (a <= 1.25d+81))) then
        tmp = x - (y * ((t - z) / a))
    else
        tmp = y + (z * ((x - y) / t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -2.3e-47) || !(a <= 1.25e+81)) {
		tmp = x - (y * ((t - z) / a));
	} else {
		tmp = y + (z * ((x - y) / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -2.3e-47) or not (a <= 1.25e+81):
		tmp = x - (y * ((t - z) / a))
	else:
		tmp = y + (z * ((x - y) / t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -2.3e-47) || !(a <= 1.25e+81))
		tmp = Float64(x - Float64(y * Float64(Float64(t - z) / a)));
	else
		tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a <= -2.3e-47) || ~((a <= 1.25e+81)))
		tmp = x - (y * ((t - z) / a));
	else
		tmp = y + (z * ((x - y) / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.3e-47], N[Not[LessEqual[a, 1.25e+81]], $MachinePrecision]], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{-47} \lor \neg \left(a \leq 1.25 \cdot 10^{+81}\right):\\
\;\;\;\;x - y \cdot \frac{t - z}{a}\\

\mathbf{else}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.29999999999999982e-47 or 1.25e81 < a

    1. Initial program 69.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 66.6%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. *-commutative66.6%

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a - t} \]
    5. Simplified66.6%

      \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    6. Taylor expanded in a around inf 63.1%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*70.2%

        \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a}} \]
    8. Simplified70.2%

      \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a}} \]

    if -2.29999999999999982e-47 < a < 1.25e81

    1. Initial program 60.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative60.9%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-/l*77.3%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. fma-define77.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified77.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num77.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow77.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr77.4%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-177.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified77.4%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 69.7%

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    10. Step-by-step derivation
      1. associate--l+69.7%

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. associate-*r/69.7%

        \[\leadsto y + \left(\color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right)}{t}} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right) \]
      3. associate-*r/69.7%

        \[\leadsto y + \left(\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right)}{t} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(y - x\right)\right)}{t}}\right) \]
      4. mul-1-neg69.7%

        \[\leadsto y + \left(\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right)}{t} - \frac{\color{blue}{-a \cdot \left(y - x\right)}}{t}\right) \]
      5. div-sub69.7%

        \[\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-neg69.7%

        \[\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--69.7%

        \[\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/69.7%

        \[\leadsto y + \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      9. mul-1-neg69.7%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      10. unsub-neg69.7%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      11. distribute-rgt-out--69.8%

        \[\leadsto y - \frac{\color{blue}{\left(y - x\right) \cdot \left(z - a\right)}}{t} \]
    11. Simplified69.8%

      \[\leadsto \color{blue}{y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}} \]
    12. Taylor expanded in z around inf 66.2%

      \[\leadsto y - \color{blue}{\frac{z \cdot \left(y - x\right)}{t}} \]
    13. Step-by-step derivation
      1. associate-/l*74.5%

        \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    14. Simplified74.5%

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{-47} \lor \neg \left(a \leq 1.25 \cdot 10^{+81}\right):\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 56.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{+111} \lor \neg \left(t \leq 7.5 \cdot 10^{+60}\right):\\ \;\;\;\;y - x \cdot \frac{a}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -4.6e+111) (not (<= t 7.5e+60)))
   (- y (* x (/ a t)))
   (+ x (/ y (/ a z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -4.6e+111) || !(t <= 7.5e+60)) {
		tmp = y - (x * (a / t));
	} else {
		tmp = x + (y / (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.6d+111)) .or. (.not. (t <= 7.5d+60))) then
        tmp = y - (x * (a / t))
    else
        tmp = x + (y / (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.6e+111) || !(t <= 7.5e+60)) {
		tmp = y - (x * (a / t));
	} else {
		tmp = x + (y / (a / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -4.6e+111) or not (t <= 7.5e+60):
		tmp = y - (x * (a / t))
	else:
		tmp = x + (y / (a / z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -4.6e+111) || !(t <= 7.5e+60))
		tmp = Float64(y - Float64(x * Float64(a / t)));
	else
		tmp = Float64(x + Float64(y / Float64(a / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -4.6e+111) || ~((t <= 7.5e+60)))
		tmp = y - (x * (a / t));
	else
		tmp = x + (y / (a / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.6e+111], N[Not[LessEqual[t, 7.5e+60]], $MachinePrecision]], N[(y - N[(x * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{+111} \lor \neg \left(t \leq 7.5 \cdot 10^{+60}\right):\\
\;\;\;\;y - x \cdot \frac{a}{t}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.60000000000000004e111 or 7.5e60 < 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*66.7%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. fma-define66.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified66.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num66.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. inv-pow66.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr66.7%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{{\left(\frac{a - t}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-166.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    8. Simplified66.7%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 65.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}} \]
    10. Step-by-step derivation
      1. associate--l+65.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/65.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/65.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-neg65.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-sub65.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-neg65.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--65.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/65.5%

        \[\leadsto y + \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      9. mul-1-neg65.5%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      10. unsub-neg65.5%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      11. distribute-rgt-out--65.6%

        \[\leadsto y - \frac{\color{blue}{\left(y - x\right) \cdot \left(z - a\right)}}{t} \]
    11. Simplified65.6%

      \[\leadsto \color{blue}{y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}} \]
    12. Taylor expanded in y around 0 68.1%

      \[\leadsto y - \color{blue}{-1 \cdot \frac{x \cdot \left(z - a\right)}{t}} \]
    13. Step-by-step derivation
      1. mul-1-neg68.1%

        \[\leadsto y - \color{blue}{\left(-\frac{x \cdot \left(z - a\right)}{t}\right)} \]
      2. associate-/l*81.7%

        \[\leadsto y - \left(-\color{blue}{x \cdot \frac{z - a}{t}}\right) \]
      3. distribute-rgt-neg-in81.7%

        \[\leadsto y - \color{blue}{x \cdot \left(-\frac{z - a}{t}\right)} \]
      4. distribute-neg-frac281.7%

        \[\leadsto y - x \cdot \color{blue}{\frac{z - a}{-t}} \]
    14. Simplified81.7%

      \[\leadsto y - \color{blue}{x \cdot \frac{z - a}{-t}} \]
    15. Taylor expanded in z around 0 65.4%

      \[\leadsto y - x \cdot \color{blue}{\frac{a}{t}} \]

    if -4.60000000000000004e111 < t < 7.5e60

    1. Initial program 87.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 65.8%

      \[\leadsto x + \color{blue}{\frac{z \cdot \left(y - x\right)}{a}} \]
    4. Taylor expanded in y around inf 53.9%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*56.3%

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified56.3%

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    7. Step-by-step derivation
      1. clear-num56.3%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      2. un-div-inv56.4%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    8. Applied egg-rr56.4%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{+111} \lor \neg \left(t \leq 7.5 \cdot 10^{+60}\right):\\ \;\;\;\;y - x \cdot \frac{a}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 48.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.25 \cdot 10^{+111}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+59}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -2.25e+111) y (if (<= t 1.85e+59) (* x (- 1.0 (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -2.25e+111) {
		tmp = y;
	} else if (t <= 1.85e+59) {
		tmp = x * (1.0 - (z / a));
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-2.25d+111)) then
        tmp = y
    else if (t <= 1.85d+59) then
        tmp = x * (1.0d0 - (z / a))
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -2.25e+111) {
		tmp = y;
	} else if (t <= 1.85e+59) {
		tmp = x * (1.0 - (z / a));
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -2.25e+111:
		tmp = y
	elif t <= 1.85e+59:
		tmp = x * (1.0 - (z / a))
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -2.25e+111)
		tmp = y;
	elseif (t <= 1.85e+59)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -2.25e+111)
		tmp = y;
	elseif (t <= 1.85e+59)
		tmp = x * (1.0 - (z / a));
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.25e+111], y, If[LessEqual[t, 1.85e+59], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.25 \cdot 10^{+111}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1.85 \cdot 10^{+59}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.25e111 or 1.84999999999999999e59 < t

    1. Initial program 29.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 57.6%

      \[\leadsto \color{blue}{y} \]

    if -2.25e111 < t < 1.84999999999999999e59

    1. Initial program 87.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 65.8%

      \[\leadsto x + \color{blue}{\frac{z \cdot \left(y - x\right)}{a}} \]
    4. Taylor expanded in x around inf 50.3%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{a}\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg50.3%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z}{a}\right)}\right) \]
      2. unsub-neg50.3%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]
    6. Simplified50.3%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{a}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 26: 38.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{+79}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+83}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.2e+79) x (if (<= a 7e+83) y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.2e+79) {
		tmp = x;
	} else if (a <= 7e+83) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-1.2d+79)) then
        tmp = x
    else if (a <= 7d+83) then
        tmp = y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.2e+79) {
		tmp = x;
	} else if (a <= 7e+83) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.2e+79:
		tmp = x
	elif a <= 7e+83:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.2e+79)
		tmp = x;
	elseif (a <= 7e+83)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.2e+79)
		tmp = x;
	elseif (a <= 7e+83)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.2e+79], x, If[LessEqual[a, 7e+83], y, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{+79}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 7 \cdot 10^{+83}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.19999999999999993e79 or 6.99999999999999954e83 < a

    1. Initial program 71.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 53.1%

      \[\leadsto \color{blue}{x} \]

    if -1.19999999999999993e79 < a < 6.99999999999999954e83

    1. Initial program 61.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 35.9%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 27: 24.5% 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 64.9%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in a around inf 23.0%

    \[\leadsto \color{blue}{x} \]
  4. Add Preprocessing

Developer target: 85.9% 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 2024085 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :alt
  (if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))

  (+ x (/ (* (- y x) (- z t)) (- a t))))