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

Percentage Accurate: 68.1% → 91.1%
Time: 28.5s
Alternatives: 24
Speedup: 0.8×

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 24 alternatives:

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

Initial Program: 68.1% 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: 91.1% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - x}{a - t}\\ t_2 := x - \frac{\left(y - x\right) \cdot \left(t - z\right)}{a - t}\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{+284}:\\ \;\;\;\;\mathsf{fma}\left(t_1, z - t, x\right)\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{-294}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;t_2 \leq 10^{+299}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - t\right) \cdot t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- y x) (- a t))) (t_2 (- x (/ (* (- y x) (- t z)) (- a t)))))
   (if (<= t_2 -1e+284)
     (fma t_1 (- z t) x)
     (if (<= t_2 -2e-294)
       t_2
       (if (<= t_2 0.0)
         (+ y (/ (* (- y x) (- a z)) t))
         (if (<= t_2 1e+299) t_2 (+ x (* (- z t) t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - x) / (a - t);
	double t_2 = x - (((y - x) * (t - z)) / (a - t));
	double tmp;
	if (t_2 <= -1e+284) {
		tmp = fma(t_1, (z - t), x);
	} else if (t_2 <= -2e-294) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = y + (((y - x) * (a - z)) / t);
	} else if (t_2 <= 1e+299) {
		tmp = t_2;
	} else {
		tmp = x + ((z - t) * t_1);
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - x) / Float64(a - t))
	t_2 = Float64(x - Float64(Float64(Float64(y - x) * Float64(t - z)) / Float64(a - t)))
	tmp = 0.0
	if (t_2 <= -1e+284)
		tmp = fma(t_1, Float64(z - t), x);
	elseif (t_2 <= -2e-294)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t));
	elseif (t_2 <= 1e+299)
		tmp = t_2;
	else
		tmp = Float64(x + Float64(Float64(z - t) * t_1));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(y - x), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+284], N[(t$95$1 * N[(z - t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, -2e-294], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+299], t$95$2, N[(x + N[(N[(z - t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-294}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t_2 \leq 10^{+299}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.00000000000000008e284

    1. Initial program 43.0%

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

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

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

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

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

    if -1.00000000000000008e284 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.00000000000000003e-294 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 1.0000000000000001e299

    1. Initial program 96.9%

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

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

    1. Initial program 4.8%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. 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}} \]
    6. 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. distribute-lft-out--99.8%

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

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

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

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

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

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

    if 1.0000000000000001e299 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 29.3%

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

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

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

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

Alternative 2: 91.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ t_2 := x - \frac{\left(y - x\right) \cdot \left(t - z\right)}{a - t}\\ \mathbf{if}\;t_2 \leq -2 \cdot 10^{+289}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{-294}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;t_2 \leq 10^{+299}:\\ \;\;\;\;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) (- a t)))))
        (t_2 (- x (/ (* (- y x) (- t z)) (- a t)))))
   (if (<= t_2 -2e+289)
     t_1
     (if (<= t_2 -2e-294)
       t_2
       (if (<= t_2 0.0)
         (+ y (/ (* (- y x) (- a z)) t))
         (if (<= t_2 1e+299) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((z - t) * ((y - x) / (a - t)));
	double t_2 = x - (((y - x) * (t - z)) / (a - t));
	double tmp;
	if (t_2 <= -2e+289) {
		tmp = t_1;
	} else if (t_2 <= -2e-294) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = y + (((y - x) * (a - z)) / t);
	} else if (t_2 <= 1e+299) {
		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) / (a - t)))
    t_2 = x - (((y - x) * (t - z)) / (a - t))
    if (t_2 <= (-2d+289)) then
        tmp = t_1
    else if (t_2 <= (-2d-294)) then
        tmp = t_2
    else if (t_2 <= 0.0d0) then
        tmp = y + (((y - x) * (a - z)) / t)
    else if (t_2 <= 1d+299) 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) / (a - t)));
	double t_2 = x - (((y - x) * (t - z)) / (a - t));
	double tmp;
	if (t_2 <= -2e+289) {
		tmp = t_1;
	} else if (t_2 <= -2e-294) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = y + (((y - x) * (a - z)) / t);
	} else if (t_2 <= 1e+299) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((z - t) * ((y - x) / (a - t)))
	t_2 = x - (((y - x) * (t - z)) / (a - t))
	tmp = 0
	if t_2 <= -2e+289:
		tmp = t_1
	elif t_2 <= -2e-294:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = y + (((y - x) * (a - z)) / t)
	elif t_2 <= 1e+299:
		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(a - t))))
	t_2 = Float64(x - Float64(Float64(Float64(y - x) * Float64(t - z)) / Float64(a - t)))
	tmp = 0.0
	if (t_2 <= -2e+289)
		tmp = t_1;
	elseif (t_2 <= -2e-294)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t));
	elseif (t_2 <= 1e+299)
		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) / (a - t)));
	t_2 = x - (((y - x) * (t - z)) / (a - t));
	tmp = 0.0;
	if (t_2 <= -2e+289)
		tmp = t_1;
	elseif (t_2 <= -2e-294)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = y + (((y - x) * (a - z)) / t);
	elseif (t_2 <= 1e+299)
		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[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(y - x), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+289], t$95$1, If[LessEqual[t$95$2, -2e-294], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+299], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-294}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t_2 \leq 10^{+299}:\\
\;\;\;\;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))) < -2.0000000000000001e289 or 1.0000000000000001e299 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 36.7%

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

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

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

    if -2.0000000000000001e289 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.00000000000000003e-294 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 1.0000000000000001e299

    1. Initial program 96.9%

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

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

    1. Initial program 4.8%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. 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}} \]
    6. 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. distribute-lft-out--99.8%

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

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

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

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

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

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

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

