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

Percentage Accurate: 68.9% → 90.9%
Time: 25.5s
Alternatives: 22
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 68.9% accurate, 1.0× speedup?

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

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

Alternative 1: 90.9% accurate, 0.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t_1, y - x, x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.4e82 or 1.12000000000000004e151 < t

    1. Initial program 38.3%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/72.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-x, \frac{z}{a - t} - \color{blue}{\left(-\frac{a}{t}\right)}, y \cdot \frac{z - t}{a - t}\right) \]
      2. distribute-neg-frac93.6%

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

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

    if -9.4e82 < t < 1.12000000000000004e151

    1. Initial program 86.2%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/93.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.4 \cdot 10^{+82} \lor \neg \left(t \leq 1.12 \cdot 10^{+151}\right):\\ \;\;\;\;\mathsf{fma}\left(-x, \frac{z}{a - t} + \frac{a}{t}, y \cdot \frac{z - t}{a - t}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\ \end{array} \]

Alternative 2: 91.5% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(-x, \frac{z}{a - t} + \left(-1 - \frac{t}{a - t}\right), y \cdot \frac{z - t}{a - t}\right) \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (fma
  (- x)
  (+ (/ z (- a t)) (- -1.0 (/ t (- a t))))
  (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
	return fma(-x, ((z / (a - t)) + (-1.0 - (t / (a - t)))), (y * ((z - t) / (a - t))));
}
function code(x, y, z, t, a)
	return fma(Float64(-x), Float64(Float64(z / Float64(a - t)) + Float64(-1.0 - Float64(t / Float64(a - t)))), Float64(y * Float64(Float64(z - t) / Float64(a - t))))
end
code[x_, y_, z_, t_, a_] := N[((-x) * N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(-x, \frac{z}{a - t} + \left(-1 - \frac{t}{a - t}\right), y \cdot \frac{z - t}{a - t}\right)
\end{array}
Derivation
  1. Initial program 71.8%

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

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

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

      \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
    4. associate-/r/87.0%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 90.8% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+39} \lor \neg \left(y \leq 4.1 \cdot 10^{+79}\right):\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.6999999999999999e39 or 4.1e79 < y

    1. Initial program 59.2%

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

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

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

    if -1.6999999999999999e39 < y < 4.1e79

    1. Initial program 80.0%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/81.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+39} \lor \neg \left(y \leq 4.1 \cdot 10^{+79}\right):\\ \;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(1 + \frac{t}{a - t}\right) - \frac{z}{a - t}\right) + \frac{y \cdot \left(z - t\right)}{a - t}\\ \end{array} \]

