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

Percentage Accurate: 67.3% → 88.8%
Time: 15.9s
Alternatives: 26
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 26 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 88.8% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-168}:\\
\;\;\;\;t\_2\\

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

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

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


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

    1. Initial program 53.8%

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

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

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

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

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

    if -4.0000000000000002e276 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1e-168 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 9.9999999999999997e267

    1. Initial program 98.0%

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

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

    1. Initial program 11.0%

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

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

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

Alternative 2: 89.0% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 78.4%

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

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

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

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

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

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

    1. Initial program 11.0%

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

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

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

Alternative 3: 88.8% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-168}:\\
\;\;\;\;t\_2\\

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

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

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


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

    1. Initial program 53.8%

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

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

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

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

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

    if -4.0000000000000002e276 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1e-168 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 9.9999999999999997e267

    1. Initial program 98.0%

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

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

    1. Initial program 11.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 52.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{x - y}{t - a}\\ \mathbf{if}\;t \leq -4.2 \cdot 10^{+115}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{+80}:\\ \;\;\;\;x - \frac{x \cdot z}{a}\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{+18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{-175}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-306}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-155}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+52}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* z (/ (- x y) (- t a)))))
   (if (<= t -4.2e+115)
     (* y (/ (- t z) t))
     (if (<= t -1.3e+80)
       (- x (/ (* x z) a))
       (if (<= t -7.2e+18)
         t_1
         (if (<= t -2.05e-175)
           (+ x (* y (/ z a)))
           (if (<= t 4.2e-306)
             t_1
             (if (<= t 1.25e-155)
               (- x (* x (/ z a)))
               (if (<= t 3e+52) t_1 (- y (/ z (/ t y))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z * ((x - y) / (t - a));
	double tmp;
	if (t <= -4.2e+115) {
		tmp = y * ((t - z) / t);
	} else if (t <= -1.3e+80) {
		tmp = x - ((x * z) / a);
	} else if (t <= -7.2e+18) {
		tmp = t_1;
	} else if (t <= -2.05e-175) {
		tmp = x + (y * (z / a));
	} else if (t <= 4.2e-306) {
		tmp = t_1;
	} else if (t <= 1.25e-155) {
		tmp = x - (x * (z / a));
	} else if (t <= 3e+52) {
		tmp = t_1;
	} else {
		tmp = y - (z / (t / 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 = z * ((x - y) / (t - a))
    if (t <= (-4.2d+115)) then
        tmp = y * ((t - z) / t)
    else if (t <= (-1.3d+80)) then
        tmp = x - ((x * z) / a)
    else if (t <= (-7.2d+18)) then
        tmp = t_1
    else if (t <= (-2.05d-175)) then
        tmp = x + (y * (z / a))
    else if (t <= 4.2d-306) then
        tmp = t_1
    else if (t <= 1.25d-155) then
        tmp = x - (x * (z / a))
    else if (t <= 3d+52) then
        tmp = t_1
    else
        tmp = y - (z / (t / y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = z * ((x - y) / (t - a));
	double tmp;
	if (t <= -4.2e+115) {
		tmp = y * ((t - z) / t);
	} else if (t <= -1.3e+80) {
		tmp = x - ((x * z) / a);
	} else if (t <= -7.2e+18) {
		tmp = t_1;
	} else if (t <= -2.05e-175) {
		tmp = x + (y * (z / a));
	} else if (t <= 4.2e-306) {
		tmp = t_1;
	} else if (t <= 1.25e-155) {
		tmp = x - (x * (z / a));
	} else if (t <= 3e+52) {
		tmp = t_1;
	} else {
		tmp = y - (z / (t / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z * ((x - y) / (t - a))
	tmp = 0
	if t <= -4.2e+115:
		tmp = y * ((t - z) / t)
	elif t <= -1.3e+80:
		tmp = x - ((x * z) / a)
	elif t <= -7.2e+18:
		tmp = t_1
	elif t <= -2.05e-175:
		tmp = x + (y * (z / a))
	elif t <= 4.2e-306:
		tmp = t_1
	elif t <= 1.25e-155:
		tmp = x - (x * (z / a))
	elif t <= 3e+52:
		tmp = t_1
	else:
		tmp = y - (z / (t / y))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z * Float64(Float64(x - y) / Float64(t - a)))
	tmp = 0.0
	if (t <= -4.2e+115)
		tmp = Float64(y * Float64(Float64(t - z) / t));
	elseif (t <= -1.3e+80)
		tmp = Float64(x - Float64(Float64(x * z) / a));
	elseif (t <= -7.2e+18)
		tmp = t_1;
	elseif (t <= -2.05e-175)
		tmp = Float64(x + Float64(y * Float64(z / a)));
	elseif (t <= 4.2e-306)
		tmp = t_1;
	elseif (t <= 1.25e-155)
		tmp = Float64(x - Float64(x * Float64(z / a)));
	elseif (t <= 3e+52)
		tmp = t_1;
	else
		tmp = Float64(y - Float64(z / Float64(t / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = z * ((x - y) / (t - a));
	tmp = 0.0;
	if (t <= -4.2e+115)
		tmp = y * ((t - z) / t);
	elseif (t <= -1.3e+80)
		tmp = x - ((x * z) / a);
	elseif (t <= -7.2e+18)
		tmp = t_1;
	elseif (t <= -2.05e-175)
		tmp = x + (y * (z / a));
	elseif (t <= 4.2e-306)
		tmp = t_1;
	elseif (t <= 1.25e-155)
		tmp = x - (x * (z / a));
	elseif (t <= 3e+52)
		tmp = t_1;
	else
		tmp = y - (z / (t / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2e+115], N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.3e+80], N[(x - N[(N[(x * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.2e+18], t$95$1, If[LessEqual[t, -2.05e-175], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e-306], t$95$1, If[LessEqual[t, 1.25e-155], N[(x - N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+52], t$95$1, N[(y - N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -7.2 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 4.2 \cdot 10^{-306}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 3 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -4.20000000000000007e115

    1. Initial program 26.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.20000000000000007e115 < t < -1.29999999999999991e80

    1. Initial program 35.8%

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

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

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

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

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

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

    if -1.29999999999999991e80 < t < -7.2e18 or -2.04999999999999999e-175 < t < 4.2000000000000002e-306 or 1.25e-155 < t < 3e52

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
    9. Simplified72.1%

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

    if -7.2e18 < t < -2.04999999999999999e-175

    1. Initial program 88.4%

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

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

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

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

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

    if 4.2000000000000002e-306 < t < 1.25e-155

    1. Initial program 99.8%

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

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

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

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

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

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

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

    if 3e52 < t

    1. Initial program 43.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y + -1 \cdot \frac{y \cdot z}{t}} \]
    14. Step-by-step derivation
      1. mul-1-neg62.6%

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

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

        \[\leadsto \color{blue}{y - \frac{y}{t} \cdot z} \]
      4. associate-*l/62.6%

        \[\leadsto y - \color{blue}{\frac{y \cdot z}{t}} \]
      5. associate-/l*70.4%

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
      6. *-commutative70.4%

        \[\leadsto y - \color{blue}{\frac{z}{t} \cdot y} \]
      7. associate-/r/70.4%

        \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y}}} \]
    15. Simplified70.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+115}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{+80}:\\ \;\;\;\;x - \frac{x \cdot z}{a}\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{+18}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{-175}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-306}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-155}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+52}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 52.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{x - y}{t - a}\\ \mathbf{if}\;t \leq -4.2 \cdot 10^{+115}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -6.8 \cdot 10^{+75}:\\ \;\;\;\;x - \frac{x \cdot z}{a}\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{+23}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-173}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{-306}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-155}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+51}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* z (/ (- x y) (- t a)))))
   (if (<= t -4.2e+115)
     (* y (/ (- t z) t))
     (if (<= t -6.8e+75)
       (- x (/ (* x z) a))
       (if (<= t -2.4e+23)
         (* (- z t) (/ y (- a t)))
         (if (<= t -3.8e-173)
           (+ x (* y (/ z a)))
           (if (<= t 2.55e-306)
             t_1
             (if (<= t 1.5e-155)
               (- x (* x (/ z a)))
               (if (<= t 5.4e+51) t_1 (- y (/ z (/ t y))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z * ((x - y) / (t - a));
	double tmp;
	if (t <= -4.2e+115) {
		tmp = y * ((t - z) / t);
	} else if (t <= -6.8e+75) {
		tmp = x - ((x * z) / a);
	} else if (t <= -2.4e+23) {
		tmp = (z - t) * (y / (a - t));
	} else if (t <= -3.8e-173) {
		tmp = x + (y * (z / a));
	} else if (t <= 2.55e-306) {
		tmp = t_1;
	} else if (t <= 1.5e-155) {
		tmp = x - (x * (z / a));
	} else if (t <= 5.4e+51) {
		tmp = t_1;
	} else {
		tmp = y - (z / (t / 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 = z * ((x - y) / (t - a))
    if (t <= (-4.2d+115)) then
        tmp = y * ((t - z) / t)
    else if (t <= (-6.8d+75)) then
        tmp = x - ((x * z) / a)
    else if (t <= (-2.4d+23)) then
        tmp = (z - t) * (y / (a - t))
    else if (t <= (-3.8d-173)) then
        tmp = x + (y * (z / a))
    else if (t <= 2.55d-306) then
        tmp = t_1
    else if (t <= 1.5d-155) then
        tmp = x - (x * (z / a))
    else if (t <= 5.4d+51) then
        tmp = t_1
    else
        tmp = y - (z / (t / y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = z * ((x - y) / (t - a));
	double tmp;
	if (t <= -4.2e+115) {
		tmp = y * ((t - z) / t);
	} else if (t <= -6.8e+75) {
		tmp = x - ((x * z) / a);
	} else if (t <= -2.4e+23) {
		tmp = (z - t) * (y / (a - t));
	} else if (t <= -3.8e-173) {
		tmp = x + (y * (z / a));
	} else if (t <= 2.55e-306) {
		tmp = t_1;
	} else if (t <= 1.5e-155) {
		tmp = x - (x * (z / a));
	} else if (t <= 5.4e+51) {
		tmp = t_1;
	} else {
		tmp = y - (z / (t / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z * ((x - y) / (t - a))
	tmp = 0
	if t <= -4.2e+115:
		tmp = y * ((t - z) / t)
	elif t <= -6.8e+75:
		tmp = x - ((x * z) / a)
	elif t <= -2.4e+23:
		tmp = (z - t) * (y / (a - t))
	elif t <= -3.8e-173:
		tmp = x + (y * (z / a))
	elif t <= 2.55e-306:
		tmp = t_1
	elif t <= 1.5e-155:
		tmp = x - (x * (z / a))
	elif t <= 5.4e+51:
		tmp = t_1
	else:
		tmp = y - (z / (t / y))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z * Float64(Float64(x - y) / Float64(t - a)))
	tmp = 0.0
	if (t <= -4.2e+115)
		tmp = Float64(y * Float64(Float64(t - z) / t));
	elseif (t <= -6.8e+75)
		tmp = Float64(x - Float64(Float64(x * z) / a));
	elseif (t <= -2.4e+23)
		tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t)));
	elseif (t <= -3.8e-173)
		tmp = Float64(x + Float64(y * Float64(z / a)));
	elseif (t <= 2.55e-306)
		tmp = t_1;
	elseif (t <= 1.5e-155)
		tmp = Float64(x - Float64(x * Float64(z / a)));
	elseif (t <= 5.4e+51)
		tmp = t_1;
	else
		tmp = Float64(y - Float64(z / Float64(t / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = z * ((x - y) / (t - a));
	tmp = 0.0;
	if (t <= -4.2e+115)
		tmp = y * ((t - z) / t);
	elseif (t <= -6.8e+75)
		tmp = x - ((x * z) / a);
	elseif (t <= -2.4e+23)
		tmp = (z - t) * (y / (a - t));
	elseif (t <= -3.8e-173)
		tmp = x + (y * (z / a));
	elseif (t <= 2.55e-306)
		tmp = t_1;
	elseif (t <= 1.5e-155)
		tmp = x - (x * (z / a));
	elseif (t <= 5.4e+51)
		tmp = t_1;
	else
		tmp = y - (z / (t / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2e+115], N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.8e+75], N[(x - N[(N[(x * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.4e+23], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.8e-173], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.55e-306], t$95$1, If[LessEqual[t, 1.5e-155], N[(x - N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e+51], t$95$1, N[(y - N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;t \leq 2.55 \cdot 10^{-306}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if t < -4.20000000000000007e115

    1. Initial program 26.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.20000000000000007e115 < t < -6.80000000000000022e75

    1. Initial program 42.2%

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-x \cdot z}}{a} \]
    6. Simplified58.7%

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

    if -6.80000000000000022e75 < t < -2.4e23

    1. Initial program 52.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4e23 < t < -3.8000000000000003e-173

    1. Initial program 88.4%

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

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

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

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

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

    if -3.8000000000000003e-173 < t < 2.54999999999999986e-306 or 1.49999999999999992e-155 < t < 5.39999999999999983e51

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

    if 2.54999999999999986e-306 < t < 1.49999999999999992e-155

    1. Initial program 99.8%

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

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

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

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

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

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

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

    if 5.39999999999999983e51 < t

    1. Initial program 43.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y + -1 \cdot \frac{y \cdot z}{t}} \]
    14. Step-by-step derivation
      1. mul-1-neg62.6%

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

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

        \[\leadsto \color{blue}{y - \frac{y}{t} \cdot z} \]
      4. associate-*l/62.6%

        \[\leadsto y - \color{blue}{\frac{y \cdot z}{t}} \]
      5. associate-/l*70.4%

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
      6. *-commutative70.4%

        \[\leadsto y - \color{blue}{\frac{z}{t} \cdot y} \]
      7. associate-/r/70.4%

        \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y}}} \]
    15. Simplified70.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+115}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -6.8 \cdot 10^{+75}:\\ \;\;\;\;x - \frac{x \cdot z}{a}\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{+23}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-173}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{-306}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-155}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+51}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 60.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - z}{t}\\ t_2 := x - y \cdot \frac{t - z}{a}\\ t_3 := z \cdot \frac{x - y}{t - a}\\ \mathbf{if}\;a \leq -2.1 \cdot 10^{+70}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -7.6 \cdot 10^{-162}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-291}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-201}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-101}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-36}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t z) t)))
        (t_2 (- x (* y (/ (- t z) a))))
        (t_3 (* z (/ (- x y) (- t a)))))
   (if (<= a -2.1e+70)
     t_2
     (if (<= a -7.6e-162)
       (* (- z t) (/ y (- a t)))
       (if (<= a 3.5e-291)
         t_3
         (if (<= a 1.3e-201)
           t_1
           (if (<= a 3.6e-101) t_3 (if (<= a 3.3e-36) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - z) / t);
	double t_2 = x - (y * ((t - z) / a));
	double t_3 = z * ((x - y) / (t - a));
	double tmp;
	if (a <= -2.1e+70) {
		tmp = t_2;
	} else if (a <= -7.6e-162) {
		tmp = (z - t) * (y / (a - t));
	} else if (a <= 3.5e-291) {
		tmp = t_3;
	} else if (a <= 1.3e-201) {
		tmp = t_1;
	} else if (a <= 3.6e-101) {
		tmp = t_3;
	} else if (a <= 3.3e-36) {
		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) :: t_3
    real(8) :: tmp
    t_1 = y * ((t - z) / t)
    t_2 = x - (y * ((t - z) / a))
    t_3 = z * ((x - y) / (t - a))
    if (a <= (-2.1d+70)) then
        tmp = t_2
    else if (a <= (-7.6d-162)) then
        tmp = (z - t) * (y / (a - t))
    else if (a <= 3.5d-291) then
        tmp = t_3
    else if (a <= 1.3d-201) then
        tmp = t_1
    else if (a <= 3.6d-101) then
        tmp = t_3
    else if (a <= 3.3d-36) 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 = y * ((t - z) / t);
	double t_2 = x - (y * ((t - z) / a));
	double t_3 = z * ((x - y) / (t - a));
	double tmp;
	if (a <= -2.1e+70) {
		tmp = t_2;
	} else if (a <= -7.6e-162) {
		tmp = (z - t) * (y / (a - t));
	} else if (a <= 3.5e-291) {
		tmp = t_3;
	} else if (a <= 1.3e-201) {
		tmp = t_1;
	} else if (a <= 3.6e-101) {
		tmp = t_3;
	} else if (a <= 3.3e-36) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - z) / t)
	t_2 = x - (y * ((t - z) / a))
	t_3 = z * ((x - y) / (t - a))
	tmp = 0
	if a <= -2.1e+70:
		tmp = t_2
	elif a <= -7.6e-162:
		tmp = (z - t) * (y / (a - t))
	elif a <= 3.5e-291:
		tmp = t_3
	elif a <= 1.3e-201:
		tmp = t_1
	elif a <= 3.6e-101:
		tmp = t_3
	elif a <= 3.3e-36:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - z) / t))
	t_2 = Float64(x - Float64(y * Float64(Float64(t - z) / a)))
	t_3 = Float64(z * Float64(Float64(x - y) / Float64(t - a)))
	tmp = 0.0
	if (a <= -2.1e+70)
		tmp = t_2;
	elseif (a <= -7.6e-162)
		tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t)));
	elseif (a <= 3.5e-291)
		tmp = t_3;
	elseif (a <= 1.3e-201)
		tmp = t_1;
	elseif (a <= 3.6e-101)
		tmp = t_3;
	elseif (a <= 3.3e-36)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - z) / t);
	t_2 = x - (y * ((t - z) / a));
	t_3 = z * ((x - y) / (t - a));
	tmp = 0.0;
	if (a <= -2.1e+70)
		tmp = t_2;
	elseif (a <= -7.6e-162)
		tmp = (z - t) * (y / (a - t));
	elseif (a <= 3.5e-291)
		tmp = t_3;
	elseif (a <= 1.3e-201)
		tmp = t_1;
	elseif (a <= 3.6e-101)
		tmp = t_3;
	elseif (a <= 3.3e-36)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.1e+70], t$95$2, If[LessEqual[a, -7.6e-162], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.5e-291], t$95$3, If[LessEqual[a, 1.3e-201], t$95$1, If[LessEqual[a, 3.6e-101], t$95$3, If[LessEqual[a, 3.3e-36], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq 3.5 \cdot 10^{-291}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 1.3 \cdot 10^{-201}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 3.6 \cdot 10^{-101}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 3.3 \cdot 10^{-36}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.10000000000000008e70 or 3.29999999999999991e-36 < a

    1. Initial program 71.7%

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

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

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

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

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

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

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

    if -2.10000000000000008e70 < a < -7.6000000000000001e-162

    1. Initial program 71.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.6000000000000001e-162 < a < 3.49999999999999996e-291 or 1.29999999999999991e-201 < a < 3.6e-101

    1. Initial program 70.2%

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

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

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

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

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

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

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

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

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

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

    if 3.49999999999999996e-291 < a < 1.29999999999999991e-201 or 3.6e-101 < a < 3.29999999999999991e-36

    1. Initial program 68.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+70}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;a \leq -7.6 \cdot 10^{-162}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-291}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-201}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-101}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-36}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 60.2% accurate, 0.3× speedup?

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if t < -4.20000000000000007e115

    1. Initial program 26.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.20000000000000007e115 < t < -6.9000000000000004e75

    1. Initial program 42.2%

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-x \cdot z}}{a} \]
    6. Simplified58.7%

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

    if -6.9000000000000004e75 < t < -9.49999999999999927e28

    1. Initial program 52.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.49999999999999927e28 < t < -1.85e-22

    1. Initial program 75.2%

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

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

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

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

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

    if -1.85e-22 < t < 8.6000000000000001e-153

    1. Initial program 96.0%

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

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

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

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

    if 8.6000000000000001e-153 < t < 2.29999999999999994e54

    1. Initial program 88.2%

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

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

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

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

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

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

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

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

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

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

    if 2.29999999999999994e54 < t

    1. Initial program 43.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y + -1 \cdot \frac{y \cdot z}{t}} \]
    14. Step-by-step derivation
      1. mul-1-neg62.6%

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

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

        \[\leadsto \color{blue}{y - \frac{y}{t} \cdot z} \]
      4. associate-*l/62.6%

        \[\leadsto y - \color{blue}{\frac{y \cdot z}{t}} \]
      5. associate-/l*70.4%

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
      6. *-commutative70.4%

        \[\leadsto y - \color{blue}{\frac{z}{t} \cdot y} \]
      7. associate-/r/70.4%

        \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y}}} \]
    15. Simplified70.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+115}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -6.9 \cdot 10^{+75}:\\ \;\;\;\;x - \frac{x \cdot z}{a}\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{+28}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -1.85 \cdot 10^{-22}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{-153}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+54}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 53.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y - \frac{z}{\frac{t}{y}}\\ t_2 := x + y \cdot \frac{z}{a}\\ \mathbf{if}\;t \leq -1.35 \cdot 10^{+116}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{+52}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{+27}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-195}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-303}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+14}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- y (/ z (/ t y)))) (t_2 (+ x (* y (/ z a)))))
   (if (<= t -1.35e+116)
     t_1
     (if (<= t -9.5e+52)
       (- x (* x (/ z a)))
       (if (<= t -2.3e+27)
         t_1
         (if (<= t -2.6e-195)
           t_2
           (if (<= t 1.4e-303)
             (* z (/ (- y x) a))
             (if (<= t 1.75e+14) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y - (z / (t / y));
	double t_2 = x + (y * (z / a));
	double tmp;
	if (t <= -1.35e+116) {
		tmp = t_1;
	} else if (t <= -9.5e+52) {
		tmp = x - (x * (z / a));
	} else if (t <= -2.3e+27) {
		tmp = t_1;
	} else if (t <= -2.6e-195) {
		tmp = t_2;
	} else if (t <= 1.4e-303) {
		tmp = z * ((y - x) / a);
	} else if (t <= 1.75e+14) {
		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 - (z / (t / y))
    t_2 = x + (y * (z / a))
    if (t <= (-1.35d+116)) then
        tmp = t_1
    else if (t <= (-9.5d+52)) then
        tmp = x - (x * (z / a))
    else if (t <= (-2.3d+27)) then
        tmp = t_1
    else if (t <= (-2.6d-195)) then
        tmp = t_2
    else if (t <= 1.4d-303) then
        tmp = z * ((y - x) / a)
    else if (t <= 1.75d+14) 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 - (z / (t / y));
	double t_2 = x + (y * (z / a));
	double tmp;
	if (t <= -1.35e+116) {
		tmp = t_1;
	} else if (t <= -9.5e+52) {
		tmp = x - (x * (z / a));
	} else if (t <= -2.3e+27) {
		tmp = t_1;
	} else if (t <= -2.6e-195) {
		tmp = t_2;
	} else if (t <= 1.4e-303) {
		tmp = z * ((y - x) / a);
	} else if (t <= 1.75e+14) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y - (z / (t / y))
	t_2 = x + (y * (z / a))
	tmp = 0
	if t <= -1.35e+116:
		tmp = t_1
	elif t <= -9.5e+52:
		tmp = x - (x * (z / a))
	elif t <= -2.3e+27:
		tmp = t_1
	elif t <= -2.6e-195:
		tmp = t_2
	elif t <= 1.4e-303:
		tmp = z * ((y - x) / a)
	elif t <= 1.75e+14:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y - Float64(z / Float64(t / y)))
	t_2 = Float64(x + Float64(y * Float64(z / a)))
	tmp = 0.0
	if (t <= -1.35e+116)
		tmp = t_1;
	elseif (t <= -9.5e+52)
		tmp = Float64(x - Float64(x * Float64(z / a)));
	elseif (t <= -2.3e+27)
		tmp = t_1;
	elseif (t <= -2.6e-195)
		tmp = t_2;
	elseif (t <= 1.4e-303)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	elseif (t <= 1.75e+14)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y - (z / (t / y));
	t_2 = x + (y * (z / a));
	tmp = 0.0;
	if (t <= -1.35e+116)
		tmp = t_1;
	elseif (t <= -9.5e+52)
		tmp = x - (x * (z / a));
	elseif (t <= -2.3e+27)
		tmp = t_1;
	elseif (t <= -2.6e-195)
		tmp = t_2;
	elseif (t <= 1.4e-303)
		tmp = z * ((y - x) / a);
	elseif (t <= 1.75e+14)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.35e+116], t$95$1, If[LessEqual[t, -9.5e+52], N[(x - N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.3e+27], t$95$1, If[LessEqual[t, -2.6e-195], t$95$2, If[LessEqual[t, 1.4e-303], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e+14], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -2.3 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -2.6 \cdot 10^{-195}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 1.75 \cdot 10^{+14}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.35e116 or -9.49999999999999994e52 < t < -2.3000000000000001e27 or 1.75e14 < t

    1. Initial program 44.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y + -1 \cdot \frac{y \cdot z}{t}} \]
    14. Step-by-step derivation
      1. mul-1-neg58.3%

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

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

        \[\leadsto \color{blue}{y - \frac{y}{t} \cdot z} \]
      4. associate-*l/58.3%

        \[\leadsto y - \color{blue}{\frac{y \cdot z}{t}} \]
      5. associate-/l*65.0%

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
      6. *-commutative65.0%

        \[\leadsto y - \color{blue}{\frac{z}{t} \cdot y} \]
      7. associate-/r/64.4%

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

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

    if -1.35e116 < t < -9.49999999999999994e52

    1. Initial program 38.1%

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

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

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

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

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

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

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

    if -2.3000000000000001e27 < t < -2.6000000000000002e-195 or 1.4e-303 < t < 1.75e14

    1. Initial program 93.1%

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

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

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

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

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

    if -2.6000000000000002e-195 < t < 1.4e-303

    1. Initial program 95.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{+116}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{+52}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{+27}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-195}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-303}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+14}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 53.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - z}{t}\\ t_2 := x + y \cdot \frac{z}{a}\\ \mathbf{if}\;t \leq -4.6 \cdot 10^{+115}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{+52}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{+28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{-197}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-300}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 6800000:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t z) t))) (t_2 (+ x (* y (/ z a)))))
   (if (<= t -4.6e+115)
     t_1
     (if (<= t -1.9e+52)
       (- x (* x (/ z a)))
       (if (<= t -1.1e+28)
         t_1
         (if (<= t -1.15e-197)
           t_2
           (if (<= t 5e-300)
             (* z (/ (- y x) a))
             (if (<= t 6800000.0) t_2 (- y (/ z (/ t y)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - z) / t);
	double t_2 = x + (y * (z / a));
	double tmp;
	if (t <= -4.6e+115) {
		tmp = t_1;
	} else if (t <= -1.9e+52) {
		tmp = x - (x * (z / a));
	} else if (t <= -1.1e+28) {
		tmp = t_1;
	} else if (t <= -1.15e-197) {
		tmp = t_2;
	} else if (t <= 5e-300) {
		tmp = z * ((y - x) / a);
	} else if (t <= 6800000.0) {
		tmp = t_2;
	} else {
		tmp = y - (z / (t / 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 * ((t - z) / t)
    t_2 = x + (y * (z / a))
    if (t <= (-4.6d+115)) then
        tmp = t_1
    else if (t <= (-1.9d+52)) then
        tmp = x - (x * (z / a))
    else if (t <= (-1.1d+28)) then
        tmp = t_1
    else if (t <= (-1.15d-197)) then
        tmp = t_2
    else if (t <= 5d-300) then
        tmp = z * ((y - x) / a)
    else if (t <= 6800000.0d0) then
        tmp = t_2
    else
        tmp = y - (z / (t / 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 * ((t - z) / t);
	double t_2 = x + (y * (z / a));
	double tmp;
	if (t <= -4.6e+115) {
		tmp = t_1;
	} else if (t <= -1.9e+52) {
		tmp = x - (x * (z / a));
	} else if (t <= -1.1e+28) {
		tmp = t_1;
	} else if (t <= -1.15e-197) {
		tmp = t_2;
	} else if (t <= 5e-300) {
		tmp = z * ((y - x) / a);
	} else if (t <= 6800000.0) {
		tmp = t_2;
	} else {
		tmp = y - (z / (t / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - z) / t)
	t_2 = x + (y * (z / a))
	tmp = 0
	if t <= -4.6e+115:
		tmp = t_1
	elif t <= -1.9e+52:
		tmp = x - (x * (z / a))
	elif t <= -1.1e+28:
		tmp = t_1
	elif t <= -1.15e-197:
		tmp = t_2
	elif t <= 5e-300:
		tmp = z * ((y - x) / a)
	elif t <= 6800000.0:
		tmp = t_2
	else:
		tmp = y - (z / (t / y))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - z) / t))
	t_2 = Float64(x + Float64(y * Float64(z / a)))
	tmp = 0.0
	if (t <= -4.6e+115)
		tmp = t_1;
	elseif (t <= -1.9e+52)
		tmp = Float64(x - Float64(x * Float64(z / a)));
	elseif (t <= -1.1e+28)
		tmp = t_1;
	elseif (t <= -1.15e-197)
		tmp = t_2;
	elseif (t <= 5e-300)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	elseif (t <= 6800000.0)
		tmp = t_2;
	else
		tmp = Float64(y - Float64(z / Float64(t / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - z) / t);
	t_2 = x + (y * (z / a));
	tmp = 0.0;
	if (t <= -4.6e+115)
		tmp = t_1;
	elseif (t <= -1.9e+52)
		tmp = x - (x * (z / a));
	elseif (t <= -1.1e+28)
		tmp = t_1;
	elseif (t <= -1.15e-197)
		tmp = t_2;
	elseif (t <= 5e-300)
		tmp = z * ((y - x) / a);
	elseif (t <= 6800000.0)
		tmp = t_2;
	else
		tmp = y - (z / (t / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.6e+115], t$95$1, If[LessEqual[t, -1.9e+52], N[(x - N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.1e+28], t$95$1, If[LessEqual[t, -1.15e-197], t$95$2, If[LessEqual[t, 5e-300], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6800000.0], t$95$2, N[(y - N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -1.1 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.15 \cdot 10^{-197}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 6800000:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4.60000000000000007e115 or -1.9e52 < t < -1.09999999999999993e28

    1. Initial program 32.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      3. *-commutative51.0%

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

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

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

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

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

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

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

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

    if -4.60000000000000007e115 < t < -1.9e52

    1. Initial program 38.1%

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

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

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

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

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

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

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

    if -1.09999999999999993e28 < t < -1.15e-197 or 4.99999999999999996e-300 < t < 6.8e6

    1. Initial program 93.1%

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

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

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

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

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

    if -1.15e-197 < t < 4.99999999999999996e-300

    1. Initial program 95.9%

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

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

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

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

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

    if 6.8e6 < t

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y + -1 \cdot \frac{y \cdot z}{t}} \]
    14. Step-by-step derivation
      1. mul-1-neg57.3%

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

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

        \[\leadsto \color{blue}{y - \frac{y}{t} \cdot z} \]
      4. associate-*l/57.3%

        \[\leadsto y - \color{blue}{\frac{y \cdot z}{t}} \]
      5. associate-/l*64.7%

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

        \[\leadsto y - \color{blue}{\frac{z}{t} \cdot y} \]
      7. associate-/r/64.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{+115}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{+52}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{+28}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{-197}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-300}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 6800000:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 53.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - z}{t}\\ t_2 := x + y \cdot \frac{z}{a}\\ \mathbf{if}\;t \leq -4.2 \cdot 10^{+115}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{+52}:\\ \;\;\;\;x - \frac{x \cdot z}{a}\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{+27}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-197}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{-303}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 4100:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t z) t))) (t_2 (+ x (* y (/ z a)))))
   (if (<= t -4.2e+115)
     t_1
     (if (<= t -1.1e+52)
       (- x (/ (* x z) a))
       (if (<= t -4.8e+27)
         t_1
         (if (<= t -4.5e-197)
           t_2
           (if (<= t 6.6e-303)
             (* z (/ (- y x) a))
             (if (<= t 4100.0) t_2 (- y (/ z (/ t y)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - z) / t);
	double t_2 = x + (y * (z / a));
	double tmp;
	if (t <= -4.2e+115) {
		tmp = t_1;
	} else if (t <= -1.1e+52) {
		tmp = x - ((x * z) / a);
	} else if (t <= -4.8e+27) {
		tmp = t_1;
	} else if (t <= -4.5e-197) {
		tmp = t_2;
	} else if (t <= 6.6e-303) {
		tmp = z * ((y - x) / a);
	} else if (t <= 4100.0) {
		tmp = t_2;
	} else {
		tmp = y - (z / (t / 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 * ((t - z) / t)
    t_2 = x + (y * (z / a))
    if (t <= (-4.2d+115)) then
        tmp = t_1
    else if (t <= (-1.1d+52)) then
        tmp = x - ((x * z) / a)
    else if (t <= (-4.8d+27)) then
        tmp = t_1
    else if (t <= (-4.5d-197)) then
        tmp = t_2
    else if (t <= 6.6d-303) then
        tmp = z * ((y - x) / a)
    else if (t <= 4100.0d0) then
        tmp = t_2
    else
        tmp = y - (z / (t / 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 * ((t - z) / t);
	double t_2 = x + (y * (z / a));
	double tmp;
	if (t <= -4.2e+115) {
		tmp = t_1;
	} else if (t <= -1.1e+52) {
		tmp = x - ((x * z) / a);
	} else if (t <= -4.8e+27) {
		tmp = t_1;
	} else if (t <= -4.5e-197) {
		tmp = t_2;
	} else if (t <= 6.6e-303) {
		tmp = z * ((y - x) / a);
	} else if (t <= 4100.0) {
		tmp = t_2;
	} else {
		tmp = y - (z / (t / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - z) / t)
	t_2 = x + (y * (z / a))
	tmp = 0
	if t <= -4.2e+115:
		tmp = t_1
	elif t <= -1.1e+52:
		tmp = x - ((x * z) / a)
	elif t <= -4.8e+27:
		tmp = t_1
	elif t <= -4.5e-197:
		tmp = t_2
	elif t <= 6.6e-303:
		tmp = z * ((y - x) / a)
	elif t <= 4100.0:
		tmp = t_2
	else:
		tmp = y - (z / (t / y))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - z) / t))
	t_2 = Float64(x + Float64(y * Float64(z / a)))
	tmp = 0.0
	if (t <= -4.2e+115)
		tmp = t_1;
	elseif (t <= -1.1e+52)
		tmp = Float64(x - Float64(Float64(x * z) / a));
	elseif (t <= -4.8e+27)
		tmp = t_1;
	elseif (t <= -4.5e-197)
		tmp = t_2;
	elseif (t <= 6.6e-303)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	elseif (t <= 4100.0)
		tmp = t_2;
	else
		tmp = Float64(y - Float64(z / Float64(t / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - z) / t);
	t_2 = x + (y * (z / a));
	tmp = 0.0;
	if (t <= -4.2e+115)
		tmp = t_1;
	elseif (t <= -1.1e+52)
		tmp = x - ((x * z) / a);
	elseif (t <= -4.8e+27)
		tmp = t_1;
	elseif (t <= -4.5e-197)
		tmp = t_2;
	elseif (t <= 6.6e-303)
		tmp = z * ((y - x) / a);
	elseif (t <= 4100.0)
		tmp = t_2;
	else
		tmp = y - (z / (t / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2e+115], t$95$1, If[LessEqual[t, -1.1e+52], N[(x - N[(N[(x * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.8e+27], t$95$1, If[LessEqual[t, -4.5e-197], t$95$2, If[LessEqual[t, 6.6e-303], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4100.0], t$95$2, N[(y - N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -4.8 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -4.5 \cdot 10^{-197}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 4100:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4.20000000000000007e115 or -1.1e52 < t < -4.79999999999999995e27

    1. Initial program 32.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      3. *-commutative51.0%

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

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

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

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

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

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

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

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

    if -4.20000000000000007e115 < t < -1.1e52

    1. Initial program 38.1%

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

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

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

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

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

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

    if -4.79999999999999995e27 < t < -4.5000000000000001e-197 or 6.5999999999999994e-303 < t < 4100

    1. Initial program 93.1%

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

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

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

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

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

    if -4.5000000000000001e-197 < t < 6.5999999999999994e-303

    1. Initial program 95.9%

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

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

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

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

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

    if 4100 < t

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y + -1 \cdot \frac{y \cdot z}{t}} \]
    14. Step-by-step derivation
      1. mul-1-neg57.3%

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

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

        \[\leadsto \color{blue}{y - \frac{y}{t} \cdot z} \]
      4. associate-*l/57.3%

        \[\leadsto y - \color{blue}{\frac{y \cdot z}{t}} \]
      5. associate-/l*64.7%

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

        \[\leadsto y - \color{blue}{\frac{z}{t} \cdot y} \]
      7. associate-/r/64.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+115}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{+52}:\\ \;\;\;\;x - \frac{x \cdot z}{a}\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{+27}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-197}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{-303}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 4100:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 58.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -4.7 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -3.5 \cdot 10^{-276}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 1.7 \cdot 10^{-152}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 3.8 \cdot 10^{+52}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 26.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35e116 < t < -4.69999999999999984e-176 or -3.49999999999999993e-276 < t < 1.69999999999999992e-152

    1. Initial program 84.8%

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

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

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

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

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

    if -4.69999999999999984e-176 < t < -3.49999999999999993e-276 or 1.69999999999999992e-152 < t < 3.8e52

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

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

    if 3.8e52 < t

    1. Initial program 43.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y + -1 \cdot \frac{y \cdot z}{t}} \]
    14. Step-by-step derivation
      1. mul-1-neg62.6%

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

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

        \[\leadsto \color{blue}{y - \frac{y}{t} \cdot z} \]
      4. associate-*l/62.6%

        \[\leadsto y - \color{blue}{\frac{y \cdot z}{t}} \]
      5. associate-/l*70.4%

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
      6. *-commutative70.4%

        \[\leadsto y - \color{blue}{\frac{z}{t} \cdot y} \]
      7. associate-/r/70.4%

        \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y}}} \]
    15. Simplified70.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{+116}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -4.7 \cdot 10^{-176}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-276}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-152}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+52}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 58.1% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq -6.8 \cdot 10^{-263}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.1 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4.49999999999999963e115

    1. Initial program 26.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.49999999999999963e115 < t < -4.8999999999999997e-176

    1. Initial program 75.2%

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

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

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

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

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

    if -4.8999999999999997e-176 < t < -6.80000000000000008e-263 or 1.2499999999999999e-152 < t < 2.09999999999999986e54

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

    if -6.80000000000000008e-263 < t < 1.2499999999999999e-152

    1. Initial program 99.8%

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

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

    if 2.09999999999999986e54 < t

    1. Initial program 43.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y + -1 \cdot \frac{y \cdot z}{t}} \]
    14. Step-by-step derivation
      1. mul-1-neg62.6%

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

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

        \[\leadsto \color{blue}{y - \frac{y}{t} \cdot z} \]
      4. associate-*l/62.6%

        \[\leadsto y - \color{blue}{\frac{y \cdot z}{t}} \]
      5. associate-/l*70.4%

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
      6. *-commutative70.4%

        \[\leadsto y - \color{blue}{\frac{z}{t} \cdot y} \]
      7. associate-/r/70.4%

        \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y}}} \]
    15. Simplified70.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+115}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -4.9 \cdot 10^{-176}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -6.8 \cdot 10^{-263}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-152}:\\ \;\;\;\;x - \frac{z \cdot \left(x - y\right)}{a}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+54}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 69.2% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -3.5999999999999999e105

    1. Initial program 24.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.5999999999999999e105 < t < -2.35e56

    1. Initial program 44.1%

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

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

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

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

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

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

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

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

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

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

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

    if -2.35e56 < t < -4.9999999999999999e-49

    1. Initial program 86.0%

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

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

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

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

    if -4.9999999999999999e-49 < t < 9e61

    1. Initial program 92.4%

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

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

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

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

    if 9e61 < t

    1. Initial program 42.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      3. *-commutative49.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y + -1 \cdot \frac{y \cdot z}{t}} \]
    14. Step-by-step derivation
      1. mul-1-neg65.1%

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

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

        \[\leadsto \color{blue}{y - \frac{y}{t} \cdot z} \]
      4. associate-*l/65.1%

        \[\leadsto y - \color{blue}{\frac{y \cdot z}{t}} \]
      5. associate-/l*71.3%

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
      6. *-commutative71.3%

        \[\leadsto y - \color{blue}{\frac{z}{t} \cdot y} \]
      7. associate-/r/71.3%

        \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y}}} \]
    15. Simplified71.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{+105}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -2.35 \cdot 10^{+56}:\\ \;\;\;\;\frac{x \cdot z}{t - a}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-49}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+61}:\\ \;\;\;\;x + z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 70.0% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.3999999999999999e117

    1. Initial program 26.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3999999999999999e117 < t < -6.9000000000000004e75

    1. Initial program 42.2%

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

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

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

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

    if -6.9000000000000004e75 < t < -1.26000000000000005e-49

    1. Initial program 74.0%

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

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

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

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

    if -1.26000000000000005e-49 < t < 6.49999999999999931e60

    1. Initial program 92.4%

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

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

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

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

    if 6.49999999999999931e60 < t

    1. Initial program 42.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      3. *-commutative49.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y + -1 \cdot \frac{y \cdot z}{t}} \]
    14. Step-by-step derivation
      1. mul-1-neg65.1%

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

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

        \[\leadsto \color{blue}{y - \frac{y}{t} \cdot z} \]
      4. associate-*l/65.1%

        \[\leadsto y - \color{blue}{\frac{y \cdot z}{t}} \]
      5. associate-/l*71.3%

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
      6. *-commutative71.3%

        \[\leadsto y - \color{blue}{\frac{z}{t} \cdot y} \]
      7. associate-/r/71.3%

        \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y}}} \]
    15. Simplified71.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{+117}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq -6.9 \cdot 10^{+75}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\ \mathbf{elif}\;t \leq -1.26 \cdot 10^{-49}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{+60}:\\ \;\;\;\;x + z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 51.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z}{a}\\ \mathbf{if}\;t \leq -4.8 \cdot 10^{+116}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.18 \cdot 10^{-197}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-303}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+96}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ z a)))))
   (if (<= t -4.8e+116)
     y
     (if (<= t -1.18e-197)
       t_1
       (if (<= t 1.4e-303) (* z (/ (- y x) a)) (if (<= t 4.5e+96) t_1 y))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (z / a));
	double tmp;
	if (t <= -4.8e+116) {
		tmp = y;
	} else if (t <= -1.18e-197) {
		tmp = t_1;
	} else if (t <= 1.4e-303) {
		tmp = z * ((y - x) / a);
	} else if (t <= 4.5e+96) {
		tmp = t_1;
	} 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 + (y * (z / a))
    if (t <= (-4.8d+116)) then
        tmp = y
    else if (t <= (-1.18d-197)) then
        tmp = t_1
    else if (t <= 1.4d-303) then
        tmp = z * ((y - x) / a)
    else if (t <= 4.5d+96) then
        tmp = t_1
    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 + (y * (z / a));
	double tmp;
	if (t <= -4.8e+116) {
		tmp = y;
	} else if (t <= -1.18e-197) {
		tmp = t_1;
	} else if (t <= 1.4e-303) {
		tmp = z * ((y - x) / a);
	} else if (t <= 4.5e+96) {
		tmp = t_1;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (z / a))
	tmp = 0
	if t <= -4.8e+116:
		tmp = y
	elif t <= -1.18e-197:
		tmp = t_1
	elif t <= 1.4e-303:
		tmp = z * ((y - x) / a)
	elif t <= 4.5e+96:
		tmp = t_1
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(z / a)))
	tmp = 0.0
	if (t <= -4.8e+116)
		tmp = y;
	elseif (t <= -1.18e-197)
		tmp = t_1;
	elseif (t <= 1.4e-303)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	elseif (t <= 4.5e+96)
		tmp = t_1;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * (z / a));
	tmp = 0.0;
	if (t <= -4.8e+116)
		tmp = y;
	elseif (t <= -1.18e-197)
		tmp = t_1;
	elseif (t <= 1.4e-303)
		tmp = z * ((y - x) / a);
	elseif (t <= 4.5e+96)
		tmp = t_1;
	else
		tmp = y;
	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[t, -4.8e+116], y, If[LessEqual[t, -1.18e-197], t$95$1, If[LessEqual[t, 1.4e-303], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e+96], t$95$1, y]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.18 \cdot 10^{-197}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 4.5 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.8000000000000001e116 or 4.49999999999999957e96 < t

    1. Initial program 34.0%

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

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

    if -4.8000000000000001e116 < t < -1.17999999999999995e-197 or 1.4e-303 < t < 4.49999999999999957e96

    1. Initial program 84.3%

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

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

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

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

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

    if -1.17999999999999995e-197 < t < 1.4e-303

    1. Initial program 95.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{+116}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.18 \cdot 10^{-197}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-303}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+96}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 79.8% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.99999999999999996e55 or 4.1e8 < t

    1. Initial program 42.1%

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

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

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

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

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

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

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

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

    if -8.99999999999999996e55 < t < -1.16e-48

    1. Initial program 86.0%

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

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

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

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

    if -1.16e-48 < t < 4.1e8

    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 89.9%

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

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

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

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