Alternative 3: 48.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;t \leq -6.2 \cdot 10^{+179}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{+70}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;t \leq -7.4 \cdot 10^{+31}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-275}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-131}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-36}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{-11}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{+129}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a)))))
   (if (<= t -6.2e+179)
     y
     (if (<= t -3.7e+70)
       (/ z (/ t x))
       (if (<= t -7.4e+31)
         (+ x y)
         (if (<= t 4.2e-275)
           t_1
           (if (<= t 8e-131)
             (+ x (/ y (/ a z)))
             (if (<= t 2.1e-36)
               t_1
               (if (<= t 1.95e-11)
                 (* y (/ z (- a t)))
                 (if (<= t 6.6e+129) t_1 y))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double tmp;
	if (t <= -6.2e+179) {
		tmp = y;
	} else if (t <= -3.7e+70) {
		tmp = z / (t / x);
	} else if (t <= -7.4e+31) {
		tmp = x + y;
	} else if (t <= 4.2e-275) {
		tmp = t_1;
	} else if (t <= 8e-131) {
		tmp = x + (y / (a / z));
	} else if (t <= 2.1e-36) {
		tmp = t_1;
	} else if (t <= 1.95e-11) {
		tmp = y * (z / (a - t));
	} else if (t <= 6.6e+129) {
		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 * (1.0d0 - (z / a))
    if (t <= (-6.2d+179)) then
        tmp = y
    else if (t <= (-3.7d+70)) then
        tmp = z / (t / x)
    else if (t <= (-7.4d+31)) then
        tmp = x + y
    else if (t <= 4.2d-275) then
        tmp = t_1
    else if (t <= 8d-131) then
        tmp = x + (y / (a / z))
    else if (t <= 2.1d-36) then
        tmp = t_1
    else if (t <= 1.95d-11) then
        tmp = y * (z / (a - t))
    else if (t <= 6.6d+129) 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 * (1.0 - (z / a));
	double tmp;
	if (t <= -6.2e+179) {
		tmp = y;
	} else if (t <= -3.7e+70) {
		tmp = z / (t / x);
	} else if (t <= -7.4e+31) {
		tmp = x + y;
	} else if (t <= 4.2e-275) {
		tmp = t_1;
	} else if (t <= 8e-131) {
		tmp = x + (y / (a / z));
	} else if (t <= 2.1e-36) {
		tmp = t_1;
	} else if (t <= 1.95e-11) {
		tmp = y * (z / (a - t));
	} else if (t <= 6.6e+129) {
		tmp = t_1;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	tmp = 0
	if t <= -6.2e+179:
		tmp = y
	elif t <= -3.7e+70:
		tmp = z / (t / x)
	elif t <= -7.4e+31:
		tmp = x + y
	elif t <= 4.2e-275:
		tmp = t_1
	elif t <= 8e-131:
		tmp = x + (y / (a / z))
	elif t <= 2.1e-36:
		tmp = t_1
	elif t <= 1.95e-11:
		tmp = y * (z / (a - t))
	elif t <= 6.6e+129:
		tmp = t_1
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (t <= -6.2e+179)
		tmp = y;
	elseif (t <= -3.7e+70)
		tmp = Float64(z / Float64(t / x));
	elseif (t <= -7.4e+31)
		tmp = Float64(x + y);
	elseif (t <= 4.2e-275)
		tmp = t_1;
	elseif (t <= 8e-131)
		tmp = Float64(x + Float64(y / Float64(a / z)));
	elseif (t <= 2.1e-36)
		tmp = t_1;
	elseif (t <= 1.95e-11)
		tmp = Float64(y * Float64(z / Float64(a - t)));
	elseif (t <= 6.6e+129)
		tmp = t_1;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (t <= -6.2e+179)
		tmp = y;
	elseif (t <= -3.7e+70)
		tmp = z / (t / x);
	elseif (t <= -7.4e+31)
		tmp = x + y;
	elseif (t <= 4.2e-275)
		tmp = t_1;
	elseif (t <= 8e-131)
		tmp = x + (y / (a / z));
	elseif (t <= 2.1e-36)
		tmp = t_1;
	elseif (t <= 1.95e-11)
		tmp = y * (z / (a - t));
	elseif (t <= 6.6e+129)
		tmp = t_1;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e+179], y, If[LessEqual[t, -3.7e+70], N[(z / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.4e+31], N[(x + y), $MachinePrecision], If[LessEqual[t, 4.2e-275], t$95$1, If[LessEqual[t, 8e-131], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e-36], t$95$1, If[LessEqual[t, 1.95e-11], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.6e+129], t$95$1, y]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -3.7 \cdot 10^{+70}:\\
\;\;\;\;\frac{z}{\frac{t}{x}}\\

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

\mathbf{elif}\;t \leq 4.2 \cdot 10^{-275}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2.1 \cdot 10^{-36}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 6.6 \cdot 10^{+129}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -6.2e179 or 6.5999999999999998e129 < t

    1. Initial program 35.4%

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

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

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

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

    if -6.2e179 < t < -3.69999999999999989e70

    1. Initial program 46.7%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    7. Simplified45.3%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{a \cdot x}{t} + -1 \cdot \frac{a \cdot \left(-1 \cdot \left(x \cdot z\right) - -1 \cdot \left(a \cdot x\right)\right)}{{t}^{2}}\right) - -1 \cdot \frac{x \cdot z}{t}} \]
    9. Step-by-step derivation
      1. distribute-lft-out32.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    12. Step-by-step derivation
      1. *-commutative26.7%

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    13. Simplified41.6%

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

    if -3.69999999999999989e70 < t < -7.3999999999999996e31

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.3999999999999996e31 < t < 4.19999999999999976e-275 or 7.9999999999999999e-131 < t < 2.09999999999999991e-36 or 1.95000000000000005e-11 < t < 6.5999999999999998e129

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

    if 4.19999999999999976e-275 < t < 7.9999999999999999e-131

    1. Initial program 96.3%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    8. Simplified74.4%

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

    if 2.09999999999999991e-36 < t < 1.95000000000000005e-11

    1. Initial program 71.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.2 \cdot 10^{+179}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{+70}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;t \leq -7.4 \cdot 10^{+31}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-275}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-131}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{-11}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{+129}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 48.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;t \leq -3.6 \cdot 10^{+180}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{+70}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;t \leq -5.3 \cdot 10^{+35}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-275}:\\ \;\;\;\;x - \frac{x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-130}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-36}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-11}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+131}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a)))))
   (if (<= t -3.6e+180)
     y
     (if (<= t -7.2e+70)
       (/ z (/ t x))
       (if (<= t -5.3e+35)
         (+ x y)
         (if (<= t 2.1e-275)
           (- x (/ x (/ a z)))
           (if (<= t 3.4e-130)
             (+ x (/ y (/ a z)))
             (if (<= t 2.1e-36)
               t_1
               (if (<= t 2.5e-11)
                 (* y (/ z (- a t)))
                 (if (<= t 4.5e+131) t_1 y))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double tmp;
	if (t <= -3.6e+180) {
		tmp = y;
	} else if (t <= -7.2e+70) {
		tmp = z / (t / x);
	} else if (t <= -5.3e+35) {
		tmp = x + y;
	} else if (t <= 2.1e-275) {
		tmp = x - (x / (a / z));
	} else if (t <= 3.4e-130) {
		tmp = x + (y / (a / z));
	} else if (t <= 2.1e-36) {
		tmp = t_1;
	} else if (t <= 2.5e-11) {
		tmp = y * (z / (a - t));
	} else if (t <= 4.5e+131) {
		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 * (1.0d0 - (z / a))
    if (t <= (-3.6d+180)) then
        tmp = y
    else if (t <= (-7.2d+70)) then
        tmp = z / (t / x)
    else if (t <= (-5.3d+35)) then
        tmp = x + y
    else if (t <= 2.1d-275) then
        tmp = x - (x / (a / z))
    else if (t <= 3.4d-130) then
        tmp = x + (y / (a / z))
    else if (t <= 2.1d-36) then
        tmp = t_1
    else if (t <= 2.5d-11) then
        tmp = y * (z / (a - t))
    else if (t <= 4.5d+131) 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 * (1.0 - (z / a));
	double tmp;
	if (t <= -3.6e+180) {
		tmp = y;
	} else if (t <= -7.2e+70) {
		tmp = z / (t / x);
	} else if (t <= -5.3e+35) {
		tmp = x + y;
	} else if (t <= 2.1e-275) {
		tmp = x - (x / (a / z));
	} else if (t <= 3.4e-130) {
		tmp = x + (y / (a / z));
	} else if (t <= 2.1e-36) {
		tmp = t_1;
	} else if (t <= 2.5e-11) {
		tmp = y * (z / (a - t));
	} else if (t <= 4.5e+131) {
		tmp = t_1;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	tmp = 0
	if t <= -3.6e+180:
		tmp = y
	elif t <= -7.2e+70:
		tmp = z / (t / x)
	elif t <= -5.3e+35:
		tmp = x + y
	elif t <= 2.1e-275:
		tmp = x - (x / (a / z))
	elif t <= 3.4e-130:
		tmp = x + (y / (a / z))
	elif t <= 2.1e-36:
		tmp = t_1
	elif t <= 2.5e-11:
		tmp = y * (z / (a - t))
	elif t <= 4.5e+131:
		tmp = t_1
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (t <= -3.6e+180)
		tmp = y;
	elseif (t <= -7.2e+70)
		tmp = Float64(z / Float64(t / x));
	elseif (t <= -5.3e+35)
		tmp = Float64(x + y);
	elseif (t <= 2.1e-275)
		tmp = Float64(x - Float64(x / Float64(a / z)));
	elseif (t <= 3.4e-130)
		tmp = Float64(x + Float64(y / Float64(a / z)));
	elseif (t <= 2.1e-36)
		tmp = t_1;
	elseif (t <= 2.5e-11)
		tmp = Float64(y * Float64(z / Float64(a - t)));
	elseif (t <= 4.5e+131)
		tmp = t_1;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (t <= -3.6e+180)
		tmp = y;
	elseif (t <= -7.2e+70)
		tmp = z / (t / x);
	elseif (t <= -5.3e+35)
		tmp = x + y;
	elseif (t <= 2.1e-275)
		tmp = x - (x / (a / z));
	elseif (t <= 3.4e-130)
		tmp = x + (y / (a / z));
	elseif (t <= 2.1e-36)
		tmp = t_1;
	elseif (t <= 2.5e-11)
		tmp = y * (z / (a - t));
	elseif (t <= 4.5e+131)
		tmp = t_1;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.6e+180], y, If[LessEqual[t, -7.2e+70], N[(z / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.3e+35], N[(x + y), $MachinePrecision], If[LessEqual[t, 2.1e-275], N[(x - N[(x / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-130], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e-36], t$95$1, If[LessEqual[t, 2.5e-11], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e+131], t$95$1, y]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -7.2 \cdot 10^{+70}:\\
\;\;\;\;\frac{z}{\frac{t}{x}}\\

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

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

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

\mathbf{elif}\;t \leq 2.1 \cdot 10^{-36}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 4.5 \cdot 10^{+131}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if t < -3.6000000000000002e180 or 4.5000000000000002e131 < t

    1. Initial program 35.4%

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

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

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

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

    if -3.6000000000000002e180 < t < -7.1999999999999999e70

    1. Initial program 46.7%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    7. Simplified45.3%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{a \cdot x}{t} + -1 \cdot \frac{a \cdot \left(-1 \cdot \left(x \cdot z\right) - -1 \cdot \left(a \cdot x\right)\right)}{{t}^{2}}\right) - -1 \cdot \frac{x \cdot z}{t}} \]
    9. Step-by-step derivation
      1. distribute-lft-out32.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    12. Step-by-step derivation
      1. *-commutative26.7%

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    13. Simplified41.6%

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

    if -7.1999999999999999e70 < t < -5.30000000000000009e35

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.30000000000000009e35 < t < 2.09999999999999988e-275

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

    if 2.09999999999999988e-275 < t < 3.40000000000000005e-130

    1. Initial program 96.3%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    8. Simplified74.4%

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

    if 3.40000000000000005e-130 < t < 2.09999999999999991e-36 or 2.50000000000000009e-11 < t < 4.5000000000000002e131

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

    if 2.09999999999999991e-36 < t < 2.50000000000000009e-11

    1. Initial program 71.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{+180}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{+70}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;t \leq -5.3 \cdot 10^{+35}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-275}:\\ \;\;\;\;x - \frac{x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-130}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-11}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+131}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 47.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.75 \cdot 10^{+181}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{+69}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{+30}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-277}:\\ \;\;\;\;x - \frac{x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{-135}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-6}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+131}:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.75e+181)
   y
   (if (<= t -2.6e+69)
     (/ z (/ t x))
     (if (<= t -4.1e+30)
       (+ x y)
       (if (<= t 4.1e-277)
         (- x (/ x (/ a z)))
         (if (<= t 5.1e-135)
           (+ x (/ y (/ a z)))
           (if (<= t 1.3e-36)
             (* x (- 1.0 (/ z a)))
             (if (<= t 7.8e-6)
               (* y (/ z (- a t)))
               (if (<= t 7e+131) (/ (* x (- z a)) t) y)))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.75e+181) {
		tmp = y;
	} else if (t <= -2.6e+69) {
		tmp = z / (t / x);
	} else if (t <= -4.1e+30) {
		tmp = x + y;
	} else if (t <= 4.1e-277) {
		tmp = x - (x / (a / z));
	} else if (t <= 5.1e-135) {
		tmp = x + (y / (a / z));
	} else if (t <= 1.3e-36) {
		tmp = x * (1.0 - (z / a));
	} else if (t <= 7.8e-6) {
		tmp = y * (z / (a - t));
	} else if (t <= 7e+131) {
		tmp = (x * (z - a)) / t;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-1.75d+181)) then
        tmp = y
    else if (t <= (-2.6d+69)) then
        tmp = z / (t / x)
    else if (t <= (-4.1d+30)) then
        tmp = x + y
    else if (t <= 4.1d-277) then
        tmp = x - (x / (a / z))
    else if (t <= 5.1d-135) then
        tmp = x + (y / (a / z))
    else if (t <= 1.3d-36) then
        tmp = x * (1.0d0 - (z / a))
    else if (t <= 7.8d-6) then
        tmp = y * (z / (a - t))
    else if (t <= 7d+131) then
        tmp = (x * (z - a)) / t
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.75e+181) {
		tmp = y;
	} else if (t <= -2.6e+69) {
		tmp = z / (t / x);
	} else if (t <= -4.1e+30) {
		tmp = x + y;
	} else if (t <= 4.1e-277) {
		tmp = x - (x / (a / z));
	} else if (t <= 5.1e-135) {
		tmp = x + (y / (a / z));
	} else if (t <= 1.3e-36) {
		tmp = x * (1.0 - (z / a));
	} else if (t <= 7.8e-6) {
		tmp = y * (z / (a - t));
	} else if (t <= 7e+131) {
		tmp = (x * (z - a)) / t;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.75e+181:
		tmp = y
	elif t <= -2.6e+69:
		tmp = z / (t / x)
	elif t <= -4.1e+30:
		tmp = x + y
	elif t <= 4.1e-277:
		tmp = x - (x / (a / z))
	elif t <= 5.1e-135:
		tmp = x + (y / (a / z))
	elif t <= 1.3e-36:
		tmp = x * (1.0 - (z / a))
	elif t <= 7.8e-6:
		tmp = y * (z / (a - t))
	elif t <= 7e+131:
		tmp = (x * (z - a)) / t
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.75e+181)
		tmp = y;
	elseif (t <= -2.6e+69)
		tmp = Float64(z / Float64(t / x));
	elseif (t <= -4.1e+30)
		tmp = Float64(x + y);
	elseif (t <= 4.1e-277)
		tmp = Float64(x - Float64(x / Float64(a / z)));
	elseif (t <= 5.1e-135)
		tmp = Float64(x + Float64(y / Float64(a / z)));
	elseif (t <= 1.3e-36)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	elseif (t <= 7.8e-6)
		tmp = Float64(y * Float64(z / Float64(a - t)));
	elseif (t <= 7e+131)
		tmp = Float64(Float64(x * Float64(z - a)) / t);
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -1.75e+181)
		tmp = y;
	elseif (t <= -2.6e+69)
		tmp = z / (t / x);
	elseif (t <= -4.1e+30)
		tmp = x + y;
	elseif (t <= 4.1e-277)
		tmp = x - (x / (a / z));
	elseif (t <= 5.1e-135)
		tmp = x + (y / (a / z));
	elseif (t <= 1.3e-36)
		tmp = x * (1.0 - (z / a));
	elseif (t <= 7.8e-6)
		tmp = y * (z / (a - t));
	elseif (t <= 7e+131)
		tmp = (x * (z - a)) / t;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.75e+181], y, If[LessEqual[t, -2.6e+69], N[(z / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.1e+30], N[(x + y), $MachinePrecision], If[LessEqual[t, 4.1e-277], N[(x - N[(x / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.1e-135], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-36], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-6], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+131], N[(N[(x * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], y]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2.6 \cdot 10^{+69}:\\
\;\;\;\;\frac{z}{\frac{t}{x}}\\

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if t < -1.75000000000000004e181 or 6.9999999999999998e131 < t

    1. Initial program 35.4%

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

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

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

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

    if -1.75000000000000004e181 < t < -2.6000000000000002e69

    1. Initial program 46.7%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    7. Simplified45.3%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{a \cdot x}{t} + -1 \cdot \frac{a \cdot \left(-1 \cdot \left(x \cdot z\right) - -1 \cdot \left(a \cdot x\right)\right)}{{t}^{2}}\right) - -1 \cdot \frac{x \cdot z}{t}} \]
    9. Step-by-step derivation
      1. distribute-lft-out32.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    12. Step-by-step derivation
      1. *-commutative26.7%

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    13. Simplified41.6%

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

    if -2.6000000000000002e69 < t < -4.10000000000000005e30

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.10000000000000005e30 < t < 4.09999999999999989e-277

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

    if 4.09999999999999989e-277 < t < 5.1000000000000001e-135

    1. Initial program 96.3%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    8. Simplified74.4%

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

    if 5.1000000000000001e-135 < t < 1.3e-36

    1. Initial program 78.9%

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

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

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

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

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

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

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

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

    if 1.3e-36 < t < 7.7999999999999999e-6

    1. Initial program 73.9%

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

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

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

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

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

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

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

    if 7.7999999999999999e-6 < t < 6.9999999999999998e131

    1. Initial program 61.1%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    7. Simplified51.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(x \cdot z\right)}{t}} \]
    12. Step-by-step derivation
      1. distribute-lft-out--48.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.75 \cdot 10^{+181}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{+69}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{+30}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-277}:\\ \;\;\;\;x - \frac{x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{-135}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-6}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+131}:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 51.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - z}{t}\\ t_2 := x + \frac{y}{\frac{a}{z}}\\ \mathbf{if}\;a \leq -1.8 \cdot 10^{+163}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-38}:\\ \;\;\;\;x - \frac{x}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-208}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-262}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-239}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-185}:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{+25}:\\ \;\;\;\;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 (/ a z)))))
   (if (<= a -1.8e+163)
     t_2
     (if (<= a -1.9e-38)
       (- x (/ x (/ a z)))
       (if (<= a -2.3e-208)
         t_1
         (if (<= a -2.8e-262)
           (/ x (/ t z))
           (if (<= a 3.2e-239)
             t_1
             (if (<= a 2.7e-185)
               (/ (* x (- z a)) t)
               (if (<= a 3e+25) 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 / (a / z));
	double tmp;
	if (a <= -1.8e+163) {
		tmp = t_2;
	} else if (a <= -1.9e-38) {
		tmp = x - (x / (a / z));
	} else if (a <= -2.3e-208) {
		tmp = t_1;
	} else if (a <= -2.8e-262) {
		tmp = x / (t / z);
	} else if (a <= 3.2e-239) {
		tmp = t_1;
	} else if (a <= 2.7e-185) {
		tmp = (x * (z - a)) / t;
	} else if (a <= 3e+25) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((t - z) / t)
    t_2 = x + (y / (a / z))
    if (a <= (-1.8d+163)) then
        tmp = t_2
    else if (a <= (-1.9d-38)) then
        tmp = x - (x / (a / z))
    else if (a <= (-2.3d-208)) then
        tmp = t_1
    else if (a <= (-2.8d-262)) then
        tmp = x / (t / z)
    else if (a <= 3.2d-239) then
        tmp = t_1
    else if (a <= 2.7d-185) then
        tmp = (x * (z - a)) / t
    else if (a <= 3d+25) 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 / (a / z));
	double tmp;
	if (a <= -1.8e+163) {
		tmp = t_2;
	} else if (a <= -1.9e-38) {
		tmp = x - (x / (a / z));
	} else if (a <= -2.3e-208) {
		tmp = t_1;
	} else if (a <= -2.8e-262) {
		tmp = x / (t / z);
	} else if (a <= 3.2e-239) {
		tmp = t_1;
	} else if (a <= 2.7e-185) {
		tmp = (x * (z - a)) / t;
	} else if (a <= 3e+25) {
		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 / (a / z))
	tmp = 0
	if a <= -1.8e+163:
		tmp = t_2
	elif a <= -1.9e-38:
		tmp = x - (x / (a / z))
	elif a <= -2.3e-208:
		tmp = t_1
	elif a <= -2.8e-262:
		tmp = x / (t / z)
	elif a <= 3.2e-239:
		tmp = t_1
	elif a <= 2.7e-185:
		tmp = (x * (z - a)) / t
	elif a <= 3e+25:
		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(a / z)))
	tmp = 0.0
	if (a <= -1.8e+163)
		tmp = t_2;
	elseif (a <= -1.9e-38)
		tmp = Float64(x - Float64(x / Float64(a / z)));
	elseif (a <= -2.3e-208)
		tmp = t_1;
	elseif (a <= -2.8e-262)
		tmp = Float64(x / Float64(t / z));
	elseif (a <= 3.2e-239)
		tmp = t_1;
	elseif (a <= 2.7e-185)
		tmp = Float64(Float64(x * Float64(z - a)) / t);
	elseif (a <= 3e+25)
		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 / (a / z));
	tmp = 0.0;
	if (a <= -1.8e+163)
		tmp = t_2;
	elseif (a <= -1.9e-38)
		tmp = x - (x / (a / z));
	elseif (a <= -2.3e-208)
		tmp = t_1;
	elseif (a <= -2.8e-262)
		tmp = x / (t / z);
	elseif (a <= 3.2e-239)
		tmp = t_1;
	elseif (a <= 2.7e-185)
		tmp = (x * (z - a)) / t;
	elseif (a <= 3e+25)
		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[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.8e+163], t$95$2, If[LessEqual[a, -1.9e-38], N[(x - N[(x / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.3e-208], t$95$1, If[LessEqual[a, -2.8e-262], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e-239], t$95$1, If[LessEqual[a, 2.7e-185], N[(N[(x * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[a, 3e+25], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -2.3 \cdot 10^{-208}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 3.2 \cdot 10^{-239}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 3 \cdot 10^{+25}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.79999999999999989e163 or 3.00000000000000006e25 < a

    1. Initial program 72.8%

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

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

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

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

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

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

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

    if -1.79999999999999989e163 < a < -1.9e-38

    1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

    if -1.9e-38 < a < -2.29999999999999997e-208 or -2.79999999999999975e-262 < a < 3.1999999999999999e-239 or 2.69999999999999988e-185 < a < 3.00000000000000006e25

    1. Initial program 59.1%

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

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

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

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

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

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

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

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

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

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

    if -2.29999999999999997e-208 < a < -2.79999999999999975e-262

    1. Initial program 51.7%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    7. Simplified23.5%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(x \cdot z\right)}{t}} \]
    12. Step-by-step derivation
      1. distribute-lft-out--70.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    16. Simplified71.0%

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

    if 3.1999999999999999e-239 < a < 2.69999999999999988e-185

    1. Initial program 66.7%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    7. Simplified51.8%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{a \cdot x}{t} + -1 \cdot \frac{a \cdot \left(-1 \cdot \left(x \cdot z\right) - -1 \cdot \left(a \cdot x\right)\right)}{{t}^{2}}\right) - -1 \cdot \frac{x \cdot z}{t}} \]
    9. Step-by-step derivation
      1. distribute-lft-out67.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(x \cdot z\right)}{t}} \]
    12. Step-by-step derivation
      1. distribute-lft-out--67.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{+163}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-38}:\\ \;\;\;\;x - \frac{x}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-208}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-262}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-239}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-185}:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{+25}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 51.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - z}{t}\\ t_2 := x + \frac{y}{\frac{a}{z}}\\ t_3 := \frac{z \cdot \left(-x\right)}{a - t}\\ \mathbf{if}\;a \leq -2 \cdot 10^{+164}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-43}:\\ \;\;\;\;x - \frac{x}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-207}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-262}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-239}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-158}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 2 \cdot 10^{+26}:\\ \;\;\;\;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 (/ a z))))
        (t_3 (/ (* z (- x)) (- a t))))
   (if (<= a -2e+164)
     t_2
     (if (<= a -2.1e-43)
       (- x (/ x (/ a z)))
       (if (<= a -1.25e-207)
         t_1
         (if (<= a -2.6e-262)
           t_3
           (if (<= a 4.4e-239)
             t_1
             (if (<= a 2.1e-158) t_3 (if (<= a 2e+26) 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 / (a / z));
	double t_3 = (z * -x) / (a - t);
	double tmp;
	if (a <= -2e+164) {
		tmp = t_2;
	} else if (a <= -2.1e-43) {
		tmp = x - (x / (a / z));
	} else if (a <= -1.25e-207) {
		tmp = t_1;
	} else if (a <= -2.6e-262) {
		tmp = t_3;
	} else if (a <= 4.4e-239) {
		tmp = t_1;
	} else if (a <= 2.1e-158) {
		tmp = t_3;
	} else if (a <= 2e+26) {
		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 / (a / z))
    t_3 = (z * -x) / (a - t)
    if (a <= (-2d+164)) then
        tmp = t_2
    else if (a <= (-2.1d-43)) then
        tmp = x - (x / (a / z))
    else if (a <= (-1.25d-207)) then
        tmp = t_1
    else if (a <= (-2.6d-262)) then
        tmp = t_3
    else if (a <= 4.4d-239) then
        tmp = t_1
    else if (a <= 2.1d-158) then
        tmp = t_3
    else if (a <= 2d+26) 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 / (a / z));
	double t_3 = (z * -x) / (a - t);
	double tmp;
	if (a <= -2e+164) {
		tmp = t_2;
	} else if (a <= -2.1e-43) {
		tmp = x - (x / (a / z));
	} else if (a <= -1.25e-207) {
		tmp = t_1;
	} else if (a <= -2.6e-262) {
		tmp = t_3;
	} else if (a <= 4.4e-239) {
		tmp = t_1;
	} else if (a <= 2.1e-158) {
		tmp = t_3;
	} else if (a <= 2e+26) {
		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 / (a / z))
	t_3 = (z * -x) / (a - t)
	tmp = 0
	if a <= -2e+164:
		tmp = t_2
	elif a <= -2.1e-43:
		tmp = x - (x / (a / z))
	elif a <= -1.25e-207:
		tmp = t_1
	elif a <= -2.6e-262:
		tmp = t_3
	elif a <= 4.4e-239:
		tmp = t_1
	elif a <= 2.1e-158:
		tmp = t_3
	elif a <= 2e+26:
		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(a / z)))
	t_3 = Float64(Float64(z * Float64(-x)) / Float64(a - t))
	tmp = 0.0
	if (a <= -2e+164)
		tmp = t_2;
	elseif (a <= -2.1e-43)
		tmp = Float64(x - Float64(x / Float64(a / z)));
	elseif (a <= -1.25e-207)
		tmp = t_1;
	elseif (a <= -2.6e-262)
		tmp = t_3;
	elseif (a <= 4.4e-239)
		tmp = t_1;
	elseif (a <= 2.1e-158)
		tmp = t_3;
	elseif (a <= 2e+26)
		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 / (a / z));
	t_3 = (z * -x) / (a - t);
	tmp = 0.0;
	if (a <= -2e+164)
		tmp = t_2;
	elseif (a <= -2.1e-43)
		tmp = x - (x / (a / z));
	elseif (a <= -1.25e-207)
		tmp = t_1;
	elseif (a <= -2.6e-262)
		tmp = t_3;
	elseif (a <= 4.4e-239)
		tmp = t_1;
	elseif (a <= 2.1e-158)
		tmp = t_3;
	elseif (a <= 2e+26)
		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[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * (-x)), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e+164], t$95$2, If[LessEqual[a, -2.1e-43], N[(x - N[(x / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.25e-207], t$95$1, If[LessEqual[a, -2.6e-262], t$95$3, If[LessEqual[a, 4.4e-239], t$95$1, If[LessEqual[a, 2.1e-158], t$95$3, If[LessEqual[a, 2e+26], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.1 \cdot 10^{-43}:\\
\;\;\;\;x - \frac{x}{\frac{a}{z}}\\

\mathbf{elif}\;a \leq -1.25 \cdot 10^{-207}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -2.6 \cdot 10^{-262}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 4.4 \cdot 10^{-239}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 2.1 \cdot 10^{-158}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 2 \cdot 10^{+26}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2e164 or 2.0000000000000001e26 < a

    1. Initial program 72.8%

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

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

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

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

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

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

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

    if -2e164 < a < -2.1000000000000001e-43

    1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

    if -2.1000000000000001e-43 < a < -1.25000000000000004e-207 or -2.5999999999999999e-262 < a < 4.39999999999999965e-239 or 2.09999999999999991e-158 < a < 2.0000000000000001e26

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

    if -1.25000000000000004e-207 < a < -2.5999999999999999e-262 or 4.39999999999999965e-239 < a < 2.09999999999999991e-158

    1. Initial program 60.2%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    7. Simplified36.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{+164}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-43}:\\ \;\;\;\;x - \frac{x}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-207}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-262}:\\ \;\;\;\;\frac{z \cdot \left(-x\right)}{a - t}\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-239}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-158}:\\ \;\;\;\;\frac{z \cdot \left(-x\right)}{a - t}\\ \mathbf{elif}\;a \leq 2 \cdot 10^{+26}:\\ \;\;\;\;y \cdot \frac{t - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 56.8% accurate, 0.6× speedup?

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

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

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

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

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

\mathbf{elif}\;t \leq 4.8 \cdot 10^{+45} \lor \neg \left(t \leq 3.2 \cdot 10^{+127}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -3.2000000000000001e-60 or 1.2200000000000001e-36 < t < 4.79999999999999979e45 or 3.19999999999999976e127 < t

    1. Initial program 51.3%

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

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

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

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

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

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

    if -3.2000000000000001e-60 < t < 2.24999999999999996e-277

    1. Initial program 87.9%

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

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

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

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

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

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

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

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

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

    if 2.24999999999999996e-277 < t < 5.50000000000000036e-127

    1. Initial program 96.5%

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

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

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

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

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

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

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

    if 5.50000000000000036e-127 < t < 1.2200000000000001e-36

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

    if 4.79999999999999979e45 < t < 3.19999999999999976e127

    1. Initial program 65.7%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    7. Simplified52.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(x \cdot z\right)}{t}} \]
    12. Step-by-step derivation
      1. distribute-lft-out--59.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{-60}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-277}:\\ \;\;\;\;x - \frac{x}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-127}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+45} \lor \neg \left(t \leq 3.2 \cdot 10^{+127}\right):\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(z - a\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 64.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -1.8 \cdot 10^{-156}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.8 \cdot 10^{-111}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_2\\


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

    1. Initial program 70.1%

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

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

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

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

    if -1.2e-36 < a < -1.79999999999999999e-156 or 8.0000000000000001e-165 < a < 1.80000000000000005e-111

    1. Initial program 58.3%

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

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

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

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

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

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

    if -1.79999999999999999e-156 < a < 8.0000000000000001e-165

    1. Initial program 63.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.80000000000000005e-111 < a < 4e-51

    1. Initial program 34.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{-36}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-156}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-165}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-111}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-51}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 81.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.6 \cdot 10^{-135} \lor \neg \left(a \leq 1.45 \cdot 10^{-134} \lor \neg \left(a \leq 2.1 \cdot 10^{-34}\right) \land a \leq 7.5 \cdot 10^{+43}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.5999999999999994e-135 or 1.44999999999999997e-134 < a < 2.1000000000000001e-34 or 7.49999999999999967e43 < a

    1. Initial program 67.6%

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

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

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

    if -9.5999999999999994e-135 < a < 1.44999999999999997e-134 or 2.1000000000000001e-34 < a < 7.49999999999999967e43

    1. Initial program 61.8%

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

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

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

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

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

        \[\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-sub84.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.6 \cdot 10^{-135} \lor \neg \left(a \leq 1.45 \cdot 10^{-134} \lor \neg \left(a \leq 2.1 \cdot 10^{-34}\right) \land a \leq 7.5 \cdot 10^{+43}\right):\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 46.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -1.32 \cdot 10^{+70}:\\
\;\;\;\;\frac{z}{\frac{t}{x}}\\

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

\mathbf{elif}\;t \leq 2.1 \cdot 10^{-36}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 4.8 \cdot 10^{+130}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 35.4%

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

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

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

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

    if -7.79999999999999947e179 < t < -1.3199999999999999e70

    1. Initial program 46.7%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    7. Simplified45.3%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{a \cdot x}{t} + -1 \cdot \frac{a \cdot \left(-1 \cdot \left(x \cdot z\right) - -1 \cdot \left(a \cdot x\right)\right)}{{t}^{2}}\right) - -1 \cdot \frac{x \cdot z}{t}} \]
    9. Step-by-step derivation
      1. distribute-lft-out32.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    12. Step-by-step derivation
      1. *-commutative26.7%

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    13. Simplified41.6%

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

    if -1.3199999999999999e70 < t < -1.75e35

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.75e35 < t < 2.09999999999999991e-36 or 4.1999999999999997e-11 < t < 4.80000000000000048e130

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

    if 2.09999999999999991e-36 < t < 4.1999999999999997e-11

    1. Initial program 71.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.8 \cdot 10^{+179}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.32 \cdot 10^{+70}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{+35}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-11}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+130}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 62.2% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;t \leq -1.7 \cdot 10^{-46}:\\