Alternative 4: 45.5% 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.3 \cdot 10^{+27}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-222}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-265}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-307}:\\ \;\;\;\;x - z \cdot \frac{x}{a}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-100}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+67}:\\ \;\;\;\;\frac{z \cdot y}{a - t}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+117}:\\ \;\;\;\;x - \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+122}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a)))))
   (if (<= t -3.3e+27)
     y
     (if (<= t -1.25e-222)
       t_1
       (if (<= t -1.35e-265)
         (* z (/ y (- a t)))
         (if (<= t -3e-307)
           (- x (* z (/ x a)))
           (if (<= t 1.7e-100)
             (* z (/ (- y x) a))
             (if (<= t 1.8e+21)
               t_1
               (if (<= t 5.5e+67)
                 (/ (* z y) (- a t))
                 (if (<= t 3e+117)
                   (- x (/ t (/ a y)))
                   (if (<= t 7e+122) (* z (/ x t)) y)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double tmp;
	if (t <= -3.3e+27) {
		tmp = y;
	} else if (t <= -1.25e-222) {
		tmp = t_1;
	} else if (t <= -1.35e-265) {
		tmp = z * (y / (a - t));
	} else if (t <= -3e-307) {
		tmp = x - (z * (x / a));
	} else if (t <= 1.7e-100) {
		tmp = z * ((y - x) / a);
	} else if (t <= 1.8e+21) {
		tmp = t_1;
	} else if (t <= 5.5e+67) {
		tmp = (z * y) / (a - t);
	} else if (t <= 3e+117) {
		tmp = x - (t / (a / y));
	} else if (t <= 7e+122) {
		tmp = z * (x / t);
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (z / a))
    if (t <= (-3.3d+27)) then
        tmp = y
    else if (t <= (-1.25d-222)) then
        tmp = t_1
    else if (t <= (-1.35d-265)) then
        tmp = z * (y / (a - t))
    else if (t <= (-3d-307)) then
        tmp = x - (z * (x / a))
    else if (t <= 1.7d-100) then
        tmp = z * ((y - x) / a)
    else if (t <= 1.8d+21) then
        tmp = t_1
    else if (t <= 5.5d+67) then
        tmp = (z * y) / (a - t)
    else if (t <= 3d+117) then
        tmp = x - (t / (a / y))
    else if (t <= 7d+122) then
        tmp = z * (x / t)
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double tmp;
	if (t <= -3.3e+27) {
		tmp = y;
	} else if (t <= -1.25e-222) {
		tmp = t_1;
	} else if (t <= -1.35e-265) {
		tmp = z * (y / (a - t));
	} else if (t <= -3e-307) {
		tmp = x - (z * (x / a));
	} else if (t <= 1.7e-100) {
		tmp = z * ((y - x) / a);
	} else if (t <= 1.8e+21) {
		tmp = t_1;
	} else if (t <= 5.5e+67) {
		tmp = (z * y) / (a - t);
	} else if (t <= 3e+117) {
		tmp = x - (t / (a / y));
	} else if (t <= 7e+122) {
		tmp = z * (x / t);
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	tmp = 0
	if t <= -3.3e+27:
		tmp = y
	elif t <= -1.25e-222:
		tmp = t_1
	elif t <= -1.35e-265:
		tmp = z * (y / (a - t))
	elif t <= -3e-307:
		tmp = x - (z * (x / a))
	elif t <= 1.7e-100:
		tmp = z * ((y - x) / a)
	elif t <= 1.8e+21:
		tmp = t_1
	elif t <= 5.5e+67:
		tmp = (z * y) / (a - t)
	elif t <= 3e+117:
		tmp = x - (t / (a / y))
	elif t <= 7e+122:
		tmp = z * (x / t)
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (t <= -3.3e+27)
		tmp = y;
	elseif (t <= -1.25e-222)
		tmp = t_1;
	elseif (t <= -1.35e-265)
		tmp = Float64(z * Float64(y / Float64(a - t)));
	elseif (t <= -3e-307)
		tmp = Float64(x - Float64(z * Float64(x / a)));
	elseif (t <= 1.7e-100)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	elseif (t <= 1.8e+21)
		tmp = t_1;
	elseif (t <= 5.5e+67)
		tmp = Float64(Float64(z * y) / Float64(a - t));
	elseif (t <= 3e+117)
		tmp = Float64(x - Float64(t / Float64(a / y)));
	elseif (t <= 7e+122)
		tmp = Float64(z * Float64(x / t));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (t <= -3.3e+27)
		tmp = y;
	elseif (t <= -1.25e-222)
		tmp = t_1;
	elseif (t <= -1.35e-265)
		tmp = z * (y / (a - t));
	elseif (t <= -3e-307)
		tmp = x - (z * (x / a));
	elseif (t <= 1.7e-100)
		tmp = z * ((y - x) / a);
	elseif (t <= 1.8e+21)
		tmp = t_1;
	elseif (t <= 5.5e+67)
		tmp = (z * y) / (a - t);
	elseif (t <= 3e+117)
		tmp = x - (t / (a / y));
	elseif (t <= 7e+122)
		tmp = z * (x / t);
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.3e+27], y, If[LessEqual[t, -1.25e-222], t$95$1, If[LessEqual[t, -1.35e-265], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3e-307], N[(x - N[(z * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e-100], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+21], t$95$1, If[LessEqual[t, 5.5e+67], N[(N[(z * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+117], N[(x - N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+122], N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision], y]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.25 \cdot 10^{-222}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;t \leq 1.8 \cdot 10^{+21}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;t \leq 7 \cdot 10^{+122}:\\
\;\;\;\;z \cdot \frac{x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if t < -3.2999999999999998e27 or 7.00000000000000028e122 < t

    1. Initial program 46.6%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/76.7%

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

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

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

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

    if -3.2999999999999998e27 < t < -1.25000000000000002e-222 or 1.69999999999999988e-100 < t < 1.8e21

    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*91.4%

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

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

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

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

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

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

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

    if -1.25000000000000002e-222 < t < -1.3500000000000001e-265

    1. Initial program 92.6%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/99.8%

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

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

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

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

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

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

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

    if -1.3500000000000001e-265 < t < -2.9999999999999999e-307

    1. Initial program 100.0%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    3. Simplified100.0%

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot z}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg85.8%

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{z}}} \]
      4. associate-/r/85.8%

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

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

    if -2.9999999999999999e-307 < t < 1.69999999999999988e-100

    1. Initial program 90.3%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/90.5%

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

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

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

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

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

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

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

    if 1.8e21 < t < 5.49999999999999968e67

    1. Initial program 99.7%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/99.9%

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

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

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

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

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

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

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

    if 5.49999999999999968e67 < t < 3e117

    1. Initial program 65.4%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/90.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-t}{\frac{a}{y - x}}} \]
    9. Simplified59.0%

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot y}{a}} \]
    11. Step-by-step derivation
      1. mul-1-neg43.4%

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

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

        \[\leadsto x + \color{blue}{\frac{-t}{\frac{a}{y}}} \]
    12. Simplified51.2%

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

    if 3e117 < t < 7.00000000000000028e122

    1. Initial program 43.8%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t} \cdot z} \]
      2. *-commutative42.8%

        \[\leadsto \color{blue}{z \cdot \frac{x}{t}} \]
    10. Simplified42.8%

      \[\leadsto \color{blue}{z \cdot \frac{x}{t}} \]
  3. Recombined 8 regimes into one program.
  4. Final simplification55.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.3 \cdot 10^{+27}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-222}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-265}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-307}:\\ \;\;\;\;x - z \cdot \frac{x}{a}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-100}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+21}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+67}:\\ \;\;\;\;\frac{z \cdot y}{a - t}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+117}:\\ \;\;\;\;x - \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+122}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 5: 45.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{y}{a - t}\\ t_2 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;t \leq -3.1 \cdot 10^{+29}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{-223}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-263}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-308}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{-164}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.05 \cdot 10^{+40}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* z (/ y (- a t)))) (t_2 (* x (- 1.0 (/ z a)))))
   (if (<= t -3.1e+29)
     y
     (if (<= t -9.5e-223)
       t_2
       (if (<= t -1.2e-263)
         t_1
         (if (<= t 2.6e-308)
           t_2
           (if (<= t 2.35e-164) t_1 (if (<= t 4.05e+40) t_2 y))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z * (y / (a - t));
	double t_2 = x * (1.0 - (z / a));
	double tmp;
	if (t <= -3.1e+29) {
		tmp = y;
	} else if (t <= -9.5e-223) {
		tmp = t_2;
	} else if (t <= -1.2e-263) {
		tmp = t_1;
	} else if (t <= 2.6e-308) {
		tmp = t_2;
	} else if (t <= 2.35e-164) {
		tmp = t_1;
	} else if (t <= 4.05e+40) {
		tmp = t_2;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = z * (y / (a - t))
    t_2 = x * (1.0d0 - (z / a))
    if (t <= (-3.1d+29)) then
        tmp = y
    else if (t <= (-9.5d-223)) then
        tmp = t_2
    else if (t <= (-1.2d-263)) then
        tmp = t_1
    else if (t <= 2.6d-308) then
        tmp = t_2
    else if (t <= 2.35d-164) then
        tmp = t_1
    else if (t <= 4.05d+40) then
        tmp = t_2
    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 = z * (y / (a - t));
	double t_2 = x * (1.0 - (z / a));
	double tmp;
	if (t <= -3.1e+29) {
		tmp = y;
	} else if (t <= -9.5e-223) {
		tmp = t_2;
	} else if (t <= -1.2e-263) {
		tmp = t_1;
	} else if (t <= 2.6e-308) {
		tmp = t_2;
	} else if (t <= 2.35e-164) {
		tmp = t_1;
	} else if (t <= 4.05e+40) {
		tmp = t_2;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z * (y / (a - t))
	t_2 = x * (1.0 - (z / a))
	tmp = 0
	if t <= -3.1e+29:
		tmp = y
	elif t <= -9.5e-223:
		tmp = t_2
	elif t <= -1.2e-263:
		tmp = t_1
	elif t <= 2.6e-308:
		tmp = t_2
	elif t <= 2.35e-164:
		tmp = t_1
	elif t <= 4.05e+40:
		tmp = t_2
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z * Float64(y / Float64(a - t)))
	t_2 = Float64(x * Float64(1.0 - Float64(z / a)))
	tmp = 0.0
	if (t <= -3.1e+29)
		tmp = y;
	elseif (t <= -9.5e-223)
		tmp = t_2;
	elseif (t <= -1.2e-263)
		tmp = t_1;
	elseif (t <= 2.6e-308)
		tmp = t_2;
	elseif (t <= 2.35e-164)
		tmp = t_1;
	elseif (t <= 4.05e+40)
		tmp = t_2;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = z * (y / (a - t));
	t_2 = x * (1.0 - (z / a));
	tmp = 0.0;
	if (t <= -3.1e+29)
		tmp = y;
	elseif (t <= -9.5e-223)
		tmp = t_2;
	elseif (t <= -1.2e-263)
		tmp = t_1;
	elseif (t <= 2.6e-308)
		tmp = t_2;
	elseif (t <= 2.35e-164)
		tmp = t_1;
	elseif (t <= 4.05e+40)
		tmp = t_2;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.1e+29], y, If[LessEqual[t, -9.5e-223], t$95$2, If[LessEqual[t, -1.2e-263], t$95$1, If[LessEqual[t, 2.6e-308], t$95$2, If[LessEqual[t, 2.35e-164], t$95$1, If[LessEqual[t, 4.05e+40], t$95$2, y]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -9.5 \cdot 10^{-223}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1.2 \cdot 10^{-263}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-308}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 2.35 \cdot 10^{-164}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 4.05 \cdot 10^{+40}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.0999999999999999e29 or 4.0499999999999999e40 < t

    1. Initial program 51.5%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/80.5%

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

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

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

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

    if -3.0999999999999999e29 < t < -9.49999999999999992e-223 or -1.2e-263 < t < 2.6e-308 or 2.3499999999999998e-164 < t < 4.0499999999999999e40

    1. Initial program 87.4%

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

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

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

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

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

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

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

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

    if -9.49999999999999992e-223 < t < -1.2e-263 or 2.6e-308 < t < 2.3499999999999998e-164

    1. Initial program 93.0%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/95.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.1 \cdot 10^{+29}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{-223}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-263}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-308}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{-164}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 4.05 \cdot 10^{+40}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 6: 45.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 -3 \cdot 10^{+28}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-223}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-265}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-307}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-100}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+40}:\\ \;\;\;\;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 -3e+28)
     y
     (if (<= t -9e-223)
       t_1
       (if (<= t -1.8e-265)
         (* z (/ y (- a t)))
         (if (<= t -8e-307)
           t_1
           (if (<= t 3.5e-100)
             (* z (/ (- y x) a))
             (if (<= t 2.1e+40) 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 <= -3e+28) {
		tmp = y;
	} else if (t <= -9e-223) {
		tmp = t_1;
	} else if (t <= -1.8e-265) {
		tmp = z * (y / (a - t));
	} else if (t <= -8e-307) {
		tmp = t_1;
	} else if (t <= 3.5e-100) {
		tmp = z * ((y - x) / a);
	} else if (t <= 2.1e+40) {
		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 <= (-3d+28)) then
        tmp = y
    else if (t <= (-9d-223)) then
        tmp = t_1
    else if (t <= (-1.8d-265)) then
        tmp = z * (y / (a - t))
    else if (t <= (-8d-307)) then
        tmp = t_1
    else if (t <= 3.5d-100) then
        tmp = z * ((y - x) / a)
    else if (t <= 2.1d+40) 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 <= -3e+28) {
		tmp = y;
	} else if (t <= -9e-223) {
		tmp = t_1;
	} else if (t <= -1.8e-265) {
		tmp = z * (y / (a - t));
	} else if (t <= -8e-307) {
		tmp = t_1;
	} else if (t <= 3.5e-100) {
		tmp = z * ((y - x) / a);
	} else if (t <= 2.1e+40) {
		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 <= -3e+28:
		tmp = y
	elif t <= -9e-223:
		tmp = t_1
	elif t <= -1.8e-265:
		tmp = z * (y / (a - t))
	elif t <= -8e-307:
		tmp = t_1
	elif t <= 3.5e-100:
		tmp = z * ((y - x) / a)
	elif t <= 2.1e+40:
		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 <= -3e+28)
		tmp = y;
	elseif (t <= -9e-223)
		tmp = t_1;
	elseif (t <= -1.8e-265)
		tmp = Float64(z * Float64(y / Float64(a - t)));
	elseif (t <= -8e-307)
		tmp = t_1;
	elseif (t <= 3.5e-100)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	elseif (t <= 2.1e+40)
		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 <= -3e+28)
		tmp = y;
	elseif (t <= -9e-223)
		tmp = t_1;
	elseif (t <= -1.8e-265)
		tmp = z * (y / (a - t));
	elseif (t <= -8e-307)
		tmp = t_1;
	elseif (t <= 3.5e-100)
		tmp = z * ((y - x) / a);
	elseif (t <= 2.1e+40)
		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, -3e+28], y, If[LessEqual[t, -9e-223], t$95$1, If[LessEqual[t, -1.8e-265], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8e-307], t$95$1, If[LessEqual[t, 3.5e-100], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e+40], 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 \cdot 10^{+28}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -9 \cdot 10^{-223}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq -8 \cdot 10^{-307}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2.1 \cdot 10^{+40}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.0000000000000001e28 or 2.1000000000000001e40 < t

    1. Initial program 51.5%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/80.5%

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

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

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

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

    if -3.0000000000000001e28 < t < -8.99999999999999935e-223 or -1.8000000000000001e-265 < t < -7.99999999999999927e-307 or 3.5000000000000001e-100 < t < 2.1000000000000001e40

    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*92.6%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    3. Simplified92.6%

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

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

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

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

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

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

    if -8.99999999999999935e-223 < t < -1.8000000000000001e-265

    1. Initial program 92.6%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/99.8%

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

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

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

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

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

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

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

    if -7.99999999999999927e-307 < t < 3.5000000000000001e-100

    1. Initial program 90.3%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/90.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+28}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-223}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-265}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-307}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-100}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+40}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 7: 45.8% accurate, 0.7× 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^{+29}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-223}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-263}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-306}:\\ \;\;\;\;x - z \cdot \frac{x}{a}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-99}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{+38}:\\ \;\;\;\;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+29)
     y
     (if (<= t -9e-223)
       t_1
       (if (<= t -5.5e-263)
         (* z (/ y (- a t)))
         (if (<= t -1.35e-306)
           (- x (* z (/ x a)))
           (if (<= t 2.2e-99)
             (* z (/ (- y x) a))
             (if (<= t 4.3e+38) 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+29) {
		tmp = y;
	} else if (t <= -9e-223) {
		tmp = t_1;
	} else if (t <= -5.5e-263) {
		tmp = z * (y / (a - t));
	} else if (t <= -1.35e-306) {
		tmp = x - (z * (x / a));
	} else if (t <= 2.2e-99) {
		tmp = z * ((y - x) / a);
	} else if (t <= 4.3e+38) {
		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+29)) then
        tmp = y
    else if (t <= (-9d-223)) then
        tmp = t_1
    else if (t <= (-5.5d-263)) then
        tmp = z * (y / (a - t))
    else if (t <= (-1.35d-306)) then
        tmp = x - (z * (x / a))
    else if (t <= 2.2d-99) then
        tmp = z * ((y - x) / a)
    else if (t <= 4.3d+38) 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+29) {
		tmp = y;
	} else if (t <= -9e-223) {
		tmp = t_1;
	} else if (t <= -5.5e-263) {
		tmp = z * (y / (a - t));
	} else if (t <= -1.35e-306) {
		tmp = x - (z * (x / a));
	} else if (t <= 2.2e-99) {
		tmp = z * ((y - x) / a);
	} else if (t <= 4.3e+38) {
		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+29:
		tmp = y
	elif t <= -9e-223:
		tmp = t_1
	elif t <= -5.5e-263:
		tmp = z * (y / (a - t))
	elif t <= -1.35e-306:
		tmp = x - (z * (x / a))
	elif t <= 2.2e-99:
		tmp = z * ((y - x) / a)
	elif t <= 4.3e+38:
		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+29)
		tmp = y;
	elseif (t <= -9e-223)
		tmp = t_1;
	elseif (t <= -5.5e-263)
		tmp = Float64(z * Float64(y / Float64(a - t)));
	elseif (t <= -1.35e-306)
		tmp = Float64(x - Float64(z * Float64(x / a)));
	elseif (t <= 2.2e-99)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	elseif (t <= 4.3e+38)
		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+29)
		tmp = y;
	elseif (t <= -9e-223)
		tmp = t_1;
	elseif (t <= -5.5e-263)
		tmp = z * (y / (a - t));
	elseif (t <= -1.35e-306)
		tmp = x - (z * (x / a));
	elseif (t <= 2.2e-99)
		tmp = z * ((y - x) / a);
	elseif (t <= 4.3e+38)
		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+29], y, If[LessEqual[t, -9e-223], t$95$1, If[LessEqual[t, -5.5e-263], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e-306], N[(x - N[(z * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e-99], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e+38], 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^{+29}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -9 \cdot 10^{-223}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;t \leq 4.3 \cdot 10^{+38}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -3.59999999999999976e29 or 4.2999999999999997e38 < t

    1. Initial program 51.5%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/80.5%

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

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

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

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

    if -3.59999999999999976e29 < t < -8.99999999999999935e-223 or 2.20000000000000004e-99 < t < 4.2999999999999997e38

    1. Initial program 86.7%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    3. Simplified91.8%

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

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

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

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

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

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

    if -8.99999999999999935e-223 < t < -5.49999999999999971e-263

    1. Initial program 92.6%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/99.8%

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

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

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

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

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

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

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

    if -5.49999999999999971e-263 < t < -1.35000000000000005e-306

    1. Initial program 100.0%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    3. Simplified100.0%

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot z}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg85.8%

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{z}}} \]
      4. associate-/r/85.8%

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

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

    if -1.35000000000000005e-306 < t < 2.20000000000000004e-99

    1. Initial program 90.3%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/90.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{+29}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-223}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-263}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-306}:\\ \;\;\;\;x - z \cdot \frac{x}{a}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-99}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{+38}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 8: 70.2% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;t \leq -1.15 \cdot 10^{-48} \lor \neg \left(t \leq 2 \cdot 10^{-13}\right):\\