Alternative 17: 83.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+55} \lor \neg \left(t \leq 1.6 \cdot 10^{+60}\right):\\
\;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.2000000000000003e55 or 1.59999999999999995e60 < t

    1. Initial program 36.2%

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

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

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

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

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

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

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

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

    if -3.2000000000000003e55 < t < 1.59999999999999995e60

    1. Initial program 91.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{+55} \lor \neg \left(t \leq 1.6 \cdot 10^{+60}\right):\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 72.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+57} \lor \neg \left(z \leq 3.2 \cdot 10^{+153}\right):\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -2e+57) (not (<= z 3.2e+153)))
   (* z (/ (- x y) (- t a)))
   (+ x (* y (/ (- z t) (- a t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -2e+57) || !(z <= 3.2e+153)) {
		tmp = z * ((x - y) / (t - a));
	} else {
		tmp = x + (y * ((z - t) / (a - t)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-2d+57)) .or. (.not. (z <= 3.2d+153))) then
        tmp = z * ((x - y) / (t - a))
    else
        tmp = x + (y * ((z - t) / (a - t)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -2e+57) || !(z <= 3.2e+153)) {
		tmp = z * ((x - y) / (t - a));
	} else {
		tmp = x + (y * ((z - t) / (a - t)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -2e+57) or not (z <= 3.2e+153):
		tmp = z * ((x - y) / (t - a))
	else:
		tmp = x + (y * ((z - t) / (a - t)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -2e+57) || !(z <= 3.2e+153))
		tmp = Float64(z * Float64(Float64(x - y) / Float64(t - a)));
	else
		tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -2e+57) || ~((z <= 3.2e+153)))
		tmp = z * ((x - y) / (t - a));
	else
		tmp = x + (y * ((z - t) / (a - t)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2e+57], N[Not[LessEqual[z, 3.2e+153]], $MachinePrecision]], N[(z * N[(N[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+57} \lor \neg \left(z \leq 3.2 \cdot 10^{+153}\right):\\
\;\;\;\;z \cdot \frac{x - y}{t - a}\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.0000000000000001e57 or 3.2000000000000001e153 < z

    1. Initial program 80.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative80.5%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-/l*90.5%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. fma-define90.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified90.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. 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. associate-/r/90.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    6. Applied egg-rr90.4%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    7. Taylor expanded in z around inf 79.8%

      \[\leadsto \color{blue}{z \cdot \left(\frac{y}{a - t} - \frac{x}{a - t}\right)} \]
    8. Step-by-step derivation
      1. div-sub79.8%

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
    9. Simplified79.8%

      \[\leadsto \color{blue}{z \cdot \frac{y - x}{a - t}} \]

    if -2.0000000000000001e57 < z < 3.2000000000000001e153

    1. Initial program 66.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 60.9%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. associate-/l*69.1%

        \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    5. Simplified69.1%

      \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a - t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+57} \lor \neg \left(z \leq 3.2 \cdot 10^{+153}\right):\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 43.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{+28} \lor \neg \left(z \leq 3.5 \cdot 10^{+55}\right):\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -1.95e+28) (not (<= z 3.5e+55))) (* y (/ z (- a t))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.95e+28) || !(z <= 3.5e+55)) {
		tmp = y * (z / (a - t));
	} else {
		tmp = x + y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-1.95d+28)) .or. (.not. (z <= 3.5d+55))) then
        tmp = y * (z / (a - t))
    else
        tmp = x + y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.95e+28) || !(z <= 3.5e+55)) {
		tmp = y * (z / (a - t));
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.95e+28) or not (z <= 3.5e+55):
		tmp = y * (z / (a - t))
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1.95e+28) || !(z <= 3.5e+55))
		tmp = Float64(y * Float64(z / Float64(a - t)));
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -1.95e+28) || ~((z <= 3.5e+55)))
		tmp = y * (z / (a - t));
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.95e+28], N[Not[LessEqual[z, 3.5e+55]], $MachinePrecision]], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+28} \lor \neg \left(z \leq 3.5 \cdot 10^{+55}\right):\\
\;\;\;\;y \cdot \frac{z}{a - t}\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.9499999999999999e28 or 3.5000000000000001e55 < z

    1. Initial program 76.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative76.2%

        \[\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. associate-/r/90.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    6. Applied egg-rr90.5%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    7. Taylor expanded in y around inf 55.4%

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    8. Step-by-step derivation
      1. div-sub55.4%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
      2. associate-*r/44.9%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      3. *-commutative44.9%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot y}}{a - t} \]
      4. associate-*r/52.6%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
    9. Simplified52.6%

      \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
    10. Taylor expanded in z around inf 40.1%

      \[\leadsto \color{blue}{\frac{y \cdot z}{a - t}} \]
    11. Step-by-step derivation
      1. associate-/l*43.5%

        \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
    12. Simplified43.5%

      \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]

    if -1.9499999999999999e28 < z < 3.5000000000000001e55

    1. Initial program 66.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 60.3%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. *-commutative60.3%

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a - t} \]
    5. Simplified60.3%

      \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    6. Taylor expanded in t around inf 44.1%

      \[\leadsto \color{blue}{x + y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification43.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{+28} \lor \neg \left(z \leq 3.5 \cdot 10^{+55}\right):\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 44.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+25} \lor \neg \left(z \leq 2.5 \cdot 10^{+80}\right):\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -1.6e+25) (not (<= z 2.5e+80))) (* z (/ (- y x) a)) (+ x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.6e+25) || !(z <= 2.5e+80)) {
		tmp = z * ((y - x) / a);
	} else {
		tmp = x + y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-1.6d+25)) .or. (.not. (z <= 2.5d+80))) then
        tmp = z * ((y - x) / a)
    else
        tmp = x + y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.6e+25) || !(z <= 2.5e+80)) {
		tmp = z * ((y - x) / a);
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.6e+25) or not (z <= 2.5e+80):
		tmp = z * ((y - x) / a)
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1.6e+25) || !(z <= 2.5e+80))
		tmp = Float64(z * Float64(Float64(y - x) / a));
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -1.6e+25) || ~((z <= 2.5e+80)))
		tmp = z * ((y - x) / a);
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.6e+25], N[Not[LessEqual[z, 2.5e+80]], $MachinePrecision]], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+25} \lor \neg \left(z \leq 2.5 \cdot 10^{+80}\right):\\
\;\;\;\;z \cdot \frac{y - x}{a}\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.6e25 or 2.4999999999999998e80 < z

    1. Initial program 75.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 58.6%

      \[\leadsto x + \color{blue}{\frac{z \cdot \left(y - x\right)}{a}} \]
    4. Taylor expanded in z around inf 51.9%

      \[\leadsto \color{blue}{z \cdot \left(\frac{y}{a} - \frac{x}{a}\right)} \]
    5. Step-by-step derivation
      1. div-sub51.9%

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a}} \]
    6. Simplified51.9%

      \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} \]

    if -1.6e25 < z < 2.4999999999999998e80

    1. Initial program 67.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 60.4%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. *-commutative60.4%

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a - t} \]
    5. Simplified60.4%

      \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    6. Taylor expanded in t around inf 43.3%

      \[\leadsto \color{blue}{x + y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification47.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+25} \lor \neg \left(z \leq 2.5 \cdot 10^{+80}\right):\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 38.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.75 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-15}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{-37}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.75e+70)
   x
   (if (<= a -1.25e-15) (* z (/ y a)) (if (<= a 7.8e-37) y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.75e+70) {
		tmp = x;
	} else if (a <= -1.25e-15) {
		tmp = z * (y / a);
	} else if (a <= 7.8e-37) {
		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.75d+70)) then
        tmp = x
    else if (a <= (-1.25d-15)) then
        tmp = z * (y / a)
    else if (a <= 7.8d-37) 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.75e+70) {
		tmp = x;
	} else if (a <= -1.25e-15) {
		tmp = z * (y / a);
	} else if (a <= 7.8e-37) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.75e+70:
		tmp = x
	elif a <= -1.25e-15:
		tmp = z * (y / a)
	elif a <= 7.8e-37:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.75e+70)
		tmp = x;
	elseif (a <= -1.25e-15)
		tmp = Float64(z * Float64(y / a));
	elseif (a <= 7.8e-37)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.75e+70)
		tmp = x;
	elseif (a <= -1.25e-15)
		tmp = z * (y / a);
	elseif (a <= 7.8e-37)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.75e+70], x, If[LessEqual[a, -1.25e-15], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.8e-37], y, x]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.75 \cdot 10^{+70}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.25 \cdot 10^{-15}:\\