\;\;\;\;t_1\\

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -9.69999999999999954e179 or -6.20000000000000043e74 < t < -1.69999999999999998e-46 or 1.3000000000000001e140 < t

    1. Initial program 47.1%

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

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

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

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

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

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

    if -9.69999999999999954e179 < t < -6.20000000000000043e74

    1. Initial program 48.5%

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

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

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

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

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

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

    if -1.69999999999999998e-46 < t < 2.1500000000000001e-36

    1. Initial program 85.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    7. Simplified78.4%

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

    if 2.1500000000000001e-36 < t < 1.3000000000000001e140

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.7 \cdot 10^{+179}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -6.2 \cdot 10^{+74}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-46}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+140}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 61.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a \leq -6 \cdot 10^{-37}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-156}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-165}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-108}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+26}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t)))))
   (if (<= a -6e-37)
     (+ x (/ z (/ a (- y x))))
     (if (<= a -2.7e-156)
       t_1
       (if (<= a 7e-165)
         (* (- y x) (/ z (- a t)))
         (if (<= a 1.25e-108)
           t_1
           (if (<= a 1.4e+26)
             (* z (/ (- y x) (- a t)))
             (+ x (/ y (/ a (- z t)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double tmp;
	if (a <= -6e-37) {
		tmp = x + (z / (a / (y - x)));
	} else if (a <= -2.7e-156) {
		tmp = t_1;
	} else if (a <= 7e-165) {
		tmp = (y - x) * (z / (a - t));
	} else if (a <= 1.25e-108) {
		tmp = t_1;
	} else if (a <= 1.4e+26) {
		tmp = z * ((y - x) / (a - t));
	} else {
		tmp = x + (y / (a / (z - t)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * ((z - t) / (a - t))
    if (a <= (-6d-37)) then
        tmp = x + (z / (a / (y - x)))
    else if (a <= (-2.7d-156)) then
        tmp = t_1
    else if (a <= 7d-165) then
        tmp = (y - x) * (z / (a - t))
    else if (a <= 1.25d-108) then
        tmp = t_1
    else if (a <= 1.4d+26) then
        tmp = z * ((y - x) / (a - t))
    else
        tmp = x + (y / (a / (z - t)))
    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) / (a - t));
	double tmp;
	if (a <= -6e-37) {
		tmp = x + (z / (a / (y - x)));
	} else if (a <= -2.7e-156) {
		tmp = t_1;
	} else if (a <= 7e-165) {
		tmp = (y - x) * (z / (a - t));
	} else if (a <= 1.25e-108) {
		tmp = t_1;
	} else if (a <= 1.4e+26) {
		tmp = z * ((y - x) / (a - t));
	} else {
		tmp = x + (y / (a / (z - t)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	tmp = 0
	if a <= -6e-37:
		tmp = x + (z / (a / (y - x)))
	elif a <= -2.7e-156:
		tmp = t_1
	elif a <= 7e-165:
		tmp = (y - x) * (z / (a - t))
	elif a <= 1.25e-108:
		tmp = t_1
	elif a <= 1.4e+26:
		tmp = z * ((y - x) / (a - t))
	else:
		tmp = x + (y / (a / (z - t)))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	tmp = 0.0
	if (a <= -6e-37)
		tmp = Float64(x + Float64(z / Float64(a / Float64(y - x))));
	elseif (a <= -2.7e-156)
		tmp = t_1;
	elseif (a <= 7e-165)
		tmp = Float64(Float64(y - x) * Float64(z / Float64(a - t)));
	elseif (a <= 1.25e-108)
		tmp = t_1;
	elseif (a <= 1.4e+26)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	else
		tmp = Float64(x + Float64(y / Float64(a / Float64(z - t))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	tmp = 0.0;
	if (a <= -6e-37)
		tmp = x + (z / (a / (y - x)));
	elseif (a <= -2.7e-156)
		tmp = t_1;
	elseif (a <= 7e-165)
		tmp = (y - x) * (z / (a - t));
	elseif (a <= 1.25e-108)
		tmp = t_1;
	elseif (a <= 1.4e+26)
		tmp = z * ((y - x) / (a - t));
	else
		tmp = x + (y / (a / (z - t)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6e-37], N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.7e-156], t$95$1, If[LessEqual[a, 7e-165], N[(N[(y - x), $MachinePrecision] * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e-108], t$95$1, If[LessEqual[a, 1.4e+26], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.7 \cdot 10^{-156}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-108}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -6e-37

    1. Initial program 70.0%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    7. Simplified74.0%

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

    if -6e-37 < a < -2.70000000000000012e-156 or 7.0000000000000003e-165 < a < 1.25e-108

    1. Initial program 58.3%

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

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

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

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

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

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

    if -2.70000000000000012e-156 < a < 7.0000000000000003e-165

    1. Initial program 63.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.25e-108 < a < 1.4e26

    1. Initial program 51.5%

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

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

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

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

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

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

    if 1.4e26 < a

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z - t}}} + x \]
    10. Simplified71.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{-37}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-156}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-165}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-108}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+26}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 60.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -2.05 \cdot 10^{-156}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-113}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.35000000000000004e-36

    1. Initial program 70.0%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    7. Simplified74.0%

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

    if -1.35000000000000004e-36 < a < -2.0500000000000001e-156 or 8.5e-163 < a < 4.5000000000000001e-113

    1. Initial program 58.3%

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

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

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

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

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

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

    if -2.0500000000000001e-156 < a < 8.5e-163

    1. Initial program 63.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.5000000000000001e-113 < a < 2.1499999999999999e26

    1. Initial program 51.5%

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

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

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

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

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

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

    if 2.1499999999999999e26 < a

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-156}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-163}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-113}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 2.15 \cdot 10^{+26}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - t}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 72.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq 6.4 \cdot 10^{-109}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 8 \cdot 10^{+43}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.9e-56

    1. Initial program 68.3%

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

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

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

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

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

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

    if -3.9e-56 < a < 6.4000000000000003e-109 or 2.1999999999999999e-34 < a < 8.00000000000000011e43

    1. Initial program 61.7%

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

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

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

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

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

        \[\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-sub81.4%

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

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

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

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

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

    if 6.4000000000000003e-109 < a < 2.1999999999999999e-34

    1. Initial program 53.0%

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

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

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

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

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

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

    if 8.00000000000000011e43 < a

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.9 \cdot 10^{-56}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{-109}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-34}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+43}:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t - z}{\frac{a - t}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 69.3% accurate, 0.8× speedup?

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -8.7999999999999992e177 or 9.4000000000000002e139 < t

    1. Initial program 34.0%

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

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

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

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

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

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

    if -8.7999999999999992e177 < t < -1.25e-48

    1. Initial program 65.8%

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

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

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

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

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

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

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

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

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

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

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

    if -1.25e-48 < t < 2.1500000000000001e-36

    1. Initial program 85.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a}{z - t}}} \]
    7. Simplified85.4%

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

    if 2.1500000000000001e-36 < t < 9.4000000000000002e139

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.8 \cdot 10^{+177}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-48}:\\ \;\;\;\;x - \frac{t - z}{\frac{a - t}{y}}\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \mathbf{elif}\;t \leq 9.4 \cdot 10^{+139}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 47.1% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq -4.8 \cdot 10^{+69}:\\
\;\;\;\;\frac{z}{\frac{t}{x}}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.9500000000000001e180 or 3.2999999999999998e131 < t

    1. Initial program 35.4%

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

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

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

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

    if -2.9500000000000001e180 < t < -4.8000000000000003e69

    1. Initial program 46.7%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    7. Simplified45.3%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{a \cdot x}{t} + -1 \cdot \frac{a \cdot \left(-1 \cdot \left(x \cdot z\right) - -1 \cdot \left(a \cdot x\right)\right)}{{t}^{2}}\right) - -1 \cdot \frac{x \cdot z}{t}} \]
    9. Step-by-step derivation
      1. distribute-lft-out32.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    12. Step-by-step derivation
      1. *-commutative26.7%

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    13. Simplified41.6%

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

    if -4.8000000000000003e69 < t < -5.6000000000000002e33

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.6000000000000002e33 < t < 3.2999999999999998e131

    1. Initial program 82.4%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]
    8. Simplified55.9%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{a}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification56.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.95 \cdot 10^{+180}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{+69}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;t \leq -5.6 \cdot 10^{+33}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+131}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 57.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;z \leq -2.05 \cdot 10^{-54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-191}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 4.9:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* z (/ (- y x) (- a t)))))
   (if (<= z -2.05e-54)
     t_1
     (if (<= z -4.2e-191)
       (+ x y)
       (if (<= z 4.9) (* y (/ (- z t) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -2.05e-54) {
		tmp = t_1;
	} else if (z <= -4.2e-191) {
		tmp = x + y;
	} else if (z <= 4.9) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = z * ((y - x) / (a - t))
    if (z <= (-2.05d-54)) then
        tmp = t_1
    else if (z <= (-4.2d-191)) then
        tmp = x + y
    else if (z <= 4.9d0) then
        tmp = y * ((z - t) / (a - t))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -2.05e-54) {
		tmp = t_1;
	} else if (z <= -4.2e-191) {
		tmp = x + y;
	} else if (z <= 4.9) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z * ((y - x) / (a - t))
	tmp = 0
	if z <= -2.05e-54:
		tmp = t_1
	elif z <= -4.2e-191:
		tmp = x + y
	elif z <= 4.9:
		tmp = y * ((z - t) / (a - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z * Float64(Float64(y - x) / Float64(a - t)))
	tmp = 0.0
	if (z <= -2.05e-54)
		tmp = t_1;
	elseif (z <= -4.2e-191)
		tmp = Float64(x + y);
	elseif (z <= 4.9)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = z * ((y - x) / (a - t));
	tmp = 0.0;
	if (z <= -2.05e-54)
		tmp = t_1;
	elseif (z <= -4.2e-191)
		tmp = x + y;
	elseif (z <= 4.9)
		tmp = y * ((z - t) / (a - t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e-54], t$95$1, If[LessEqual[z, -4.2e-191], N[(x + y), $MachinePrecision], If[LessEqual[z, 4.9], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \frac{y - x}{a - t}\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{-54}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -4.2 \cdot 10^{-191}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 4.9:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.05e-54 or 4.9000000000000004 < z

    1. Initial program 63.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/84.5%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified84.5%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 66.8%

      \[\leadsto \color{blue}{z \cdot \left(\frac{y}{a - t} - \frac{x}{a - t}\right)} \]
    6. Step-by-step derivation
      1. div-sub66.8%

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
    7. Simplified66.8%

      \[\leadsto \color{blue}{z \cdot \frac{y - x}{a - t}} \]

    if -2.05e-54 < z < -4.19999999999999971e-191

    1. Initial program 75.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative75.2%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*l/80.5%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} + x \]
      3. fma-def80.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    3. Simplified80.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef80.5%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right) + x} \]
      2. *-commutative80.5%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} + x \]
      3. clear-num80.1%

        \[\leadsto \left(z - t\right) \cdot \color{blue}{\frac{1}{\frac{a - t}{y - x}}} + x \]
      4. un-div-inv80.9%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
    6. Applied egg-rr80.9%

      \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}} + x} \]
    7. Taylor expanded in y around inf 79.4%

      \[\leadsto \frac{z - t}{\color{blue}{\frac{a - t}{y}}} + x \]
    8. Taylor expanded in t around inf 63.7%

      \[\leadsto \color{blue}{y} + x \]

    if -4.19999999999999971e-191 < z < 4.9000000000000004

    1. Initial program 66.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/71.2%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified71.2%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 50.5%

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    6. Step-by-step derivation
      1. div-sub50.5%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    7. Simplified50.5%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{-54}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-191}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 4.9:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 58.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{if}\;z \leq -2.05 \cdot 10^{-54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.18 \cdot 10^{-191}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.92:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- y x) (/ z (- a t)))))
   (if (<= z -2.05e-54)
     t_1
     (if (<= z -1.18e-191)
       (+ x y)
       (if (<= z 1.92) (* y (/ (- z t) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - x) * (z / (a - t));
	double tmp;
	if (z <= -2.05e-54) {
		tmp = t_1;
	} else if (z <= -1.18e-191) {
		tmp = x + y;
	} else if (z <= 1.92) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y - x) * (z / (a - t))
    if (z <= (-2.05d-54)) then
        tmp = t_1
    else if (z <= (-1.18d-191)) then
        tmp = x + y
    else if (z <= 1.92d0) then
        tmp = y * ((z - t) / (a - t))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - x) * (z / (a - t));
	double tmp;
	if (z <= -2.05e-54) {
		tmp = t_1;
	} else if (z <= -1.18e-191) {
		tmp = x + y;
	} else if (z <= 1.92) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - x) * (z / (a - t))
	tmp = 0
	if z <= -2.05e-54:
		tmp = t_1
	elif z <= -1.18e-191:
		tmp = x + y
	elif z <= 1.92:
		tmp = y * ((z - t) / (a - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - x) * Float64(z / Float64(a - t)))
	tmp = 0.0
	if (z <= -2.05e-54)
		tmp = t_1;
	elseif (z <= -1.18e-191)
		tmp = Float64(x + y);
	elseif (z <= 1.92)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y - x) * (z / (a - t));
	tmp = 0.0;
	if (z <= -2.05e-54)
		tmp = t_1;
	elseif (z <= -1.18e-191)
		tmp = x + y;
	elseif (z <= 1.92)
		tmp = y * ((z - t) / (a - t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e-54], t$95$1, If[LessEqual[z, -1.18e-191], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.92], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{z}{a - t}\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{-54}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.18 \cdot 10^{-191}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 1.92:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.05e-54 or 1.9199999999999999 < z

    1. Initial program 63.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative63.3%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*l/84.5%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} + x \]
      3. fma-def84.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    3. Simplified84.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef84.5%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right) + x} \]
      2. *-commutative84.5%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} + x \]
      3. clear-num84.4%

        \[\leadsto \left(z - t\right) \cdot \color{blue}{\frac{1}{\frac{a - t}{y - x}}} + x \]
      4. un-div-inv84.3%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
    6. Applied egg-rr84.3%

      \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}} + x} \]
    7. Taylor expanded in z around -inf 54.5%

      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a - t}} \]
    8. Step-by-step derivation
      1. associate-/l*66.6%

        \[\leadsto \color{blue}{\frac{z}{\frac{a - t}{y - x}}} \]
    9. Simplified66.6%

      \[\leadsto \color{blue}{\frac{z}{\frac{a - t}{y - x}}} \]
    10. Taylor expanded in z around 0 54.5%

      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a - t}} \]
    11. Step-by-step derivation
      1. associate-*l/68.8%

        \[\leadsto \color{blue}{\frac{z}{a - t} \cdot \left(y - x\right)} \]
    12. Simplified68.8%

      \[\leadsto \color{blue}{\frac{z}{a - t} \cdot \left(y - x\right)} \]

    if -2.05e-54 < z < -1.1799999999999999e-191

    1. Initial program 75.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative75.2%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*l/80.5%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} + x \]
      3. fma-def80.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    3. Simplified80.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef80.5%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right) + x} \]
      2. *-commutative80.5%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} + x \]
      3. clear-num80.1%

        \[\leadsto \left(z - t\right) \cdot \color{blue}{\frac{1}{\frac{a - t}{y - x}}} + x \]
      4. un-div-inv80.9%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
    6. Applied egg-rr80.9%

      \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}} + x} \]
    7. Taylor expanded in y around inf 79.4%

      \[\leadsto \frac{z - t}{\color{blue}{\frac{a - t}{y}}} + x \]
    8. Taylor expanded in t around inf 63.7%

      \[\leadsto \color{blue}{y} + x \]

    if -1.1799999999999999e-191 < z < 1.9199999999999999

    1. Initial program 66.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/71.2%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified71.2%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 50.5%

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    6. Step-by-step derivation
      1. div-sub50.5%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    7. Simplified50.5%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{-54}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{elif}\;z \leq -1.18 \cdot 10^{-191}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.92:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 67.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;t \leq -2.5 \cdot 10^{+93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+139}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t)))))
   (if (<= t -2.5e+93)
     t_1
     (if (<= t 2.15e-36)
       (+ x (/ (- y x) (/ a (- z t))))
       (if (<= t 9.2e+139) (* (- y x) (/ z (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double tmp;
	if (t <= -2.5e+93) {
		tmp = t_1;
	} else if (t <= 2.15e-36) {
		tmp = x + ((y - x) / (a / (z - t)));
	} else if (t <= 9.2e+139) {
		tmp = (y - x) * (z / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * ((z - t) / (a - t))
    if (t <= (-2.5d+93)) then
        tmp = t_1
    else if (t <= 2.15d-36) then
        tmp = x + ((y - x) / (a / (z - t)))
    else if (t <= 9.2d+139) then
        tmp = (y - x) * (z / (a - t))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double tmp;
	if (t <= -2.5e+93) {
		tmp = t_1;
	} else if (t <= 2.15e-36) {
		tmp = x + ((y - x) / (a / (z - t)));
	} else if (t <= 9.2e+139) {
		tmp = (y - x) * (z / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	tmp = 0
	if t <= -2.5e+93:
		tmp = t_1
	elif t <= 2.15e-36:
		tmp = x + ((y - x) / (a / (z - t)))
	elif t <= 9.2e+139:
		tmp = (y - x) * (z / (a - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	tmp = 0.0
	if (t <= -2.5e+93)
		tmp = t_1;
	elseif (t <= 2.15e-36)
		tmp = Float64(x + Float64(Float64(y - x) / Float64(a / Float64(z - t))));
	elseif (t <= 9.2e+139)
		tmp = Float64(Float64(y - x) * Float64(z / Float64(a - t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	tmp = 0.0;
	if (t <= -2.5e+93)
		tmp = t_1;
	elseif (t <= 2.15e-36)
		tmp = x + ((y - x) / (a / (z - t)));
	elseif (t <= 9.2e+139)
		tmp = (y - x) * (z / (a - t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.5e+93], t$95$1, If[LessEqual[t, 2.15e-36], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.2e+139], N[(N[(y - x), $MachinePrecision] * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{+93}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.15 \cdot 10^{-36}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\

\mathbf{elif}\;t \leq 9.2 \cdot 10^{+139}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.5000000000000001e93 or 9.2e139 < t

    1. Initial program 35.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/64.3%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified64.3%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 63.1%

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    6. Step-by-step derivation
      1. div-sub63.1%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    7. Simplified63.1%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]

    if -2.5000000000000001e93 < t < 2.1500000000000001e-36

    1. Initial program 83.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/91.6%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified91.6%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 68.3%

      \[\leadsto \color{blue}{x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*76.7%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a}{z - t}}} \]
    7. Simplified76.7%

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a}{z - t}}} \]

    if 2.1500000000000001e-36 < t < 9.2e139

    1. Initial program 68.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative68.2%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*l/73.2%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} + x \]
      3. fma-def73.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    3. Simplified73.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef73.2%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right) + x} \]
      2. *-commutative73.2%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} + x \]
      3. clear-num73.1%

        \[\leadsto \left(z - t\right) \cdot \color{blue}{\frac{1}{\frac{a - t}{y - x}}} + x \]
      4. un-div-inv73.0%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
    6. Applied egg-rr73.0%

      \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}} + x} \]
    7. Taylor expanded in z around -inf 57.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a - t}} \]
    8. Step-by-step derivation
      1. associate-/l*64.4%

        \[\leadsto \color{blue}{\frac{z}{\frac{a - t}{y - x}}} \]
    9. Simplified64.4%

      \[\leadsto \color{blue}{\frac{z}{\frac{a - t}{y - x}}} \]
    10. Taylor expanded in z around 0 57.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a - t}} \]
    11. Step-by-step derivation
      1. associate-*l/67.2%

        \[\leadsto \color{blue}{\frac{z}{a - t} \cdot \left(y - x\right)} \]
    12. Simplified67.2%

      \[\leadsto \color{blue}{\frac{z}{a - t} \cdot \left(y - x\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification70.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+93}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+139}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 39.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.22 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-156}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-157}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+90}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.22e+27)
   x
   (if (<= a -2.8e-156)
     y
     (if (<= a 5.6e-157) (/ x (/ t z)) (if (<= a 1.1e+90) (+ x y) x)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.22e+27) {
		tmp = x;
	} else if (a <= -2.8e-156) {
		tmp = y;
	} else if (a <= 5.6e-157) {
		tmp = x / (t / z);
	} else if (a <= 1.1e+90) {
		tmp = x + 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.22d+27)) then
        tmp = x
    else if (a <= (-2.8d-156)) then
        tmp = y
    else if (a <= 5.6d-157) then
        tmp = x / (t / z)
    else if (a <= 1.1d+90) then
        tmp = x + 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.22e+27) {
		tmp = x;
	} else if (a <= -2.8e-156) {
		tmp = y;
	} else if (a <= 5.6e-157) {
		tmp = x / (t / z);
	} else if (a <= 1.1e+90) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.22e+27:
		tmp = x
	elif a <= -2.8e-156:
		tmp = y
	elif a <= 5.6e-157:
		tmp = x / (t / z)
	elif a <= 1.1e+90:
		tmp = x + y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.22e+27)
		tmp = x;
	elseif (a <= -2.8e-156)
		tmp = y;
	elseif (a <= 5.6e-157)
		tmp = Float64(x / Float64(t / z));
	elseif (a <= 1.1e+90)
		tmp = Float64(x + y);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.22e+27)
		tmp = x;
	elseif (a <= -2.8e-156)
		tmp = y;
	elseif (a <= 5.6e-157)
		tmp = x / (t / z);
	elseif (a <= 1.1e+90)
		tmp = x + y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.22e+27], x, If[LessEqual[a, -2.8e-156], y, If[LessEqual[a, 5.6e-157], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e+90], N[(x + y), $MachinePrecision], x]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.22 \cdot 10^{+27}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -2.8 \cdot 10^{-156}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 5.6 \cdot 10^{-157}:\\