\;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\

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


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

    1. Initial program 36.6%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/72.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.1999999999999994e110 < t < -2.6e91

    1. Initial program 44.6%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/99.7%

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

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

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

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

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

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

    if -2.6e91 < t < -1.15e-48 or 2.0000000000000001e-13 < t

    1. Initial program 66.4%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/84.4%

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y - x}}} \]
    7. Simplified75.1%

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

    if -1.15e-48 < t < 2.0000000000000001e-13

    1. Initial program 89.9%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    3. Simplified93.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{+110}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{+91}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{-48} \lor \neg \left(t \leq 2 \cdot 10^{-13}\right):\\ \;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - y}{\frac{a}{z}}\\ \end{array} \]

Alternative 9: 86.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+199} \lor \neg \left(t \leq 2.55 \cdot 10^{+161}\right):\\
\;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.20000000000000007e199 or 2.54999999999999982e161 < t

    1. Initial program 34.2%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000007e199 < t < 2.54999999999999982e161

    1. Initial program 82.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{+199} \lor \neg \left(t \leq 2.55 \cdot 10^{+161}\right):\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ \end{array} \]

Alternative 10: 88.9% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.30000000000000004e223 or 7.20000000000000049e157 < t

    1. Initial program 32.2%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/69.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.30000000000000004e223 < t < 7.20000000000000049e157

    1. Initial program 81.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{+223} \lor \neg \left(t \leq 7.2 \cdot 10^{+157}\right):\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\ \end{array} \]