\;\;\;\;z \cdot \frac{y}{a}\\

\mathbf{elif}\;a \leq 7.8 \cdot 10^{-37}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.75000000000000001e70 or 7.79999999999999981e-37 < a

    1. Initial program 71.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 46.3%

      \[\leadsto \color{blue}{x} \]

    if -1.75000000000000001e70 < a < -1.25e-15

    1. Initial program 78.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative78.0%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-/l*84.9%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. fma-define84.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified84.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-num84.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/84.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    6. Applied egg-rr84.7%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    7. Taylor expanded in y around inf 70.6%

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    8. Step-by-step derivation
      1. div-sub70.6%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
      2. associate-*r/67.2%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      3. *-commutative67.2%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot y}}{a - t} \]
      4. associate-*r/67.1%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
    9. Simplified67.1%

      \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
    10. Taylor expanded in a around inf 51.0%

      \[\leadsto \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
    11. Taylor expanded in z around inf 48.1%

      \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
    12. Step-by-step derivation
      1. associate-*l/48.1%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative48.1%

        \[\leadsto \color{blue}{z \cdot \frac{y}{a}} \]
    13. Simplified48.1%

      \[\leadsto \color{blue}{z \cdot \frac{y}{a}} \]

    if -1.25e-15 < a < 7.79999999999999981e-37

    1. Initial program 68.8%

      \[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 3 regimes into one program.
  4. Final simplification41.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.75 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-15}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{-37}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 37.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+58}:\\ \;\;\;\;x \cdot \frac{z}{-a}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+83}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -5.2e+58)
   (* x (/ z (- a)))
   (if (<= z 3.2e+83) (+ x y) (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.2e+58) {
		tmp = x * (z / -a);
	} else if (z <= 3.2e+83) {
		tmp = x + y;
	} else {
		tmp = z * (y / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-5.2d+58)) then
        tmp = x * (z / -a)
    else if (z <= 3.2d+83) then
        tmp = x + y
    else
        tmp = z * (y / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.2e+58) {
		tmp = x * (z / -a);
	} else if (z <= 3.2e+83) {
		tmp = x + y;
	} else {
		tmp = z * (y / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -5.2e+58:
		tmp = x * (z / -a)
	elif z <= 3.2e+83:
		tmp = x + y
	else:
		tmp = z * (y / a)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -5.2e+58)
		tmp = Float64(x * Float64(z / Float64(-a)));
	elseif (z <= 3.2e+83)
		tmp = Float64(x + y);
	else
		tmp = Float64(z * Float64(y / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -5.2e+58)
		tmp = x * (z / -a);
	elseif (z <= 3.2e+83)
		tmp = x + y;
	else
		tmp = z * (y / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.2e+58], N[(x * N[(z / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+83], N[(x + y), $MachinePrecision], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+58}:\\
\;\;\;\;x \cdot \frac{z}{-a}\\

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+83}:\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.19999999999999976e58

    1. Initial program 74.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 46.7%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. associate-*r/46.7%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(x \cdot \left(z - t\right)\right)}{a - t}} \]
      2. mul-1-neg46.7%

        \[\leadsto x + \frac{\color{blue}{-x \cdot \left(z - t\right)}}{a - t} \]
      3. distribute-lft-neg-out46.7%

        \[\leadsto x + \frac{\color{blue}{\left(-x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. *-commutative46.7%

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot \left(-x\right)}}{a - t} \]
    5. Simplified46.7%

      \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot \left(-x\right)}{a - t}} \]
    6. Taylor expanded in a around inf 36.8%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot \left(z - t\right)}{a}} \]
    7. Step-by-step derivation
      1. mul-1-neg36.8%

        \[\leadsto x + \color{blue}{\left(-\frac{x \cdot \left(z - t\right)}{a}\right)} \]
      2. unsub-neg36.8%

        \[\leadsto \color{blue}{x - \frac{x \cdot \left(z - t\right)}{a}} \]
      3. associate-/l*37.0%

        \[\leadsto x - \color{blue}{x \cdot \frac{z - t}{a}} \]
    8. Simplified37.0%

      \[\leadsto \color{blue}{x - x \cdot \frac{z - t}{a}} \]
    9. Taylor expanded in z around inf 32.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{a}} \]
    10. Step-by-step derivation
      1. mul-1-neg32.9%

        \[\leadsto \color{blue}{-\frac{x \cdot z}{a}} \]
      2. associate-/l*33.1%

        \[\leadsto -\color{blue}{x \cdot \frac{z}{a}} \]
    11. Simplified33.1%

      \[\leadsto \color{blue}{-x \cdot \frac{z}{a}} \]

    if -5.19999999999999976e58 < z < 3.1999999999999999e83

    1. Initial program 66.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 60.8%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. *-commutative60.8%

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a - t} \]
    5. Simplified60.8%

      \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    6. Taylor expanded in t around inf 42.9%

      \[\leadsto \color{blue}{x + y} \]

    if 3.1999999999999999e83 < z

    1. Initial program 84.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative84.7%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-/l*93.5%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. fma-define93.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified93.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num93.6%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/93.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    6. Applied egg-rr93.5%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    7. Taylor expanded in y around inf 60.9%

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    8. Step-by-step derivation
      1. div-sub60.8%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
      2. associate-*r/52.8%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      3. *-commutative52.8%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot y}}{a - t} \]
      4. associate-*r/55.6%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
    9. Simplified55.6%

      \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
    10. Taylor expanded in a around inf 41.9%

      \[\leadsto \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
    11. Taylor expanded in z around inf 40.7%

      \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
    12. Step-by-step derivation
      1. associate-*l/42.0%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative42.0%

        \[\leadsto \color{blue}{z \cdot \frac{y}{a}} \]
    13. Simplified42.0%

      \[\leadsto \color{blue}{z \cdot \frac{y}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification40.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+58}:\\ \;\;\;\;x \cdot \frac{z}{-a}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+83}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 38.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+169}:\\ \;\;\;\;z \cdot \frac{y}{-t}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+83}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.3e+169)
   (* z (/ y (- t)))
   (if (<= z 2.9e+83) (+ x y) (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.3e+169) {
		tmp = z * (y / -t);
	} else if (z <= 2.9e+83) {
		tmp = x + y;
	} else {
		tmp = z * (y / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1.3d+169)) then
        tmp = z * (y / -t)
    else if (z <= 2.9d+83) then
        tmp = x + y
    else
        tmp = z * (y / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.3e+169) {
		tmp = z * (y / -t);
	} else if (z <= 2.9e+83) {
		tmp = x + y;
	} else {
		tmp = z * (y / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.3e+169:
		tmp = z * (y / -t)
	elif z <= 2.9e+83:
		tmp = x + y
	else:
		tmp = z * (y / a)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.3e+169)
		tmp = Float64(z * Float64(y / Float64(-t)));
	elseif (z <= 2.9e+83)
		tmp = Float64(x + y);
	else
		tmp = Float64(z * Float64(y / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.3e+169)
		tmp = z * (y / -t);
	elseif (z <= 2.9e+83)
		tmp = x + y;
	else
		tmp = z * (y / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.3e+169], N[(z * N[(y / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+83], N[(x + y), $MachinePrecision], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+169}:\\
\;\;\;\;z \cdot \frac{y}{-t}\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{+83}:\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3e169

    1. Initial program 77.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative77.3%

        \[\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.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/99.6%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    6. Applied egg-rr99.6%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    7. Taylor expanded in y around inf 52.4%

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    8. Step-by-step derivation
      1. div-sub52.4%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
      2. associate-*r/38.4%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      3. *-commutative38.4%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot y}}{a - t} \]
      4. associate-*r/48.3%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
    9. Simplified48.3%

      \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
    10. Taylor expanded in a around 0 53.1%

      \[\leadsto \left(z - t\right) \cdot \color{blue}{\left(-1 \cdot \frac{y}{t}\right)} \]
    11. Step-by-step derivation
      1. associate-*r/53.1%

        \[\leadsto \left(z - t\right) \cdot \color{blue}{\frac{-1 \cdot y}{t}} \]
      2. neg-mul-153.1%

        \[\leadsto \left(z - t\right) \cdot \frac{\color{blue}{-y}}{t} \]
    12. Simplified53.1%

      \[\leadsto \left(z - t\right) \cdot \color{blue}{\frac{-y}{t}} \]
    13. Taylor expanded in z around inf 41.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t}} \]
    14. Step-by-step derivation
      1. associate-*l/48.5%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{y}{t} \cdot z\right)} \]
      2. associate-*r*48.5%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{y}{t}\right) \cdot z} \]
      3. *-commutative48.5%

        \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \frac{y}{t}\right)} \]
      4. mul-1-neg48.5%

        \[\leadsto z \cdot \color{blue}{\left(-\frac{y}{t}\right)} \]
      5. distribute-frac-neg248.5%

        \[\leadsto z \cdot \color{blue}{\frac{y}{-t}} \]
    15. Simplified48.5%

      \[\leadsto \color{blue}{z \cdot \frac{y}{-t}} \]

    if -1.3e169 < z < 2.89999999999999999e83

    1. Initial program 67.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 57.6%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. *-commutative57.6%

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a - t} \]
    5. Simplified57.6%

      \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    6. Taylor expanded in t around inf 39.7%

      \[\leadsto \color{blue}{x + y} \]

    if 2.89999999999999999e83 < z

    1. Initial program 84.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative84.7%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-/l*93.5%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      3. fma-define93.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified93.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num93.6%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/93.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    6. Applied egg-rr93.5%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    7. Taylor expanded in y around inf 60.9%

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    8. Step-by-step derivation
      1. div-sub60.8%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
      2. associate-*r/52.8%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      3. *-commutative52.8%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot y}}{a - t} \]
      4. associate-*r/55.6%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
    9. Simplified55.6%

      \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
    10. Taylor expanded in a around inf 41.9%

      \[\leadsto \left(z - t\right) \cdot \color{blue}{\frac{y}{a}} \]
    11. Taylor expanded in z around inf 40.7%

      \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
    12. Step-by-step derivation
      1. associate-*l/42.0%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative42.0%

        \[\leadsto \color{blue}{z \cdot \frac{y}{a}} \]
    13. Simplified42.0%

      \[\leadsto \color{blue}{z \cdot \frac{y}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification41.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+169}:\\ \;\;\;\;z \cdot \frac{y}{-t}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+83}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 38.3% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{+116}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.35e+116) y (if (<= t 1.75e+18) x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.35e+116) {
		tmp = y;
	} else if (t <= 1.75e+18) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-1.35d+116)) then
        tmp = y
    else if (t <= 1.75d+18) then
        tmp = x
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.35e+116) {
		tmp = y;
	} else if (t <= 1.75e+18) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.35e+116:
		tmp = y
	elif t <= 1.75e+18:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.35e+116)
		tmp = y;
	elseif (t <= 1.75e+18)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -1.35e+116)
		tmp = y;
	elseif (t <= 1.75e+18)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.35e+116], y, If[LessEqual[t, 1.75e+18], x, y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{+116}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1.75 \cdot 10^{+18}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.35e116 or 1.75e18 < t

    1. Initial program 43.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 53.1%

      \[\leadsto \color{blue}{y} \]

    if -1.35e116 < t < 1.75e18

    1. Initial program 87.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 32.0%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{+116}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 2.8% accurate, 13.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
def code(x, y, z, t, a):
	return 0.0
function code(x, y, z, t, a)
	return 0.0
end
function tmp = code(x, y, z, t, a)
	tmp = 0.0;
end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 71.0%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in y around 0 40.3%

    \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}} \]
  4. Step-by-step derivation
    1. associate-*r/40.3%

      \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(x \cdot \left(z - t\right)\right)}{a - t}} \]
    2. mul-1-neg40.3%

      \[\leadsto x + \frac{\color{blue}{-x \cdot \left(z - t\right)}}{a - t} \]
    3. distribute-lft-neg-out40.3%

      \[\leadsto x + \frac{\color{blue}{\left(-x\right) \cdot \left(z - t\right)}}{a - t} \]
    4. *-commutative40.3%

      \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot \left(-x\right)}}{a - t} \]
  5. Simplified40.3%

    \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot \left(-x\right)}{a - t}} \]
  6. Taylor expanded in t around inf 2.8%

    \[\leadsto \color{blue}{x + -1 \cdot x} \]
  7. Step-by-step derivation
    1. distribute-rgt1-in2.8%

      \[\leadsto \color{blue}{\left(-1 + 1\right) \cdot x} \]
    2. metadata-eval2.8%

      \[\leadsto \color{blue}{0} \cdot x \]
    3. mul0-lft2.8%

      \[\leadsto \color{blue}{0} \]
  8. Simplified2.8%

    \[\leadsto \color{blue}{0} \]
  9. Final simplification2.8%

    \[\leadsto 0 \]
  10. Add Preprocessing

Alternative 26: 25.4% 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 71.0%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in a around inf 24.3%

    \[\leadsto \color{blue}{x} \]
  4. Final simplification24.3%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 86.7% 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 2024130 
(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))))