\;\;\;\;\frac{x}{\frac{t}{z}}\\

\mathbf{elif}\;a \leq 1.1 \cdot 10^{+90}:\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.2200000000000001e27 or 1.09999999999999995e90 < a

    1. Initial program 70.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/90.2%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified90.2%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 52.0%

      \[\leadsto \color{blue}{x} \]

    if -1.2200000000000001e27 < a < -2.8000000000000002e-156

    1. Initial program 62.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/82.5%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified82.5%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 45.3%

      \[\leadsto \color{blue}{y} \]

    if -2.8000000000000002e-156 < a < 5.6000000000000002e-157

    1. Initial program 63.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/68.7%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified68.7%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 32.1%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}} \]
    6. Step-by-step derivation
      1. mul-1-neg32.1%

        \[\leadsto x + \color{blue}{\left(-\frac{x \cdot \left(z - t\right)}{a - t}\right)} \]
      2. unsub-neg32.1%

        \[\leadsto \color{blue}{x - \frac{x \cdot \left(z - t\right)}{a - t}} \]
      3. associate-/l*32.1%

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    7. Simplified32.1%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a - t}{z - t}}} \]
    8. Taylor expanded in t around inf 37.3%

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{a \cdot x}{t} + -1 \cdot \frac{a \cdot \left(-1 \cdot \left(x \cdot z\right) - -1 \cdot \left(a \cdot x\right)\right)}{{t}^{2}}\right) - -1 \cdot \frac{x \cdot z}{t}} \]
    9. Step-by-step derivation
      1. distribute-lft-out37.3%

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{a \cdot x}{t} + \frac{a \cdot \left(-1 \cdot \left(x \cdot z\right) - -1 \cdot \left(a \cdot x\right)\right)}{{t}^{2}}\right)} - -1 \cdot \frac{x \cdot z}{t} \]
      2. associate-/l*37.3%

        \[\leadsto -1 \cdot \left(\color{blue}{\frac{a}{\frac{t}{x}}} + \frac{a \cdot \left(-1 \cdot \left(x \cdot z\right) - -1 \cdot \left(a \cdot x\right)\right)}{{t}^{2}}\right) - -1 \cdot \frac{x \cdot z}{t} \]
      3. associate-/l*36.1%

        \[\leadsto -1 \cdot \left(\frac{a}{\frac{t}{x}} + \color{blue}{\frac{a}{\frac{{t}^{2}}{-1 \cdot \left(x \cdot z\right) - -1 \cdot \left(a \cdot x\right)}}}\right) - -1 \cdot \frac{x \cdot z}{t} \]
      4. distribute-lft-out--36.1%

        \[\leadsto -1 \cdot \left(\frac{a}{\frac{t}{x}} + \frac{a}{\frac{{t}^{2}}{\color{blue}{-1 \cdot \left(x \cdot z - a \cdot x\right)}}}\right) - -1 \cdot \frac{x \cdot z}{t} \]
      5. *-commutative36.1%

        \[\leadsto -1 \cdot \left(\frac{a}{\frac{t}{x}} + \frac{a}{\frac{{t}^{2}}{-1 \cdot \left(x \cdot z - \color{blue}{x \cdot a}\right)}}\right) - -1 \cdot \frac{x \cdot z}{t} \]
      6. associate-*r/36.1%

        \[\leadsto -1 \cdot \left(\frac{a}{\frac{t}{x}} + \frac{a}{\frac{{t}^{2}}{-1 \cdot \left(x \cdot z - x \cdot a\right)}}\right) - \color{blue}{\frac{-1 \cdot \left(x \cdot z\right)}{t}} \]
      7. mul-1-neg36.1%

        \[\leadsto -1 \cdot \left(\frac{a}{\frac{t}{x}} + \frac{a}{\frac{{t}^{2}}{-1 \cdot \left(x \cdot z - x \cdot a\right)}}\right) - \frac{\color{blue}{-x \cdot z}}{t} \]
    10. Simplified36.1%

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{a}{\frac{t}{x}} + \frac{a}{\frac{{t}^{2}}{-1 \cdot \left(x \cdot z - x \cdot a\right)}}\right) - \frac{-x \cdot z}{t}} \]
    11. Taylor expanded in t around inf 46.9%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(x \cdot z\right)}{t}} \]
    12. Step-by-step derivation
      1. distribute-lft-out--46.9%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(a \cdot x - x \cdot z\right)}}{t} \]
      2. mul-1-neg46.9%

        \[\leadsto \frac{\color{blue}{-\left(a \cdot x - x \cdot z\right)}}{t} \]
      3. *-commutative46.9%

        \[\leadsto \frac{-\left(\color{blue}{x \cdot a} - x \cdot z\right)}{t} \]
      4. distribute-lft-out--46.9%

        \[\leadsto \frac{-\color{blue}{x \cdot \left(a - z\right)}}{t} \]
    13. Simplified46.9%

      \[\leadsto \color{blue}{\frac{-x \cdot \left(a - z\right)}{t}} \]
    14. Taylor expanded in a around 0 45.7%

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    15. Step-by-step derivation
      1. associate-/l*45.7%

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    16. Simplified45.7%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]

    if 5.6000000000000002e-157 < a < 1.09999999999999995e90

    1. Initial program 60.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative60.7%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*l/73.1%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} + x \]
      3. fma-def73.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    3. Simplified73.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef73.1%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right) + x} \]
      2. *-commutative73.1%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} + x \]
      3. clear-num72.8%

        \[\leadsto \left(z - t\right) \cdot \color{blue}{\frac{1}{\frac{a - t}{y - x}}} + x \]
      4. un-div-inv72.9%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
    6. Applied egg-rr72.9%

      \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}} + x} \]
    7. Taylor expanded in y around inf 50.4%

      \[\leadsto \frac{z - t}{\color{blue}{\frac{a - t}{y}}} + x \]
    8. Taylor expanded in t around inf 37.7%

      \[\leadsto \color{blue}{y} + x \]
  3. Recombined 4 regimes into one program.
  4. Final simplification46.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.22 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-156}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-157}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+90}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 38.7% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -8.5 \cdot 10^{+26}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-156}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-157}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{+90}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -8.5e+26)
   x
   (if (<= a -1.6e-156)
     y
     (if (<= a 3e-157) (/ z (/ t x)) (if (<= a 7.8e+90) (+ x y) x)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -8.5e+26) {
		tmp = x;
	} else if (a <= -1.6e-156) {
		tmp = y;
	} else if (a <= 3e-157) {
		tmp = z / (t / x);
	} else if (a <= 7.8e+90) {
		tmp = x + 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 <= (-8.5d+26)) then
        tmp = x
    else if (a <= (-1.6d-156)) then
        tmp = y
    else if (a <= 3d-157) then
        tmp = z / (t / x)
    else if (a <= 7.8d+90) then
        tmp = x + 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 <= -8.5e+26) {
		tmp = x;
	} else if (a <= -1.6e-156) {
		tmp = y;
	} else if (a <= 3e-157) {
		tmp = z / (t / x);
	} else if (a <= 7.8e+90) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -8.5e+26:
		tmp = x
	elif a <= -1.6e-156:
		tmp = y
	elif a <= 3e-157:
		tmp = z / (t / x)
	elif a <= 7.8e+90:
		tmp = x + y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -8.5e+26)
		tmp = x;
	elseif (a <= -1.6e-156)
		tmp = y;
	elseif (a <= 3e-157)
		tmp = Float64(z / Float64(t / x));
	elseif (a <= 7.8e+90)
		tmp = Float64(x + y);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -8.5e+26)
		tmp = x;
	elseif (a <= -1.6e-156)
		tmp = y;
	elseif (a <= 3e-157)
		tmp = z / (t / x);
	elseif (a <= 7.8e+90)
		tmp = x + y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8.5e+26], x, If[LessEqual[a, -1.6e-156], y, If[LessEqual[a, 3e-157], N[(z / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.8e+90], N[(x + y), $MachinePrecision], x]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.5 \cdot 10^{+26}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.6 \cdot 10^{-156}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 3 \cdot 10^{-157}:\\
\;\;\;\;\frac{z}{\frac{t}{x}}\\

\mathbf{elif}\;a \leq 7.8 \cdot 10^{+90}:\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -8.5e26 or 7.8000000000000004e90 < a

    1. Initial program 70.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/90.2%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified90.2%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 52.0%

      \[\leadsto \color{blue}{x} \]

    if -8.5e26 < a < -1.59999999999999991e-156

    1. Initial program 62.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/82.5%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified82.5%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 45.3%

      \[\leadsto \color{blue}{y} \]

    if -1.59999999999999991e-156 < a < 3e-157

    1. Initial program 63.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/68.7%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified68.7%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 32.1%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}} \]
    6. Step-by-step derivation
      1. mul-1-neg32.1%

        \[\leadsto x + \color{blue}{\left(-\frac{x \cdot \left(z - t\right)}{a - t}\right)} \]
      2. unsub-neg32.1%

        \[\leadsto \color{blue}{x - \frac{x \cdot \left(z - t\right)}{a - t}} \]
      3. associate-/l*32.1%

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    7. Simplified32.1%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a - t}{z - t}}} \]
    8. Taylor expanded in t around inf 37.3%

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{a \cdot x}{t} + -1 \cdot \frac{a \cdot \left(-1 \cdot \left(x \cdot z\right) - -1 \cdot \left(a \cdot x\right)\right)}{{t}^{2}}\right) - -1 \cdot \frac{x \cdot z}{t}} \]
    9. Step-by-step derivation
      1. distribute-lft-out37.3%

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{a \cdot x}{t} + \frac{a \cdot \left(-1 \cdot \left(x \cdot z\right) - -1 \cdot \left(a \cdot x\right)\right)}{{t}^{2}}\right)} - -1 \cdot \frac{x \cdot z}{t} \]
      2. associate-/l*37.3%

        \[\leadsto -1 \cdot \left(\color{blue}{\frac{a}{\frac{t}{x}}} + \frac{a \cdot \left(-1 \cdot \left(x \cdot z\right) - -1 \cdot \left(a \cdot x\right)\right)}{{t}^{2}}\right) - -1 \cdot \frac{x \cdot z}{t} \]
      3. associate-/l*36.1%

        \[\leadsto -1 \cdot \left(\frac{a}{\frac{t}{x}} + \color{blue}{\frac{a}{\frac{{t}^{2}}{-1 \cdot \left(x \cdot z\right) - -1 \cdot \left(a \cdot x\right)}}}\right) - -1 \cdot \frac{x \cdot z}{t} \]
      4. distribute-lft-out--36.1%

        \[\leadsto -1 \cdot \left(\frac{a}{\frac{t}{x}} + \frac{a}{\frac{{t}^{2}}{\color{blue}{-1 \cdot \left(x \cdot z - a \cdot x\right)}}}\right) - -1 \cdot \frac{x \cdot z}{t} \]
      5. *-commutative36.1%

        \[\leadsto -1 \cdot \left(\frac{a}{\frac{t}{x}} + \frac{a}{\frac{{t}^{2}}{-1 \cdot \left(x \cdot z - \color{blue}{x \cdot a}\right)}}\right) - -1 \cdot \frac{x \cdot z}{t} \]
      6. associate-*r/36.1%

        \[\leadsto -1 \cdot \left(\frac{a}{\frac{t}{x}} + \frac{a}{\frac{{t}^{2}}{-1 \cdot \left(x \cdot z - x \cdot a\right)}}\right) - \color{blue}{\frac{-1 \cdot \left(x \cdot z\right)}{t}} \]
      7. mul-1-neg36.1%

        \[\leadsto -1 \cdot \left(\frac{a}{\frac{t}{x}} + \frac{a}{\frac{{t}^{2}}{-1 \cdot \left(x \cdot z - x \cdot a\right)}}\right) - \frac{\color{blue}{-x \cdot z}}{t} \]
    10. Simplified36.1%

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{a}{\frac{t}{x}} + \frac{a}{\frac{{t}^{2}}{-1 \cdot \left(x \cdot z - x \cdot a\right)}}\right) - \frac{-x \cdot z}{t}} \]
    11. Taylor expanded in a around 0 45.7%

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    12. Step-by-step derivation
      1. *-commutative45.7%

        \[\leadsto \frac{\color{blue}{z \cdot x}}{t} \]
      2. associate-/l*46.0%

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]
    13. Simplified46.0%

      \[\leadsto \color{blue}{\frac{z}{\frac{t}{x}}} \]

    if 3e-157 < a < 7.8000000000000004e90

    1. Initial program 60.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative60.7%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*l/73.1%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} + x \]
      3. fma-def73.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    3. Simplified73.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef73.1%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right) + x} \]
      2. *-commutative73.1%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} + x \]
      3. clear-num72.8%

        \[\leadsto \left(z - t\right) \cdot \color{blue}{\frac{1}{\frac{a - t}{y - x}}} + x \]
      4. un-div-inv72.9%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
    6. Applied egg-rr72.9%

      \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}} + x} \]
    7. Taylor expanded in y around inf 50.4%

      \[\leadsto \frac{z - t}{\color{blue}{\frac{a - t}{y}}} + x \]
    8. Taylor expanded in t around inf 37.7%

      \[\leadsto \color{blue}{y} + x \]
  3. Recombined 4 regimes into one program.
  4. Final simplification46.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.5 \cdot 10^{+26}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-156}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-157}:\\ \;\;\;\;\frac{z}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{+90}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 39.2% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{+26}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+26}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -5.5e+26) x (if (<= a 1.9e+26) y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -5.5e+26) {
		tmp = x;
	} else if (a <= 1.9e+26) {
		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 <= (-5.5d+26)) then
        tmp = x
    else if (a <= 1.9d+26) 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 <= -5.5e+26) {
		tmp = x;
	} else if (a <= 1.9e+26) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -5.5e+26:
		tmp = x
	elif a <= 1.9e+26:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -5.5e+26)
		tmp = x;
	elseif (a <= 1.9e+26)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -5.5e+26)
		tmp = x;
	elseif (a <= 1.9e+26)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.5e+26], x, If[LessEqual[a, 1.9e+26], y, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{+26}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.9 \cdot 10^{+26}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.4999999999999997e26 or 1.9000000000000001e26 < a

    1. Initial program 70.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/89.0%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified89.0%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 49.1%

      \[\leadsto \color{blue}{x} \]

    if -5.4999999999999997e26 < a < 1.9000000000000001e26

    1. Initial program 61.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/72.4%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified72.4%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 35.5%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{+26}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+26}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 25.3% accurate, 13.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 65.5%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. associate-*l/79.8%

      \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
  3. Simplified79.8%

    \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in a around inf 25.1%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification25.1%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 86.6% accurate, 0.7× 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 2024010 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (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))))