Alternative 11: 39.5% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;z \leq -4.7 \cdot 10^{-272}:\\
\;\;\;\;y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.64999999999999991e172

    1. Initial program 76.4%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/97.7%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{z}{\frac{t}{y - x}}} \]
      3. distribute-neg-frac72.0%

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

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

    if -1.64999999999999991e172 < z < -0.48999999999999999

    1. Initial program 71.4%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/90.8%

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

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

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

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

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

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

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

    if -0.48999999999999999 < z < -4.6999999999999998e-272

    1. Initial program 68.7%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/82.4%

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

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

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

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

    if -4.6999999999999998e-272 < z < 5.2e78

    1. Initial program 73.3%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/82.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-t}{\frac{a}{y - x}}} \]
    9. Simplified46.2%

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot y}{a}} \]
    11. Step-by-step derivation
      1. mul-1-neg43.7%

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

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

        \[\leadsto x + \color{blue}{\frac{-t}{\frac{a}{y}}} \]
    12. Simplified46.4%

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

    if 5.2e78 < z

    1. Initial program 71.1%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/89.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+172}:\\ \;\;\;\;\frac{-z}{\frac{t}{y - x}}\\ \mathbf{elif}\;z \leq -0.49:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-272}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+78}:\\ \;\;\;\;x - \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z}}\\ \end{array} \]

Alternative 12: 73.8% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.99999999999999954e170 or 2.65e132 < z

    1. Initial program 74.6%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/92.3%

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

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

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

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

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

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

    if -9.99999999999999954e170 < z < 2.65e132

    1. Initial program 70.7%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity79.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+171} \lor \neg \left(z \leq 2.65 \cdot 10^{+132}\right):\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\ \end{array} \]

Alternative 13: 78.1% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.8000000000000001e31 or 35000 < a

    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/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. Step-by-step derivation
      1. *-commutative90.2%

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

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

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

      \[\leadsto x + \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity90.2%

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

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

        \[\leadsto x + \color{blue}{\frac{1}{a - t} \cdot \frac{z - t}{\frac{1}{y - x}}} \]
    7. Applied egg-rr68.5%

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

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

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

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

    if -3.8000000000000001e31 < a < 35000

    1. Initial program 74.5%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/80.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+31} \lor \neg \left(a \leq 35000\right):\\ \;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \end{array} \]

Alternative 14: 66.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8000000000 \lor \neg \left(t \leq 80000000000000\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8e9 or 8e13 < t

    1. Initial program 53.8%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/80.9%

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

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

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

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

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

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

    if -8e9 < t < 8e13

    1. Initial program 89.2%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/92.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8000000000 \lor \neg \left(t \leq 80000000000000\right):\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \end{array} \]

Alternative 15: 67.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+14} \lor \neg \left(t \leq 65000000000000\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.15e14 or 6.5e13 < t

    1. Initial program 53.8%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/80.9%

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

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

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

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

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

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

    if -1.15e14 < t < 6.5e13

    1. Initial program 89.2%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    3. Simplified92.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{+14} \lor \neg \left(t \leq 65000000000000\right):\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - y}{\frac{a}{z}}\\ \end{array} \]

Alternative 16: 69.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{-36} \lor \neg \left(t \leq 2.8 \cdot 10^{-13}\right):\\
\;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.4e-36 or 2.8000000000000002e-13 < t

    1. Initial program 55.8%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/80.9%

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

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

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

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

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

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

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

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

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

    if -2.4e-36 < t < 2.8000000000000002e-13

    1. Initial program 89.9%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    3. Simplified93.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{-36} \lor \neg \left(t \leq 2.8 \cdot 10^{-13}\right):\\ \;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - y}{\frac{a}{z}}\\ \end{array} \]

Alternative 17: 60.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+85}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.2000000000000002e85

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

    if -2.2000000000000002e85 < x < 1.2999999999999999e109

    1. Initial program 76.7%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/91.6%

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

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

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

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

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

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

    if 1.2999999999999999e109 < x

    1. Initial program 59.3%

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{z}}} \]
      4. associate-/r/54.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+109}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \frac{x}{a}\\ \end{array} \]

Alternative 18: 39.3% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 2.6 \cdot 10^{-307}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 1.45 \cdot 10^{+32}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.6000000000000003e96 or 1.45000000000000001e32 < a

    1. Initial program 69.5%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/97.3%

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

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

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

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

    if -4.6000000000000003e96 < a < 2.59999999999999996e-307 or 1.84999999999999996e-259 < a < 1.45000000000000001e32

    1. Initial program 72.7%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/80.7%

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

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

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

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

    if 2.59999999999999996e-307 < a < 1.84999999999999996e-259

    1. Initial program 78.8%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/79.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    10. Simplified62.6%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification41.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.6 \cdot 10^{+96}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-307}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-259}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+32}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 19: 39.2% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{+112}:\\
\;\;\;\;x \cdot \left(1 + \frac{t}{a}\right)\\

\mathbf{elif}\;a \leq 2.45 \cdot 10^{-304}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 1.5 \cdot 10^{+32}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.69999999999999997e112

    1. Initial program 68.3%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/97.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-t}{\frac{a}{y - x}}} \]
    9. Simplified62.0%

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

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

    if -1.69999999999999997e112 < a < 2.4500000000000002e-304 or 1.70000000000000006e-259 < a < 1.5e32

    1. Initial program 73.2%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/81.1%

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

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

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

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

    if 2.4500000000000002e-304 < a < 1.70000000000000006e-259

    1. Initial program 78.8%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/79.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    10. Simplified62.6%

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

    if 1.5e32 < a

    1. Initial program 68.7%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/97.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.7 \cdot 10^{+112}:\\ \;\;\;\;x \cdot \left(1 + \frac{t}{a}\right)\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{-304}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-259}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+32}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 20: 49.1% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.19999999999999989e27 or 3.70000000000000012e39 < t

    1. Initial program 51.5%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/80.5%

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

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

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

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

    if -4.19999999999999989e27 < t < 3.70000000000000012e39

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+27}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{+39}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 21: 39.2% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -5.1 \cdot 10^{+95}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+32}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -5.1e+95) x (if (<= a 1.3e+32) y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -5.1e+95) {
		tmp = x;
	} else if (a <= 1.3e+32) {
		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.1d+95)) then
        tmp = x
    else if (a <= 1.3d+32) 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.1e+95) {
		tmp = x;
	} else if (a <= 1.3e+32) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -5.1e+95:
		tmp = x
	elif a <= 1.3e+32:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -5.1e+95)
		tmp = x;
	elseif (a <= 1.3e+32)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -5.1e+95)
		tmp = x;
	elseif (a <= 1.3e+32)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.1e+95], x, If[LessEqual[a, 1.3e+32], y, x]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 1.3 \cdot 10^{+32}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.10000000000000003e95 or 1.3000000000000001e32 < a

    1. Initial program 69.5%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/97.3%

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

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

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

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

    if -5.10000000000000003e95 < a < 1.3000000000000001e32

    1. Initial program 73.2%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/80.5%

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

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

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.1 \cdot 10^{+95}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+32}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 22: 25.5% accurate, 13.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 71.8%

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

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

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

      \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
    4. associate-/r/87.0%

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification22.5%

    \[\leadsto x \]

Developer target: 86.8% 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 2023333 
(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))))