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

Percentage Accurate: 68.1% → 88.7%
Time: 27.7s
Alternatives: 24
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 24 alternatives:

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

Initial Program: 68.1% accurate, 1.0× speedup?

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

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

Alternative 1: 88.7% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.04999999999999993e188 or 7.00000000000000038e218 < t

    1. Initial program 21.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 62.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-inv62.0%

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

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

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

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

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

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

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

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

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

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

        \[\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*61.5%

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

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

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

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

    if -1.04999999999999993e188 < t < 7.00000000000000038e218

    1. Initial program 75.3%

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

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

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

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

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

Alternative 2: 49.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ t_2 := \frac{y}{1 - \frac{a}{t}}\\ t_3 := x + \frac{y}{\frac{a}{z}}\\ t_4 := \frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{if}\;t \leq -5.5 \cdot 10^{+199}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -5 \cdot 10^{+68}:\\ \;\;\;\;\frac{-x}{\frac{t}{a - z}}\\ \mathbf{elif}\;t \leq -6 \cdot 10^{+37}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{+29}:\\ \;\;\;\;\left(-x\right) \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq -40000000000000:\\ \;\;\;\;t \cdot \frac{-y}{a - t}\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-26}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{-187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 10^{-68}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+20}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 1.28 \cdot 10^{+76}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+100}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+144}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a))))
        (t_2 (/ y (- 1.0 (/ a t))))
        (t_3 (+ x (/ y (/ a z))))
        (t_4 (/ (* z (- x y)) t)))
   (if (<= t -5.5e+199)
     t_2
     (if (<= t -5e+68)
       (/ (- x) (/ t (- a z)))
       (if (<= t -6e+37)
         t_3
         (if (<= t -4.6e+29)
           (* (- x) (/ z (- a t)))
           (if (<= t -40000000000000.0)
             (* t (/ (- y) (- a t)))
             (if (<= t -9e-26)
               t_3
               (if (<= t -2.05e-187)
                 t_1
                 (if (<= t 1e-68)
                   (+ x (/ z (/ a y)))
                   (if (<= t 1.2e+20)
                     t_4
                     (if (<= t 1.28e+76)
                       t_2
                       (if (<= t 8.5e+100)
                         t_4
                         (if (<= t 2.5e+144) t_1 t_2))))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double t_2 = y / (1.0 - (a / t));
	double t_3 = x + (y / (a / z));
	double t_4 = (z * (x - y)) / t;
	double tmp;
	if (t <= -5.5e+199) {
		tmp = t_2;
	} else if (t <= -5e+68) {
		tmp = -x / (t / (a - z));
	} else if (t <= -6e+37) {
		tmp = t_3;
	} else if (t <= -4.6e+29) {
		tmp = -x * (z / (a - t));
	} else if (t <= -40000000000000.0) {
		tmp = t * (-y / (a - t));
	} else if (t <= -9e-26) {
		tmp = t_3;
	} else if (t <= -2.05e-187) {
		tmp = t_1;
	} else if (t <= 1e-68) {
		tmp = x + (z / (a / y));
	} else if (t <= 1.2e+20) {
		tmp = t_4;
	} else if (t <= 1.28e+76) {
		tmp = t_2;
	} else if (t <= 8.5e+100) {
		tmp = t_4;
	} else if (t <= 2.5e+144) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = x * (1.0d0 - (z / a))
    t_2 = y / (1.0d0 - (a / t))
    t_3 = x + (y / (a / z))
    t_4 = (z * (x - y)) / t
    if (t <= (-5.5d+199)) then
        tmp = t_2
    else if (t <= (-5d+68)) then
        tmp = -x / (t / (a - z))
    else if (t <= (-6d+37)) then
        tmp = t_3
    else if (t <= (-4.6d+29)) then
        tmp = -x * (z / (a - t))
    else if (t <= (-40000000000000.0d0)) then
        tmp = t * (-y / (a - t))
    else if (t <= (-9d-26)) then
        tmp = t_3
    else if (t <= (-2.05d-187)) then
        tmp = t_1
    else if (t <= 1d-68) then
        tmp = x + (z / (a / y))
    else if (t <= 1.2d+20) then
        tmp = t_4
    else if (t <= 1.28d+76) then
        tmp = t_2
    else if (t <= 8.5d+100) then
        tmp = t_4
    else if (t <= 2.5d+144) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double t_2 = y / (1.0 - (a / t));
	double t_3 = x + (y / (a / z));
	double t_4 = (z * (x - y)) / t;
	double tmp;
	if (t <= -5.5e+199) {
		tmp = t_2;
	} else if (t <= -5e+68) {
		tmp = -x / (t / (a - z));
	} else if (t <= -6e+37) {
		tmp = t_3;
	} else if (t <= -4.6e+29) {
		tmp = -x * (z / (a - t));
	} else if (t <= -40000000000000.0) {
		tmp = t * (-y / (a - t));
	} else if (t <= -9e-26) {
		tmp = t_3;
	} else if (t <= -2.05e-187) {
		tmp = t_1;
	} else if (t <= 1e-68) {
		tmp = x + (z / (a / y));
	} else if (t <= 1.2e+20) {
		tmp = t_4;
	} else if (t <= 1.28e+76) {
		tmp = t_2;
	} else if (t <= 8.5e+100) {
		tmp = t_4;
	} else if (t <= 2.5e+144) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	t_2 = y / (1.0 - (a / t))
	t_3 = x + (y / (a / z))
	t_4 = (z * (x - y)) / t
	tmp = 0
	if t <= -5.5e+199:
		tmp = t_2
	elif t <= -5e+68:
		tmp = -x / (t / (a - z))
	elif t <= -6e+37:
		tmp = t_3
	elif t <= -4.6e+29:
		tmp = -x * (z / (a - t))
	elif t <= -40000000000000.0:
		tmp = t * (-y / (a - t))
	elif t <= -9e-26:
		tmp = t_3
	elif t <= -2.05e-187:
		tmp = t_1
	elif t <= 1e-68:
		tmp = x + (z / (a / y))
	elif t <= 1.2e+20:
		tmp = t_4
	elif t <= 1.28e+76:
		tmp = t_2
	elif t <= 8.5e+100:
		tmp = t_4
	elif t <= 2.5e+144:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	t_2 = Float64(y / Float64(1.0 - Float64(a / t)))
	t_3 = Float64(x + Float64(y / Float64(a / z)))
	t_4 = Float64(Float64(z * Float64(x - y)) / t)
	tmp = 0.0
	if (t <= -5.5e+199)
		tmp = t_2;
	elseif (t <= -5e+68)
		tmp = Float64(Float64(-x) / Float64(t / Float64(a - z)));
	elseif (t <= -6e+37)
		tmp = t_3;
	elseif (t <= -4.6e+29)
		tmp = Float64(Float64(-x) * Float64(z / Float64(a - t)));
	elseif (t <= -40000000000000.0)
		tmp = Float64(t * Float64(Float64(-y) / Float64(a - t)));
	elseif (t <= -9e-26)
		tmp = t_3;
	elseif (t <= -2.05e-187)
		tmp = t_1;
	elseif (t <= 1e-68)
		tmp = Float64(x + Float64(z / Float64(a / y)));
	elseif (t <= 1.2e+20)
		tmp = t_4;
	elseif (t <= 1.28e+76)
		tmp = t_2;
	elseif (t <= 8.5e+100)
		tmp = t_4;
	elseif (t <= 2.5e+144)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	t_2 = y / (1.0 - (a / t));
	t_3 = x + (y / (a / z));
	t_4 = (z * (x - y)) / t;
	tmp = 0.0;
	if (t <= -5.5e+199)
		tmp = t_2;
	elseif (t <= -5e+68)
		tmp = -x / (t / (a - z));
	elseif (t <= -6e+37)
		tmp = t_3;
	elseif (t <= -4.6e+29)
		tmp = -x * (z / (a - t));
	elseif (t <= -40000000000000.0)
		tmp = t * (-y / (a - t));
	elseif (t <= -9e-26)
		tmp = t_3;
	elseif (t <= -2.05e-187)
		tmp = t_1;
	elseif (t <= 1e-68)
		tmp = x + (z / (a / y));
	elseif (t <= 1.2e+20)
		tmp = t_4;
	elseif (t <= 1.28e+76)
		tmp = t_2;
	elseif (t <= 8.5e+100)
		tmp = t_4;
	elseif (t <= 2.5e+144)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / N[(1.0 - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[t, -5.5e+199], t$95$2, If[LessEqual[t, -5e+68], N[((-x) / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6e+37], t$95$3, If[LessEqual[t, -4.6e+29], N[((-x) * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -40000000000000.0], N[(t * N[((-y) / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9e-26], t$95$3, If[LessEqual[t, -2.05e-187], t$95$1, If[LessEqual[t, 1e-68], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e+20], t$95$4, If[LessEqual[t, 1.28e+76], t$95$2, If[LessEqual[t, 8.5e+100], t$95$4, If[LessEqual[t, 2.5e+144], t$95$1, t$95$2]]]]]]]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -6 \cdot 10^{+37}:\\
\;\;\;\;t_3\\

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

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

\mathbf{elif}\;t \leq -9 \cdot 10^{-26}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -2.05 \cdot 10^{-187}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.2 \cdot 10^{+20}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq 1.28 \cdot 10^{+76}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 8.5 \cdot 10^{+100}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq 2.5 \cdot 10^{+144}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if t < -5.5e199 or 1.2e20 < t < 1.27999999999999994e76 or 2.5e144 < t

    1. Initial program 29.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    8. Simplified66.4%

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

      \[\leadsto \frac{y}{\color{blue}{-1 \cdot \frac{a - t}{t}}} \]
    10. Step-by-step derivation
      1. mul-1-neg65.0%

        \[\leadsto \frac{y}{\color{blue}{-\frac{a - t}{t}}} \]
      2. div-sub65.0%

        \[\leadsto \frac{y}{-\color{blue}{\left(\frac{a}{t} - \frac{t}{t}\right)}} \]
      3. sub-neg65.0%

        \[\leadsto \frac{y}{-\color{blue}{\left(\frac{a}{t} + \left(-\frac{t}{t}\right)\right)}} \]
      4. *-inverses65.0%

        \[\leadsto \frac{y}{-\left(\frac{a}{t} + \left(-\color{blue}{1}\right)\right)} \]
      5. metadata-eval65.0%

        \[\leadsto \frac{y}{-\left(\frac{a}{t} + \color{blue}{-1}\right)} \]
    11. Simplified65.0%

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

    if -5.5e199 < t < -5.0000000000000004e68

    1. Initial program 47.6%

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

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

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

        \[\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 y around 0 27.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{t}{a + -1 \cdot z}}} \]
      3. neg-mul-153.2%

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

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

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

    if -5.0000000000000004e68 < t < -6.00000000000000043e37 or -4e13 < t < -8.9999999999999998e-26

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    9. Simplified56.5%

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

    if -6.00000000000000043e37 < t < -4.6000000000000002e29

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot z}{a - t}} \]
      2. neg-mul-1100.0%

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

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

    if -4.6000000000000002e29 < t < -4e13

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{a - t}} \]
    10. Step-by-step derivation
      1. mul-1-neg75.3%

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

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

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

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

    if -8.9999999999999998e-26 < t < -2.0500000000000001e-187 or 8.50000000000000043e100 < t < 2.5e144

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0500000000000001e-187 < t < 1.00000000000000007e-68

    1. Initial program 90.8%

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

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

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

        \[\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 t around 0 73.9%

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

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

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

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

    if 1.00000000000000007e-68 < t < 1.2e20 or 1.27999999999999994e76 < t < 8.50000000000000043e100

    1. Initial program 78.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 74.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-inv74.6%

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

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

        \[\leadsto y + \frac{\left(y - x\right) \cdot \left(-1 \cdot z + \color{blue}{a}\right)}{t} \]
      4. distribute-lft-in69.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-neg69.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-in69.1%

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

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

        \[\leadsto y + \frac{\color{blue}{-1 \cdot \left(z \cdot \left(y - x\right)\right)} + \left(y - x\right) \cdot a}{t} \]
      9. *-commutative69.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-sub69.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-neg69.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*69.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--69.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/69.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+199}:\\ \;\;\;\;\frac{y}{1 - \frac{a}{t}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{+68}:\\ \;\;\;\;\frac{-x}{\frac{t}{a - z}}\\ \mathbf{elif}\;t \leq -6 \cdot 10^{+37}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{+29}:\\ \;\;\;\;\left(-x\right) \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq -40000000000000:\\ \;\;\;\;t \cdot \frac{-y}{a - t}\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-26}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{-187}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 10^{-68}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+20}:\\ \;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;t \leq 1.28 \cdot 10^{+76}:\\ \;\;\;\;\frac{y}{1 - \frac{a}{t}}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+100}:\\ \;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+144}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{1 - \frac{a}{t}}\\ \end{array} \]

Alternative 3: 64.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;z \leq -3.7 \cdot 10^{+186}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -9 \cdot 10^{+134}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;z \leq -1900000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-214}:\\ \;\;\;\;x - \frac{t}{\frac{a - t}{y - x}}\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{-65}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+21}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* z (/ (- y x) (- a t)))))
   (if (<= z -3.7e+186)
     t_1
     (if (<= z -9e+134)
       (+ x (/ z (/ a (- y x))))
       (if (<= z -1900000000.0)
         t_1
         (if (<= z 5.2e-214)
           (- x (/ t (/ (- a t) (- y x))))
           (if (<= z 9.6e-65)
             (/ y (/ (- a t) (- z t)))
             (if (<= z 6.8e+21) (+ x (/ (- y x) (/ a (- z t)))) t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -3.7e+186) {
		tmp = t_1;
	} else if (z <= -9e+134) {
		tmp = x + (z / (a / (y - x)));
	} else if (z <= -1900000000.0) {
		tmp = t_1;
	} else if (z <= 5.2e-214) {
		tmp = x - (t / ((a - t) / (y - x)));
	} else if (z <= 9.6e-65) {
		tmp = y / ((a - t) / (z - t));
	} else if (z <= 6.8e+21) {
		tmp = x + ((y - x) / (a / (z - t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = z * ((y - x) / (a - t))
    if (z <= (-3.7d+186)) then
        tmp = t_1
    else if (z <= (-9d+134)) then
        tmp = x + (z / (a / (y - x)))
    else if (z <= (-1900000000.0d0)) then
        tmp = t_1
    else if (z <= 5.2d-214) then
        tmp = x - (t / ((a - t) / (y - x)))
    else if (z <= 9.6d-65) then
        tmp = y / ((a - t) / (z - t))
    else if (z <= 6.8d+21) then
        tmp = x + ((y - x) / (a / (z - t)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -3.7e+186) {
		tmp = t_1;
	} else if (z <= -9e+134) {
		tmp = x + (z / (a / (y - x)));
	} else if (z <= -1900000000.0) {
		tmp = t_1;
	} else if (z <= 5.2e-214) {
		tmp = x - (t / ((a - t) / (y - x)));
	} else if (z <= 9.6e-65) {
		tmp = y / ((a - t) / (z - t));
	} else if (z <= 6.8e+21) {
		tmp = x + ((y - x) / (a / (z - t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z * ((y - x) / (a - t))
	tmp = 0
	if z <= -3.7e+186:
		tmp = t_1
	elif z <= -9e+134:
		tmp = x + (z / (a / (y - x)))
	elif z <= -1900000000.0:
		tmp = t_1
	elif z <= 5.2e-214:
		tmp = x - (t / ((a - t) / (y - x)))
	elif z <= 9.6e-65:
		tmp = y / ((a - t) / (z - t))
	elif z <= 6.8e+21:
		tmp = x + ((y - x) / (a / (z - t)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z * Float64(Float64(y - x) / Float64(a - t)))
	tmp = 0.0
	if (z <= -3.7e+186)
		tmp = t_1;
	elseif (z <= -9e+134)
		tmp = Float64(x + Float64(z / Float64(a / Float64(y - x))));
	elseif (z <= -1900000000.0)
		tmp = t_1;
	elseif (z <= 5.2e-214)
		tmp = Float64(x - Float64(t / Float64(Float64(a - t) / Float64(y - x))));
	elseif (z <= 9.6e-65)
		tmp = Float64(y / Float64(Float64(a - t) / Float64(z - t)));
	elseif (z <= 6.8e+21)
		tmp = Float64(x + Float64(Float64(y - x) / Float64(a / Float64(z - t))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = z * ((y - x) / (a - t));
	tmp = 0.0;
	if (z <= -3.7e+186)
		tmp = t_1;
	elseif (z <= -9e+134)
		tmp = x + (z / (a / (y - x)));
	elseif (z <= -1900000000.0)
		tmp = t_1;
	elseif (z <= 5.2e-214)
		tmp = x - (t / ((a - t) / (y - x)));
	elseif (z <= 9.6e-65)
		tmp = y / ((a - t) / (z - t));
	elseif (z <= 6.8e+21)
		tmp = x + ((y - x) / (a / (z - t)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.7e+186], t$95$1, If[LessEqual[z, -9e+134], N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1900000000.0], t$95$1, If[LessEqual[z, 5.2e-214], N[(x - N[(t / N[(N[(a - t), $MachinePrecision] / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.6e-65], N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+21], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -1900000000:\\
\;\;\;\;t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.7e186 or -8.9999999999999995e134 < z < -1.9e9 or 6.8e21 < z

    1. Initial program 66.1%

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

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

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

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

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

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

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

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

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

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

    if -3.7e186 < z < -8.9999999999999995e134

    1. Initial program 47.9%

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

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

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

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

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

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

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

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

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

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

    if -1.9e9 < z < 5.2e-214

    1. Initial program 69.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a - t}{y - x}}} \]
    8. Simplified69.8%

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

    if 5.2e-214 < z < 9.6000000000000006e-65

    1. Initial program 46.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.6000000000000006e-65 < z < 6.8e21

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{+186}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq -9 \cdot 10^{+134}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;z \leq -1900000000:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-214}:\\ \;\;\;\;x - \frac{t}{\frac{a - t}{y - x}}\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{-65}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+21}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \end{array} \]

Alternative 4: 50.4% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 4.2 \cdot 10^{+19}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 9.5 \cdot 10^{+75}:\\
\;\;\;\;t \cdot \frac{-y}{a - t}\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{+98}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 9.8 \cdot 10^{+148}:\\
\;\;\;\;\frac{-t}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if t < -2.0500000000000001e201 or 9.8e148 < t

    1. Initial program 24.1%

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

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

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

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

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

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

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

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

    if -2.0500000000000001e201 < t < -1.8000000000000001e69

    1. Initial program 47.6%

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

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

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

        \[\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 y around 0 27.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{t}{a + -1 \cdot z}}} \]
      3. neg-mul-153.2%

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

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

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

    if -1.8000000000000001e69 < t < 9.50000000000000094e-69

    1. Initial program 86.5%

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

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative86.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/93.5%

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

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

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

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

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

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

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

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

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

    if 9.50000000000000094e-69 < t < 4.2e19 or 9.50000000000000061e75 < t < 2.20000000000000009e98

    1. Initial program 78.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 74.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-inv74.6%

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

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

        \[\leadsto y + \frac{\left(y - x\right) \cdot \left(-1 \cdot z + \color{blue}{a}\right)}{t} \]
      4. distribute-lft-in69.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-neg69.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-in69.1%

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

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

        \[\leadsto y + \frac{\color{blue}{-1 \cdot \left(z \cdot \left(y - x\right)\right)} + \left(y - x\right) \cdot a}{t} \]
      9. *-commutative69.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-sub69.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-neg69.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*69.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--69.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/69.1%

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

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

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

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

    if 4.2e19 < t < 9.50000000000000061e75

    1. Initial program 62.5%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{a - t}} \]
    10. Step-by-step derivation
      1. mul-1-neg42.7%

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

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

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

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

    if 2.20000000000000009e98 < t < 7.0000000000000002e146

    1. Initial program 46.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.0000000000000002e146 < t < 9.8e148

    1. Initial program 5.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{a}} \]
    11. Step-by-step derivation
      1. mul-1-neg6.2%

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a}{y}}} \]
      3. distribute-neg-frac52.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.05 \cdot 10^{+201}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{+69}:\\ \;\;\;\;\frac{-x}{\frac{t}{a - z}}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-69}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+19}:\\ \;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+75}:\\ \;\;\;\;t \cdot \frac{-y}{a - t}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+98}:\\ \;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+146}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{+148}:\\ \;\;\;\;\frac{-t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 5: 58.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -1.4 \cdot 10^{-137}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -3 \cdot 10^{-155}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;a \leq -2.45 \cdot 10^{-266}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 4.8 \cdot 10^{+92}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.00000000000000038e169 < a < -1.3999999999999999e-137 or -2.99999999999999984e-155 < a < -2.04999999999999993e-200 or -2.4500000000000001e-266 < a < 4.80000000000000009e92

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

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

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

    if -1.3999999999999999e-137 < a < -2.99999999999999984e-155 or -2.04999999999999993e-200 < a < -2.4500000000000001e-266

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot z}{a - t}} \]
      2. neg-mul-181.8%

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

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

    if 4.80000000000000009e92 < a

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{+169}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-137}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-155}:\\ \;\;\;\;\left(-x\right) \cdot \frac{z}{a - t}\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-200}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -2.45 \cdot 10^{-266}:\\ \;\;\;\;\left(-x\right) \cdot \frac{z}{a - t}\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{+92}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \end{array} \]

Alternative 6: 58.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -2.9 \cdot 10^{-137}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq -1.95 \cdot 10^{-181}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 7.4 \cdot 10^{+90}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.8e168

    1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8e168 < a < -2.89999999999999985e-137 or -9.1999999999999998e-156 < a < -1.95e-181 or -8.0000000000000004e-293 < a < 7.4e90

    1. Initial program 62.7%

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

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

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

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

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

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

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

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

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

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

    if -2.89999999999999985e-137 < a < -9.1999999999999998e-156

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot z}{a - t}} \]
      2. neg-mul-1100.0%

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

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

    if -1.95e-181 < a < -8.0000000000000004e-293

    1. Initial program 82.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 82.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-inv82.7%

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

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

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

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

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

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

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

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

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

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

        \[\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*82.7%

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

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

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

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

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

    if 7.4e90 < a

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{+168}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-137}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{-156}:\\ \;\;\;\;\left(-x\right) \cdot \frac{z}{a - t}\\ \mathbf{elif}\;a \leq -1.95 \cdot 10^{-181}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-293}:\\ \;\;\;\;z \cdot \left(\frac{x}{t} - \frac{y}{t}\right)\\ \mathbf{elif}\;a \leq 7.4 \cdot 10^{+90}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \end{array} \]

Alternative 7: 59.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;z \leq -4100000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-62}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.08 \cdot 10^{-111}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-211}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-300}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t)))) (t_2 (* z (/ (- y x) (- a t)))))
   (if (<= z -4100000000.0)
     t_2
     (if (<= z -6e-62)
       t_1
       (if (<= z -1.08e-111)
         (+ x (/ z (/ a y)))
         (if (<= z -1e-211)
           t_1
           (if (<= z -9.5e-300) x (if (<= z 2.4e+21) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -4100000000.0) {
		tmp = t_2;
	} else if (z <= -6e-62) {
		tmp = t_1;
	} else if (z <= -1.08e-111) {
		tmp = x + (z / (a / y));
	} else if (z <= -1e-211) {
		tmp = t_1;
	} else if (z <= -9.5e-300) {
		tmp = x;
	} else if (z <= 2.4e+21) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((z - t) / (a - t))
    t_2 = z * ((y - x) / (a - t))
    if (z <= (-4100000000.0d0)) then
        tmp = t_2
    else if (z <= (-6d-62)) then
        tmp = t_1
    else if (z <= (-1.08d-111)) then
        tmp = x + (z / (a / y))
    else if (z <= (-1d-211)) then
        tmp = t_1
    else if (z <= (-9.5d-300)) then
        tmp = x
    else if (z <= 2.4d+21) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -4100000000.0) {
		tmp = t_2;
	} else if (z <= -6e-62) {
		tmp = t_1;
	} else if (z <= -1.08e-111) {
		tmp = x + (z / (a / y));
	} else if (z <= -1e-211) {
		tmp = t_1;
	} else if (z <= -9.5e-300) {
		tmp = x;
	} else if (z <= 2.4e+21) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	t_2 = z * ((y - x) / (a - t))
	tmp = 0
	if z <= -4100000000.0:
		tmp = t_2
	elif z <= -6e-62:
		tmp = t_1
	elif z <= -1.08e-111:
		tmp = x + (z / (a / y))
	elif z <= -1e-211:
		tmp = t_1
	elif z <= -9.5e-300:
		tmp = x
	elif z <= 2.4e+21:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	t_2 = Float64(z * Float64(Float64(y - x) / Float64(a - t)))
	tmp = 0.0
	if (z <= -4100000000.0)
		tmp = t_2;
	elseif (z <= -6e-62)
		tmp = t_1;
	elseif (z <= -1.08e-111)
		tmp = Float64(x + Float64(z / Float64(a / y)));
	elseif (z <= -1e-211)
		tmp = t_1;
	elseif (z <= -9.5e-300)
		tmp = x;
	elseif (z <= 2.4e+21)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	t_2 = z * ((y - x) / (a - t));
	tmp = 0.0;
	if (z <= -4100000000.0)
		tmp = t_2;
	elseif (z <= -6e-62)
		tmp = t_1;
	elseif (z <= -1.08e-111)
		tmp = x + (z / (a / y));
	elseif (z <= -1e-211)
		tmp = t_1;
	elseif (z <= -9.5e-300)
		tmp = x;
	elseif (z <= 2.4e+21)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4100000000.0], t$95$2, If[LessEqual[z, -6e-62], t$95$1, If[LessEqual[z, -1.08e-111], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1e-211], t$95$1, If[LessEqual[z, -9.5e-300], x, If[LessEqual[z, 2.4e+21], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
t_2 := z \cdot \frac{y - x}{a - t}\\
\mathbf{if}\;z \leq -4100000000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -6 \cdot 10^{-62}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.08 \cdot 10^{-111}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\

\mathbf{elif}\;z \leq -1 \cdot 10^{-211}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -9.5 \cdot 10^{-300}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{+21}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.1e9 or 2.4e21 < z

    1. Initial program 64.5%

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

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

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

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

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

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

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

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

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

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

    if -4.1e9 < z < -6.0000000000000002e-62 or -1.08e-111 < z < -1.00000000000000009e-211 or -9.5000000000000007e-300 < z < 2.4e21

    1. Initial program 63.7%

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

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

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

        \[\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 y around inf 61.5%

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

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

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

    if -6.0000000000000002e-62 < z < -1.08e-111

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000009e-211 < z < -9.5000000000000007e-300

    1. Initial program 71.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4100000000:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-62}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq -1.08 \cdot 10^{-111}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-211}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-300}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+21}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \end{array} \]

Alternative 8: 33.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+121}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{+74}:\\ \;\;\;\;\frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-65}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-300}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-67}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+34}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+48}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.3e+121)
   (* x (/ z t))
   (if (<= z -1.95e+74)
     (/ y (/ a z))
     (if (<= z -2.7e-65)
       y
       (if (<= z -1.2e-300)
         x
         (if (<= z 2.1e-67)
           y
           (if (<= z 4e+34) x (if (<= z 2.35e+48) y (/ x (/ t z))))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.3e+121) {
		tmp = x * (z / t);
	} else if (z <= -1.95e+74) {
		tmp = y / (a / z);
	} else if (z <= -2.7e-65) {
		tmp = y;
	} else if (z <= -1.2e-300) {
		tmp = x;
	} else if (z <= 2.1e-67) {
		tmp = y;
	} else if (z <= 4e+34) {
		tmp = x;
	} else if (z <= 2.35e+48) {
		tmp = y;
	} else {
		tmp = x / (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 <= (-2.3d+121)) then
        tmp = x * (z / t)
    else if (z <= (-1.95d+74)) then
        tmp = y / (a / z)
    else if (z <= (-2.7d-65)) then
        tmp = y
    else if (z <= (-1.2d-300)) then
        tmp = x
    else if (z <= 2.1d-67) then
        tmp = y
    else if (z <= 4d+34) then
        tmp = x
    else if (z <= 2.35d+48) then
        tmp = y
    else
        tmp = x / (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 <= -2.3e+121) {
		tmp = x * (z / t);
	} else if (z <= -1.95e+74) {
		tmp = y / (a / z);
	} else if (z <= -2.7e-65) {
		tmp = y;
	} else if (z <= -1.2e-300) {
		tmp = x;
	} else if (z <= 2.1e-67) {
		tmp = y;
	} else if (z <= 4e+34) {
		tmp = x;
	} else if (z <= 2.35e+48) {
		tmp = y;
	} else {
		tmp = x / (t / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.3e+121:
		tmp = x * (z / t)
	elif z <= -1.95e+74:
		tmp = y / (a / z)
	elif z <= -2.7e-65:
		tmp = y
	elif z <= -1.2e-300:
		tmp = x
	elif z <= 2.1e-67:
		tmp = y
	elif z <= 4e+34:
		tmp = x
	elif z <= 2.35e+48:
		tmp = y
	else:
		tmp = x / (t / z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.3e+121)
		tmp = Float64(x * Float64(z / t));
	elseif (z <= -1.95e+74)
		tmp = Float64(y / Float64(a / z));
	elseif (z <= -2.7e-65)
		tmp = y;
	elseif (z <= -1.2e-300)
		tmp = x;
	elseif (z <= 2.1e-67)
		tmp = y;
	elseif (z <= 4e+34)
		tmp = x;
	elseif (z <= 2.35e+48)
		tmp = y;
	else
		tmp = Float64(x / Float64(t / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2.3e+121)
		tmp = x * (z / t);
	elseif (z <= -1.95e+74)
		tmp = y / (a / z);
	elseif (z <= -2.7e-65)
		tmp = y;
	elseif (z <= -1.2e-300)
		tmp = x;
	elseif (z <= 2.1e-67)
		tmp = y;
	elseif (z <= 4e+34)
		tmp = x;
	elseif (z <= 2.35e+48)
		tmp = y;
	else
		tmp = x / (t / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+121], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.95e+74], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.7e-65], y, If[LessEqual[z, -1.2e-300], x, If[LessEqual[z, 2.1e-67], y, If[LessEqual[z, 4e+34], x, If[LessEqual[z, 2.35e+48], y, N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -2.7 \cdot 10^{-65}:\\
\;\;\;\;y\\

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-300}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-67}:\\
\;\;\;\;y\\

\mathbf{elif}\;z \leq 4 \cdot 10^{+34}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.35 \cdot 10^{+48}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t}{z}}\\


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

    1. Initial program 59.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2999999999999999e121 < z < -1.95000000000000004e74

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.95000000000000004e74 < z < -2.6999999999999999e-65 or -1.2e-300 < z < 2.1000000000000002e-67 or 3.99999999999999978e34 < z < 2.35000000000000006e48

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

    if -2.6999999999999999e-65 < z < -1.2e-300 or 2.1000000000000002e-67 < z < 3.99999999999999978e34

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

    if 2.35000000000000006e48 < z

    1. Initial program 58.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+121}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{+74}:\\ \;\;\;\;\frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-65}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-300}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-67}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+34}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+48}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \end{array} \]

Alternative 9: 59.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z}{\frac{a}{y - x}}\\ t_2 := z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;z \leq -1.55 \cdot 10^{+187}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+134}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-68}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+24}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ z (/ a (- y x))))) (t_2 (* z (/ (- y x) (- a t)))))
   (if (<= z -1.55e+187)
     t_2
     (if (<= z -5e+134)
       t_1
       (if (<= z -2000000000.0)
         t_2
         (if (<= z 2.9e-68)
           (* y (/ (- z t) (- a t)))
           (if (<= z 1.15e+24) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z / (a / (y - x)));
	double t_2 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -1.55e+187) {
		tmp = t_2;
	} else if (z <= -5e+134) {
		tmp = t_1;
	} else if (z <= -2000000000.0) {
		tmp = t_2;
	} else if (z <= 2.9e-68) {
		tmp = y * ((z - t) / (a - t));
	} else if (z <= 1.15e+24) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (z / (a / (y - x)))
    t_2 = z * ((y - x) / (a - t))
    if (z <= (-1.55d+187)) then
        tmp = t_2
    else if (z <= (-5d+134)) then
        tmp = t_1
    else if (z <= (-2000000000.0d0)) then
        tmp = t_2
    else if (z <= 2.9d-68) then
        tmp = y * ((z - t) / (a - t))
    else if (z <= 1.15d+24) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z / (a / (y - x)));
	double t_2 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -1.55e+187) {
		tmp = t_2;
	} else if (z <= -5e+134) {
		tmp = t_1;
	} else if (z <= -2000000000.0) {
		tmp = t_2;
	} else if (z <= 2.9e-68) {
		tmp = y * ((z - t) / (a - t));
	} else if (z <= 1.15e+24) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z / (a / (y - x)))
	t_2 = z * ((y - x) / (a - t))
	tmp = 0
	if z <= -1.55e+187:
		tmp = t_2
	elif z <= -5e+134:
		tmp = t_1
	elif z <= -2000000000.0:
		tmp = t_2
	elif z <= 2.9e-68:
		tmp = y * ((z - t) / (a - t))
	elif z <= 1.15e+24:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z / Float64(a / Float64(y - x))))
	t_2 = Float64(z * Float64(Float64(y - x) / Float64(a - t)))
	tmp = 0.0
	if (z <= -1.55e+187)
		tmp = t_2;
	elseif (z <= -5e+134)
		tmp = t_1;
	elseif (z <= -2000000000.0)
		tmp = t_2;
	elseif (z <= 2.9e-68)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	elseif (z <= 1.15e+24)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z / (a / (y - x)));
	t_2 = z * ((y - x) / (a - t));
	tmp = 0.0;
	if (z <= -1.55e+187)
		tmp = t_2;
	elseif (z <= -5e+134)
		tmp = t_1;
	elseif (z <= -2000000000.0)
		tmp = t_2;
	elseif (z <= 2.9e-68)
		tmp = y * ((z - t) / (a - t));
	elseif (z <= 1.15e+24)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.55e+187], t$95$2, If[LessEqual[z, -5e+134], t$95$1, If[LessEqual[z, -2000000000.0], t$95$2, If[LessEqual[z, 2.9e-68], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e+24], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -5 \cdot 10^{+134}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2000000000:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+24}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.55000000000000006e187 or -4.99999999999999981e134 < z < -2e9 or 1.15e24 < z

    1. Initial program 66.1%

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

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

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

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

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

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

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

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

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

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

    if -1.55000000000000006e187 < z < -4.99999999999999981e134 or 2.9e-68 < z < 1.15e24

    1. Initial program 67.9%

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

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

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

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

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

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

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

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

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

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

    if -2e9 < z < 2.9e-68

    1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+187}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+134}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;z \leq -2000000000:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-68}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+24}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \end{array} \]

Alternative 10: 59.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -1.2 \cdot 10^{+135}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -160000000000:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+22}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.60000000000000047e186 or -1.19999999999999999e135 < z < -1.6e11 or 1.6e22 < z

    1. Initial program 66.1%

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

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

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

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

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

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

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

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

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

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

    if -6.60000000000000047e186 < z < -1.19999999999999999e135 or 3.99999999999999982e-57 < z < 1.6e22

    1. Initial program 67.9%

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

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

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

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

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

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

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

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

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

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

    if -1.6e11 < z < 3.99999999999999982e-57

    1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+186}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{+135}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;z \leq -160000000000:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-57}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+22}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \end{array} \]

Alternative 11: 45.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{if}\;t \leq -1.7 \cdot 10^{+199}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-19}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-219}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-163}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{+30}:\\ \;\;\;\;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 -1.7e+199)
     y
     (if (<= t -3.4e-19)
       (* x (/ (- z a) t))
       (if (<= t 8.5e-219)
         t_1
         (if (<= t 2e-163) (* z (/ y (- a t))) (if (<= t 3.7e+30) 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 <= -1.7e+199) {
		tmp = y;
	} else if (t <= -3.4e-19) {
		tmp = x * ((z - a) / t);
	} else if (t <= 8.5e-219) {
		tmp = t_1;
	} else if (t <= 2e-163) {
		tmp = z * (y / (a - t));
	} else if (t <= 3.7e+30) {
		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 <= (-1.7d+199)) then
        tmp = y
    else if (t <= (-3.4d-19)) then
        tmp = x * ((z - a) / t)
    else if (t <= 8.5d-219) then
        tmp = t_1
    else if (t <= 2d-163) then
        tmp = z * (y / (a - t))
    else if (t <= 3.7d+30) 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 <= -1.7e+199) {
		tmp = y;
	} else if (t <= -3.4e-19) {
		tmp = x * ((z - a) / t);
	} else if (t <= 8.5e-219) {
		tmp = t_1;
	} else if (t <= 2e-163) {
		tmp = z * (y / (a - t));
	} else if (t <= 3.7e+30) {
		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 <= -1.7e+199:
		tmp = y
	elif t <= -3.4e-19:
		tmp = x * ((z - a) / t)
	elif t <= 8.5e-219:
		tmp = t_1
	elif t <= 2e-163:
		tmp = z * (y / (a - t))
	elif t <= 3.7e+30:
		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 <= -1.7e+199)
		tmp = y;
	elseif (t <= -3.4e-19)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (t <= 8.5e-219)
		tmp = t_1;
	elseif (t <= 2e-163)
		tmp = Float64(z * Float64(y / Float64(a - t)));
	elseif (t <= 3.7e+30)
		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 <= -1.7e+199)
		tmp = y;
	elseif (t <= -3.4e-19)
		tmp = x * ((z - a) / t);
	elseif (t <= 8.5e-219)
		tmp = t_1;
	elseif (t <= 2e-163)
		tmp = z * (y / (a - t));
	elseif (t <= 3.7e+30)
		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, -1.7e+199], y, If[LessEqual[t, -3.4e-19], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e-219], t$95$1, If[LessEqual[t, 2e-163], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.7e+30], t$95$1, y]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-219}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 3.7 \cdot 10^{+30}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.7e199 or 3.70000000000000016e30 < t

    1. Initial program 31.6%

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

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

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

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

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

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

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

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

    if -1.7e199 < t < -3.4000000000000002e-19

    1. Initial program 64.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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*57.8%

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

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

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

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

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

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

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

    if -3.4000000000000002e-19 < t < 8.49999999999999964e-219 or 1.99999999999999985e-163 < t < 3.70000000000000016e30

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.49999999999999964e-219 < t < 1.99999999999999985e-163

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+199}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-19}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-219}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-163}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{+30}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 12: 87.7% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.70000000000000001e123 or 1.20000000000000001e150 < t

    1. Initial program 25.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y + \frac{\left(y - x\right) \cdot \left(-1 \cdot z + \color{blue}{a}\right)}{t} \]
      4. distribute-lft-in59.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-neg59.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-in59.0%

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

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

        \[\leadsto y + \frac{\color{blue}{-1 \cdot \left(z \cdot \left(y - x\right)\right)} + \left(y - x\right) \cdot a}{t} \]
      9. *-commutative59.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-sub59.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-neg59.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*59.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--59.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/59.0%

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

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

    if -1.70000000000000001e123 < t < 1.20000000000000001e150

    1. Initial program 80.4%

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

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

      \[\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.7 \cdot 10^{+123} \lor \neg \left(t \leq 1.2 \cdot 10^{+150}\right):\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - z\right) \cdot \frac{x - y}{a - t}\\ \end{array} \]

Alternative 13: 88.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7.8 \cdot 10^{+180} \lor \neg \left(t \leq 1.32 \cdot 10^{+219}\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 -7.8e+180) (not (<= t 1.32e+219)))
   (+ 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 <= -7.8e+180) || !(t <= 1.32e+219)) {
		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 <= (-7.8d+180)) .or. (.not. (t <= 1.32d+219))) 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 <= -7.8e+180) || !(t <= 1.32e+219)) {
		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 <= -7.8e+180) or not (t <= 1.32e+219):
		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 <= -7.8e+180) || !(t <= 1.32e+219))
		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 <= -7.8e+180) || ~((t <= 1.32e+219)))
		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, -7.8e+180], N[Not[LessEqual[t, 1.32e+219]], $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 -7.8 \cdot 10^{+180} \lor \neg \left(t \leq 1.32 \cdot 10^{+219}\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 < -7.8000000000000002e180 or 1.31999999999999999e219 < t

    1. Initial program 21.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 62.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-inv62.0%

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

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

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

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

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

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

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

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

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

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

        \[\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*61.5%

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

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

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

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

    if -7.8000000000000002e180 < t < 1.31999999999999999e219

    1. Initial program 75.3%

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

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

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

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

Alternative 14: 32.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{t}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+107}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.1 \cdot 10^{-299}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2 \cdot 10^{-65}:\\
\;\;\;\;y\\

\mathbf{elif}\;z \leq 4 \cdot 10^{+37}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 7 \cdot 10^{+47}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.2e107 or 7.00000000000000031e47 < z

    1. Initial program 60.0%

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

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

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

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

        \[\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 y around 0 34.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2e107 < z < -1.1e-299 or 1.99999999999999985e-65 < z < 3.99999999999999982e37

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

    if -1.1e-299 < z < 1.99999999999999985e-65 or 3.99999999999999982e37 < z < 7.00000000000000031e47

    1. Initial program 58.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+107}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-299}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-65}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+37}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+47}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \end{array} \]

Alternative 15: 32.6% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -1.6 \cdot 10^{-300}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-66}:\\
\;\;\;\;y\\

\mathbf{elif}\;z \leq 1.75 \cdot 10^{+40}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 8.8 \cdot 10^{+48}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t}{z}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.0999999999999999e106

    1. Initial program 62.0%

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

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

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*90.6%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/92.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def92.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified92.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in y around 0 37.3%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}} \]
    5. Step-by-step derivation
      1. *-rgt-identity37.3%

        \[\leadsto \color{blue}{x \cdot 1} + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t} \]
      2. associate-*r/37.3%

        \[\leadsto x \cdot 1 + \color{blue}{\frac{-1 \cdot \left(x \cdot \left(z - t\right)\right)}{a - t}} \]
      3. mul-1-neg37.3%

        \[\leadsto x \cdot 1 + \frac{\color{blue}{-x \cdot \left(z - t\right)}}{a - t} \]
      4. distribute-lft-neg-out37.3%

        \[\leadsto x \cdot 1 + \frac{\color{blue}{\left(-x\right) \cdot \left(z - t\right)}}{a - t} \]
      5. associate-*r/57.1%

        \[\leadsto x \cdot 1 + \color{blue}{\left(-x\right) \cdot \frac{z - t}{a - t}} \]
      6. distribute-lft-neg-out57.1%

        \[\leadsto x \cdot 1 + \color{blue}{\left(-x \cdot \frac{z - t}{a - t}\right)} \]
      7. distribute-rgt-neg-in57.1%

        \[\leadsto x \cdot 1 + \color{blue}{x \cdot \left(-\frac{z - t}{a - t}\right)} \]
      8. mul-1-neg57.1%

        \[\leadsto x \cdot 1 + x \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{a - t}\right)} \]
      9. distribute-lft-in57.1%

        \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
      10. mul-1-neg57.1%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z - t}{a - t}\right)}\right) \]
      11. unsub-neg57.1%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    6. Simplified57.1%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z - t}{a - t}\right)} \]
    7. Taylor expanded in a around 0 36.5%

      \[\leadsto x \cdot \color{blue}{\frac{z}{t}} \]

    if -3.0999999999999999e106 < z < -1.60000000000000011e-300 or 1.1000000000000001e-66 < z < 1.75e40

    1. Initial program 73.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative73.8%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative73.8%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*85.1%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/87.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def87.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified87.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in a around inf 38.7%

      \[\leadsto \color{blue}{x} \]

    if -1.60000000000000011e-300 < z < 1.1000000000000001e-66 or 1.75e40 < z < 8.7999999999999997e48

    1. Initial program 58.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative58.3%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative58.3%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*66.0%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/73.3%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def73.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified73.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 57.0%

      \[\leadsto \color{blue}{y} \]

    if 8.7999999999999997e48 < z

    1. Initial program 58.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative58.0%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative58.0%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*77.6%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/75.8%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def75.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified75.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in y around 0 31.9%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}} \]
    5. Step-by-step derivation
      1. *-rgt-identity31.9%

        \[\leadsto \color{blue}{x \cdot 1} + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t} \]
      2. associate-*r/31.9%

        \[\leadsto x \cdot 1 + \color{blue}{\frac{-1 \cdot \left(x \cdot \left(z - t\right)\right)}{a - t}} \]
      3. mul-1-neg31.9%

        \[\leadsto x \cdot 1 + \frac{\color{blue}{-x \cdot \left(z - t\right)}}{a - t} \]
      4. distribute-lft-neg-out31.9%

        \[\leadsto x \cdot 1 + \frac{\color{blue}{\left(-x\right) \cdot \left(z - t\right)}}{a - t} \]
      5. associate-*r/44.0%

        \[\leadsto x \cdot 1 + \color{blue}{\left(-x\right) \cdot \frac{z - t}{a - t}} \]
      6. distribute-lft-neg-out44.0%

        \[\leadsto x \cdot 1 + \color{blue}{\left(-x \cdot \frac{z - t}{a - t}\right)} \]
      7. distribute-rgt-neg-in44.0%

        \[\leadsto x \cdot 1 + \color{blue}{x \cdot \left(-\frac{z - t}{a - t}\right)} \]
      8. mul-1-neg44.0%

        \[\leadsto x \cdot 1 + x \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{a - t}\right)} \]
      9. distribute-lft-in44.0%

        \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
      10. mul-1-neg44.0%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z - t}{a - t}\right)}\right) \]
      11. unsub-neg44.0%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    6. Simplified44.0%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z - t}{a - t}\right)} \]
    7. Taylor expanded in a around 0 27.7%

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    8. Step-by-step derivation
      1. associate-/l*46.6%

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    9. Simplified46.6%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification43.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+106}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-300}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-66}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+40}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+48}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \end{array} \]

Alternative 16: 50.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.05 \cdot 10^{+200}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{+67}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-69}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{+20}:\\ \;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+29}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -2.05e+200)
   y
   (if (<= t -2.1e+67)
     (* x (/ (- z a) t))
     (if (<= t 6e-69)
       (+ x (/ y (/ a z)))
       (if (<= t 2.55e+20) (/ (* z (- x y)) t) (if (<= t 8e+29) x y))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -2.05e+200) {
		tmp = y;
	} else if (t <= -2.1e+67) {
		tmp = x * ((z - a) / t);
	} else if (t <= 6e-69) {
		tmp = x + (y / (a / z));
	} else if (t <= 2.55e+20) {
		tmp = (z * (x - y)) / t;
	} else if (t <= 8e+29) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-2.05d+200)) then
        tmp = y
    else if (t <= (-2.1d+67)) then
        tmp = x * ((z - a) / t)
    else if (t <= 6d-69) then
        tmp = x + (y / (a / z))
    else if (t <= 2.55d+20) then
        tmp = (z * (x - y)) / t
    else if (t <= 8d+29) then
        tmp = x
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -2.05e+200) {
		tmp = y;
	} else if (t <= -2.1e+67) {
		tmp = x * ((z - a) / t);
	} else if (t <= 6e-69) {
		tmp = x + (y / (a / z));
	} else if (t <= 2.55e+20) {
		tmp = (z * (x - y)) / t;
	} else if (t <= 8e+29) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -2.05e+200:
		tmp = y
	elif t <= -2.1e+67:
		tmp = x * ((z - a) / t)
	elif t <= 6e-69:
		tmp = x + (y / (a / z))
	elif t <= 2.55e+20:
		tmp = (z * (x - y)) / t
	elif t <= 8e+29:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -2.05e+200)
		tmp = y;
	elseif (t <= -2.1e+67)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (t <= 6e-69)
		tmp = Float64(x + Float64(y / Float64(a / z)));
	elseif (t <= 2.55e+20)
		tmp = Float64(Float64(z * Float64(x - y)) / t);
	elseif (t <= 8e+29)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -2.05e+200)
		tmp = y;
	elseif (t <= -2.1e+67)
		tmp = x * ((z - a) / t);
	elseif (t <= 6e-69)
		tmp = x + (y / (a / z));
	elseif (t <= 2.55e+20)
		tmp = (z * (x - y)) / t;
	elseif (t <= 8e+29)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.05e+200], y, If[LessEqual[t, -2.1e+67], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-69], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.55e+20], N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 8e+29], x, y]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{+200}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -2.1 \cdot 10^{+67}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

\mathbf{elif}\;t \leq 6 \cdot 10^{-69}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\

\mathbf{elif}\;t \leq 2.55 \cdot 10^{+20}:\\
\;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\

\mathbf{elif}\;t \leq 8 \cdot 10^{+29}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.0500000000000001e200 or 7.99999999999999931e29 < t

    1. Initial program 31.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative31.6%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative31.6%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*60.7%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/65.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def65.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified65.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 54.4%

      \[\leadsto \color{blue}{y} \]

    if -2.0500000000000001e200 < t < -2.1000000000000001e67

    1. Initial program 47.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative47.6%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative47.6%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*76.9%

        \[\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 50.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-inv50.7%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \color{blue}{\left(-1 \cdot z + \left(--1\right) \cdot a\right)}}{t} \]
      2. metadata-eval50.7%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \left(-1 \cdot z + \color{blue}{1} \cdot a\right)}{t} \]
      3. *-lft-identity50.7%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \left(-1 \cdot z + \color{blue}{a}\right)}{t} \]
      4. distribute-lft-in50.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-neg50.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-in50.3%

        \[\leadsto y + \frac{\color{blue}{\left(-\left(y - x\right) \cdot z\right)} + \left(y - x\right) \cdot a}{t} \]
      7. *-commutative50.3%

        \[\leadsto y + \frac{\left(-\color{blue}{z \cdot \left(y - x\right)}\right) + \left(y - x\right) \cdot a}{t} \]
      8. mul-1-neg50.3%

        \[\leadsto y + \frac{\color{blue}{-1 \cdot \left(z \cdot \left(y - x\right)\right)} + \left(y - x\right) \cdot a}{t} \]
      9. *-commutative50.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-sub50.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-neg50.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*50.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--50.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/50.3%

        \[\leadsto y + \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
    6. Simplified77.5%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]
    7. Taylor expanded in y around 0 30.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - a\right)}{t}} \]
    8. Step-by-step derivation
      1. associate-*r/53.1%

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    9. Simplified53.1%

      \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]

    if -2.1000000000000001e67 < t < 5.99999999999999978e-69

    1. Initial program 86.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative86.5%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative86.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/93.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def93.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified93.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around 0 63.3%

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*68.9%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    6. Simplified68.9%

      \[\leadsto \color{blue}{x + \frac{z}{\frac{a}{y - x}}} \]
    7. Taylor expanded in y around inf 55.9%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*58.8%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    9. Simplified58.8%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]

    if 5.99999999999999978e-69 < t < 2.55e20

    1. Initial program 79.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative79.0%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative79.0%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*92.0%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/92.1%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def92.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified92.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 67.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-inv67.5%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \color{blue}{\left(-1 \cdot z + \left(--1\right) \cdot a\right)}}{t} \]
      2. metadata-eval67.5%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \left(-1 \cdot z + \color{blue}{1} \cdot a\right)}{t} \]
      3. *-lft-identity67.5%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \left(-1 \cdot z + \color{blue}{a}\right)}{t} \]
      4. distribute-lft-in67.5%

        \[\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-neg67.5%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \color{blue}{\left(-z\right)} + \left(y - x\right) \cdot a}{t} \]
      6. distribute-rgt-neg-in67.5%

        \[\leadsto y + \frac{\color{blue}{\left(-\left(y - x\right) \cdot z\right)} + \left(y - x\right) \cdot a}{t} \]
      7. *-commutative67.5%

        \[\leadsto y + \frac{\left(-\color{blue}{z \cdot \left(y - x\right)}\right) + \left(y - x\right) \cdot a}{t} \]
      8. mul-1-neg67.5%

        \[\leadsto y + \frac{\color{blue}{-1 \cdot \left(z \cdot \left(y - x\right)\right)} + \left(y - x\right) \cdot a}{t} \]
      9. *-commutative67.5%

        \[\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-sub67.5%

        \[\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-neg67.5%

        \[\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*67.5%

        \[\leadsto y + \frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - \color{blue}{-1 \cdot \left(a \cdot \left(y - x\right)\right)}}{t} \]
      13. distribute-lft-out--67.5%

        \[\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/67.5%

        \[\leadsto y + \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
    6. Simplified73.8%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]
    7. Taylor expanded in z around inf 66.0%

      \[\leadsto \color{blue}{z \cdot \left(\frac{x}{t} - \frac{y}{t}\right)} \]
    8. Taylor expanded in t around 0 59.6%

      \[\leadsto \color{blue}{\frac{z \cdot \left(x - y\right)}{t}} \]

    if 2.55e20 < t < 7.99999999999999931e29

    1. Initial program 100.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative100.0%

        \[\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/100.0%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in a around inf 100.0%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification57.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.05 \cdot 10^{+200}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{+67}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-69}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{+20}:\\ \;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+29}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 17: 50.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+199}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{+67}:\\ \;\;\;\;\frac{-x}{\frac{t}{a - z}}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-69}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{+20}:\\ \;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+37}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -7.5e+199)
   y
   (if (<= t -1.9e+67)
     (/ (- x) (/ t (- a z)))
     (if (<= t 9.5e-69)
       (+ x (/ y (/ a z)))
       (if (<= t 2.55e+20) (/ (* z (- x y)) t) (if (<= t 8e+37) x y))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -7.5e+199) {
		tmp = y;
	} else if (t <= -1.9e+67) {
		tmp = -x / (t / (a - z));
	} else if (t <= 9.5e-69) {
		tmp = x + (y / (a / z));
	} else if (t <= 2.55e+20) {
		tmp = (z * (x - y)) / t;
	} else if (t <= 8e+37) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-7.5d+199)) then
        tmp = y
    else if (t <= (-1.9d+67)) then
        tmp = -x / (t / (a - z))
    else if (t <= 9.5d-69) then
        tmp = x + (y / (a / z))
    else if (t <= 2.55d+20) then
        tmp = (z * (x - y)) / t
    else if (t <= 8d+37) then
        tmp = x
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -7.5e+199) {
		tmp = y;
	} else if (t <= -1.9e+67) {
		tmp = -x / (t / (a - z));
	} else if (t <= 9.5e-69) {
		tmp = x + (y / (a / z));
	} else if (t <= 2.55e+20) {
		tmp = (z * (x - y)) / t;
	} else if (t <= 8e+37) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -7.5e+199:
		tmp = y
	elif t <= -1.9e+67:
		tmp = -x / (t / (a - z))
	elif t <= 9.5e-69:
		tmp = x + (y / (a / z))
	elif t <= 2.55e+20:
		tmp = (z * (x - y)) / t
	elif t <= 8e+37:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -7.5e+199)
		tmp = y;
	elseif (t <= -1.9e+67)
		tmp = Float64(Float64(-x) / Float64(t / Float64(a - z)));
	elseif (t <= 9.5e-69)
		tmp = Float64(x + Float64(y / Float64(a / z)));
	elseif (t <= 2.55e+20)
		tmp = Float64(Float64(z * Float64(x - y)) / t);
	elseif (t <= 8e+37)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -7.5e+199)
		tmp = y;
	elseif (t <= -1.9e+67)
		tmp = -x / (t / (a - z));
	elseif (t <= 9.5e-69)
		tmp = x + (y / (a / z));
	elseif (t <= 2.55e+20)
		tmp = (z * (x - y)) / t;
	elseif (t <= 8e+37)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7.5e+199], y, If[LessEqual[t, -1.9e+67], N[((-x) / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e-69], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.55e+20], N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 8e+37], x, y]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+199}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -1.9 \cdot 10^{+67}:\\
\;\;\;\;\frac{-x}{\frac{t}{a - z}}\\

\mathbf{elif}\;t \leq 9.5 \cdot 10^{-69}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\

\mathbf{elif}\;t \leq 2.55 \cdot 10^{+20}:\\
\;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\

\mathbf{elif}\;t \leq 8 \cdot 10^{+37}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -7.49999999999999977e199 or 7.99999999999999963e37 < t

    1. Initial program 31.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative31.6%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative31.6%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*60.7%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/65.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def65.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified65.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 54.4%

      \[\leadsto \color{blue}{y} \]

    if -7.49999999999999977e199 < t < -1.9000000000000001e67

    1. Initial program 47.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative47.6%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative47.6%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*76.9%

        \[\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 y around 0 27.6%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}} \]
    5. Step-by-step derivation
      1. *-rgt-identity27.6%

        \[\leadsto \color{blue}{x \cdot 1} + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t} \]
      2. associate-*r/27.6%

        \[\leadsto x \cdot 1 + \color{blue}{\frac{-1 \cdot \left(x \cdot \left(z - t\right)\right)}{a - t}} \]
      3. mul-1-neg27.6%

        \[\leadsto x \cdot 1 + \frac{\color{blue}{-x \cdot \left(z - t\right)}}{a - t} \]
      4. distribute-lft-neg-out27.6%

        \[\leadsto x \cdot 1 + \frac{\color{blue}{\left(-x\right) \cdot \left(z - t\right)}}{a - t} \]
      5. associate-*r/49.3%

        \[\leadsto x \cdot 1 + \color{blue}{\left(-x\right) \cdot \frac{z - t}{a - t}} \]
      6. distribute-lft-neg-out49.3%

        \[\leadsto x \cdot 1 + \color{blue}{\left(-x \cdot \frac{z - t}{a - t}\right)} \]
      7. distribute-rgt-neg-in49.3%

        \[\leadsto x \cdot 1 + \color{blue}{x \cdot \left(-\frac{z - t}{a - t}\right)} \]
      8. mul-1-neg49.3%

        \[\leadsto x \cdot 1 + x \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{a - t}\right)} \]
      9. distribute-lft-in49.3%

        \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
      10. mul-1-neg49.3%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z - t}{a - t}\right)}\right) \]
      11. unsub-neg49.3%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    6. Simplified49.3%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z - t}{a - t}\right)} \]
    7. Taylor expanded in t around inf 30.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(a + -1 \cdot z\right)}{t}} \]
    8. Step-by-step derivation
      1. mul-1-neg30.9%

        \[\leadsto \color{blue}{-\frac{x \cdot \left(a + -1 \cdot z\right)}{t}} \]
      2. associate-/l*53.2%

        \[\leadsto -\color{blue}{\frac{x}{\frac{t}{a + -1 \cdot z}}} \]
      3. neg-mul-153.2%

        \[\leadsto -\frac{x}{\frac{t}{a + \color{blue}{\left(-z\right)}}} \]
      4. sub-neg53.2%

        \[\leadsto -\frac{x}{\frac{t}{\color{blue}{a - z}}} \]
    9. Simplified53.2%

      \[\leadsto \color{blue}{-\frac{x}{\frac{t}{a - z}}} \]

    if -1.9000000000000001e67 < t < 9.50000000000000094e-69

    1. Initial program 86.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative86.5%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative86.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/93.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def93.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified93.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around 0 63.3%

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*68.9%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    6. Simplified68.9%

      \[\leadsto \color{blue}{x + \frac{z}{\frac{a}{y - x}}} \]
    7. Taylor expanded in y around inf 55.9%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*58.8%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    9. Simplified58.8%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]

    if 9.50000000000000094e-69 < t < 2.55e20

    1. Initial program 79.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative79.0%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative79.0%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*92.0%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/92.1%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def92.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified92.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 67.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-inv67.5%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \color{blue}{\left(-1 \cdot z + \left(--1\right) \cdot a\right)}}{t} \]
      2. metadata-eval67.5%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \left(-1 \cdot z + \color{blue}{1} \cdot a\right)}{t} \]
      3. *-lft-identity67.5%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \left(-1 \cdot z + \color{blue}{a}\right)}{t} \]
      4. distribute-lft-in67.5%

        \[\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-neg67.5%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \color{blue}{\left(-z\right)} + \left(y - x\right) \cdot a}{t} \]
      6. distribute-rgt-neg-in67.5%

        \[\leadsto y + \frac{\color{blue}{\left(-\left(y - x\right) \cdot z\right)} + \left(y - x\right) \cdot a}{t} \]
      7. *-commutative67.5%

        \[\leadsto y + \frac{\left(-\color{blue}{z \cdot \left(y - x\right)}\right) + \left(y - x\right) \cdot a}{t} \]
      8. mul-1-neg67.5%

        \[\leadsto y + \frac{\color{blue}{-1 \cdot \left(z \cdot \left(y - x\right)\right)} + \left(y - x\right) \cdot a}{t} \]
      9. *-commutative67.5%

        \[\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-sub67.5%

        \[\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-neg67.5%

        \[\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*67.5%

        \[\leadsto y + \frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - \color{blue}{-1 \cdot \left(a \cdot \left(y - x\right)\right)}}{t} \]
      13. distribute-lft-out--67.5%

        \[\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/67.5%

        \[\leadsto y + \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
    6. Simplified73.8%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]
    7. Taylor expanded in z around inf 66.0%

      \[\leadsto \color{blue}{z \cdot \left(\frac{x}{t} - \frac{y}{t}\right)} \]
    8. Taylor expanded in t around 0 59.6%

      \[\leadsto \color{blue}{\frac{z \cdot \left(x - y\right)}{t}} \]

    if 2.55e20 < t < 7.99999999999999963e37

    1. Initial program 100.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative100.0%

        \[\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/100.0%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in a around inf 100.0%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification57.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+199}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{+67}:\\ \;\;\;\;\frac{-x}{\frac{t}{a - z}}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-69}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{+20}:\\ \;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+37}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 18: 75.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.3 \cdot 10^{-20} \lor \neg \left(t \leq 10^{-68}\right):\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -3.3e-20) (not (<= t 1e-68)))
   (+ y (/ (- x y) (/ t (- z a))))
   (+ x (/ (- y x) (/ a (- z t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -3.3e-20) || !(t <= 1e-68)) {
		tmp = y + ((x - y) / (t / (z - a)));
	} else {
		tmp = x + ((y - x) / (a / (z - t)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-3.3d-20)) .or. (.not. (t <= 1d-68))) then
        tmp = y + ((x - y) / (t / (z - a)))
    else
        tmp = x + ((y - x) / (a / (z - t)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -3.3e-20) || !(t <= 1e-68)) {
		tmp = y + ((x - y) / (t / (z - a)));
	} else {
		tmp = x + ((y - x) / (a / (z - t)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -3.3e-20) or not (t <= 1e-68):
		tmp = y + ((x - y) / (t / (z - a)))
	else:
		tmp = x + ((y - x) / (a / (z - t)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -3.3e-20) || !(t <= 1e-68))
		tmp = Float64(y + Float64(Float64(x - y) / Float64(t / Float64(z - a))));
	else
		tmp = Float64(x + Float64(Float64(y - x) / Float64(a / Float64(z - t))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -3.3e-20) || ~((t <= 1e-68)))
		tmp = y + ((x - y) / (t / (z - a)));
	else
		tmp = x + ((y - x) / (a / (z - t)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.3e-20], N[Not[LessEqual[t, 1e-68]], $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[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{-20} \lor \neg \left(t \leq 10^{-68}\right):\\
\;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.3e-20 or 1.00000000000000007e-68 < t

    1. Initial program 48.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative48.4%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative48.4%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*71.7%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/75.0%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def75.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified75.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 59.4%

      \[\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.4%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \color{blue}{\left(-1 \cdot z + \left(--1\right) \cdot a\right)}}{t} \]
      2. metadata-eval59.4%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \left(-1 \cdot z + \color{blue}{1} \cdot a\right)}{t} \]
      3. *-lft-identity59.4%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \left(-1 \cdot z + \color{blue}{a}\right)}{t} \]
      4. distribute-lft-in58.4%

        \[\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.4%

        \[\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.4%

        \[\leadsto y + \frac{\color{blue}{\left(-\left(y - x\right) \cdot z\right)} + \left(y - x\right) \cdot a}{t} \]
      7. *-commutative58.4%

        \[\leadsto y + \frac{\left(-\color{blue}{z \cdot \left(y - x\right)}\right) + \left(y - x\right) \cdot a}{t} \]
      8. mul-1-neg58.4%

        \[\leadsto y + \frac{\color{blue}{-1 \cdot \left(z \cdot \left(y - x\right)\right)} + \left(y - x\right) \cdot a}{t} \]
      9. *-commutative58.4%

        \[\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.4%

        \[\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.4%

        \[\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.4%

        \[\leadsto y + \frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - \color{blue}{-1 \cdot \left(a \cdot \left(y - x\right)\right)}}{t} \]
      13. distribute-lft-out--58.4%

        \[\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.4%

        \[\leadsto y + \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
    6. Simplified76.0%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]

    if -3.3e-20 < t < 1.00000000000000007e-68

    1. Initial program 87.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative87.7%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative87.7%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*93.4%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/94.7%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def94.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified94.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in a around inf 72.2%

      \[\leadsto \color{blue}{x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*79.2%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a}{z - t}}} \]
    6. Simplified79.2%

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{a}{z - t}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification77.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.3 \cdot 10^{-20} \lor \neg \left(t \leq 10^{-68}\right):\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \end{array} \]

Alternative 19: 64.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z - t}{a - t}\\ \mathbf{if}\;y \leq -4.2 \cdot 10^{-46}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\ \mathbf{elif}\;y \leq 2.12 \cdot 10^{-78}:\\ \;\;\;\;x \cdot \left(1 - t_1\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- z t) (- a t))))
   (if (<= y -4.2e-46)
     (/ y (/ (- a t) (- z t)))
     (if (<= y 2.12e-78) (* x (- 1.0 t_1)) (* y t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (z - t) / (a - t);
	double tmp;
	if (y <= -4.2e-46) {
		tmp = y / ((a - t) / (z - t));
	} else if (y <= 2.12e-78) {
		tmp = x * (1.0 - t_1);
	} else {
		tmp = y * t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z - t) / (a - t)
    if (y <= (-4.2d-46)) then
        tmp = y / ((a - t) / (z - t))
    else if (y <= 2.12d-78) then
        tmp = x * (1.0d0 - t_1)
    else
        tmp = y * t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (z - t) / (a - t);
	double tmp;
	if (y <= -4.2e-46) {
		tmp = y / ((a - t) / (z - t));
	} else if (y <= 2.12e-78) {
		tmp = x * (1.0 - t_1);
	} else {
		tmp = y * t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (z - t) / (a - t)
	tmp = 0
	if y <= -4.2e-46:
		tmp = y / ((a - t) / (z - t))
	elif y <= 2.12e-78:
		tmp = x * (1.0 - t_1)
	else:
		tmp = y * t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(z - t) / Float64(a - t))
	tmp = 0.0
	if (y <= -4.2e-46)
		tmp = Float64(y / Float64(Float64(a - t) / Float64(z - t)));
	elseif (y <= 2.12e-78)
		tmp = Float64(x * Float64(1.0 - t_1));
	else
		tmp = Float64(y * t_1);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (z - t) / (a - t);
	tmp = 0.0;
	if (y <= -4.2e-46)
		tmp = y / ((a - t) / (z - t));
	elseif (y <= 2.12e-78)
		tmp = x * (1.0 - t_1);
	else
		tmp = y * t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.2e-46], N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.12e-78], N[(x * N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision], N[(y * t$95$1), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{-46}:\\
\;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\

\mathbf{elif}\;y \leq 2.12 \cdot 10^{-78}:\\
\;\;\;\;x \cdot \left(1 - t_1\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.19999999999999975e-46

    1. Initial program 55.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative55.2%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative55.2%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*87.5%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/88.7%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def88.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified88.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Step-by-step derivation
      1. clear-num88.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\frac{a - t}{z - t}}}, y - x, x\right) \]
      2. associate-/r/88.6%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, y - x, x\right) \]
    5. Applied egg-rr88.6%

      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, y - x, x\right) \]
    6. Taylor expanded in y around -inf 46.8%

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    7. Step-by-step derivation
      1. associate-/l*69.4%

        \[\leadsto \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    8. Simplified69.4%

      \[\leadsto \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]

    if -4.19999999999999975e-46 < y < 2.1199999999999999e-78

    1. Initial program 68.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative68.8%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative68.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/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 y around 0 55.5%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}} \]
    5. Step-by-step derivation
      1. *-rgt-identity55.5%

        \[\leadsto \color{blue}{x \cdot 1} + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t} \]
      2. associate-*r/55.5%

        \[\leadsto x \cdot 1 + \color{blue}{\frac{-1 \cdot \left(x \cdot \left(z - t\right)\right)}{a - t}} \]
      3. mul-1-neg55.5%

        \[\leadsto x \cdot 1 + \frac{\color{blue}{-x \cdot \left(z - t\right)}}{a - t} \]
      4. distribute-lft-neg-out55.5%

        \[\leadsto x \cdot 1 + \frac{\color{blue}{\left(-x\right) \cdot \left(z - t\right)}}{a - t} \]
      5. associate-*r/64.1%

        \[\leadsto x \cdot 1 + \color{blue}{\left(-x\right) \cdot \frac{z - t}{a - t}} \]
      6. distribute-lft-neg-out64.1%

        \[\leadsto x \cdot 1 + \color{blue}{\left(-x \cdot \frac{z - t}{a - t}\right)} \]
      7. distribute-rgt-neg-in64.1%

        \[\leadsto x \cdot 1 + \color{blue}{x \cdot \left(-\frac{z - t}{a - t}\right)} \]
      8. mul-1-neg64.1%

        \[\leadsto x \cdot 1 + x \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{a - t}\right)} \]
      9. distribute-lft-in64.1%

        \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
      10. mul-1-neg64.1%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z - t}{a - t}\right)}\right) \]
      11. unsub-neg64.1%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    6. Simplified64.1%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z - t}{a - t}\right)} \]

    if 2.1199999999999999e-78 < y

    1. Initial program 69.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative69.4%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative69.4%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*87.5%

        \[\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 y around inf 74.7%

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    5. Step-by-step derivation
      1. div-sub74.7%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    6. Simplified74.7%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification68.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{-46}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\ \mathbf{elif}\;y \leq 2.12 \cdot 10^{-78}:\\ \;\;\;\;x \cdot \left(1 - \frac{z - t}{a - t}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]

Alternative 20: 45.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.65 \cdot 10^{+199}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -0.0013:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+30}:\\ \;\;\;\;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 -1.65e+199)
   y
   (if (<= t -0.0013)
     (/ x (/ t z))
     (if (<= t 3.3e+30) (* x (- 1.0 (/ z a))) y))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.65e+199) {
		tmp = y;
	} else if (t <= -0.0013) {
		tmp = x / (t / z);
	} else if (t <= 3.3e+30) {
		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 <= (-1.65d+199)) then
        tmp = y
    else if (t <= (-0.0013d0)) then
        tmp = x / (t / z)
    else if (t <= 3.3d+30) 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 <= -1.65e+199) {
		tmp = y;
	} else if (t <= -0.0013) {
		tmp = x / (t / z);
	} else if (t <= 3.3e+30) {
		tmp = x * (1.0 - (z / a));
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.65e+199:
		tmp = y
	elif t <= -0.0013:
		tmp = x / (t / z)
	elif t <= 3.3e+30:
		tmp = x * (1.0 - (z / a))
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.65e+199)
		tmp = y;
	elseif (t <= -0.0013)
		tmp = Float64(x / Float64(t / z));
	elseif (t <= 3.3e+30)
		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 <= -1.65e+199)
		tmp = y;
	elseif (t <= -0.0013)
		tmp = x / (t / z);
	elseif (t <= 3.3e+30)
		tmp = x * (1.0 - (z / a));
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.65e+199], y, If[LessEqual[t, -0.0013], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e+30], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+199}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -0.0013:\\
\;\;\;\;\frac{x}{\frac{t}{z}}\\

\mathbf{elif}\;t \leq 3.3 \cdot 10^{+30}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.6499999999999999e199 or 3.30000000000000026e30 < t

    1. Initial program 31.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative31.6%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative31.6%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*60.7%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/65.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def65.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified65.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 54.4%

      \[\leadsto \color{blue}{y} \]

    if -1.6499999999999999e199 < t < -0.0012999999999999999

    1. Initial program 60.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative60.9%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative60.9%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*82.0%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/84.1%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def84.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified84.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in y around 0 37.8%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}} \]
    5. Step-by-step derivation
      1. *-rgt-identity37.8%

        \[\leadsto \color{blue}{x \cdot 1} + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t} \]
      2. associate-*r/37.8%

        \[\leadsto x \cdot 1 + \color{blue}{\frac{-1 \cdot \left(x \cdot \left(z - t\right)\right)}{a - t}} \]
      3. mul-1-neg37.8%

        \[\leadsto x \cdot 1 + \frac{\color{blue}{-x \cdot \left(z - t\right)}}{a - t} \]
      4. distribute-lft-neg-out37.8%

        \[\leadsto x \cdot 1 + \frac{\color{blue}{\left(-x\right) \cdot \left(z - t\right)}}{a - t} \]
      5. associate-*r/52.5%

        \[\leadsto x \cdot 1 + \color{blue}{\left(-x\right) \cdot \frac{z - t}{a - t}} \]
      6. distribute-lft-neg-out52.5%

        \[\leadsto x \cdot 1 + \color{blue}{\left(-x \cdot \frac{z - t}{a - t}\right)} \]
      7. distribute-rgt-neg-in52.5%

        \[\leadsto x \cdot 1 + \color{blue}{x \cdot \left(-\frac{z - t}{a - t}\right)} \]
      8. mul-1-neg52.5%

        \[\leadsto x \cdot 1 + x \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{a - t}\right)} \]
      9. distribute-lft-in52.5%

        \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
      10. mul-1-neg52.5%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z - t}{a - t}\right)}\right) \]
      11. unsub-neg52.5%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    6. Simplified52.5%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z - t}{a - t}\right)} \]
    7. Taylor expanded in a around 0 26.4%

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    8. Step-by-step derivation
      1. associate-/l*39.4%

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    9. Simplified39.4%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]

    if -0.0012999999999999999 < t < 3.30000000000000026e30

    1. Initial program 86.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative86.9%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative86.9%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*93.0%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/94.0%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def94.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified94.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around 0 64.3%

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*70.1%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    6. Simplified70.1%

      \[\leadsto \color{blue}{x + \frac{z}{\frac{a}{y - x}}} \]
    7. Taylor expanded in x around inf 52.1%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{a}\right)} \]
    8. Step-by-step derivation
      1. mul-1-neg52.1%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z}{a}\right)}\right) \]
      2. sub-neg52.1%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]
    9. Simplified52.1%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{a}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.65 \cdot 10^{+199}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -0.0013:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+30}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 21: 47.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+199}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-20}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 1.12 \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 -1.7e+199)
   y
   (if (<= t -3.5e-20)
     (* x (/ (- z a) t))
     (if (<= t 1.12e+39) (* x (- 1.0 (/ z a))) y))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.7e+199) {
		tmp = y;
	} else if (t <= -3.5e-20) {
		tmp = x * ((z - a) / t);
	} else if (t <= 1.12e+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 <= (-1.7d+199)) then
        tmp = y
    else if (t <= (-3.5d-20)) then
        tmp = x * ((z - a) / t)
    else if (t <= 1.12d+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 <= -1.7e+199) {
		tmp = y;
	} else if (t <= -3.5e-20) {
		tmp = x * ((z - a) / t);
	} else if (t <= 1.12e+39) {
		tmp = x * (1.0 - (z / a));
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.7e+199:
		tmp = y
	elif t <= -3.5e-20:
		tmp = x * ((z - a) / t)
	elif t <= 1.12e+39:
		tmp = x * (1.0 - (z / a))
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.7e+199)
		tmp = y;
	elseif (t <= -3.5e-20)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (t <= 1.12e+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 <= -1.7e+199)
		tmp = y;
	elseif (t <= -3.5e-20)
		tmp = x * ((z - a) / t);
	elseif (t <= 1.12e+39)
		tmp = x * (1.0 - (z / a));
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.7e+199], y, If[LessEqual[t, -3.5e-20], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.12e+39], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{+199}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -3.5 \cdot 10^{-20}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

\mathbf{elif}\;t \leq 1.12 \cdot 10^{+39}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.7e199 or 1.12e39 < t

    1. Initial program 31.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative31.6%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative31.6%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*60.7%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/65.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def65.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified65.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 54.4%

      \[\leadsto \color{blue}{y} \]

    if -1.7e199 < t < -3.50000000000000003e-20

    1. Initial program 64.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative64.5%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative64.5%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*82.6%

        \[\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 58.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-inv58.0%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \color{blue}{\left(-1 \cdot z + \left(--1\right) \cdot a\right)}}{t} \]
      2. metadata-eval58.0%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \left(-1 \cdot z + \color{blue}{1} \cdot a\right)}{t} \]
      3. *-lft-identity58.0%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \left(-1 \cdot z + \color{blue}{a}\right)}{t} \]
      4. distribute-lft-in57.8%

        \[\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-neg57.8%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \color{blue}{\left(-z\right)} + \left(y - x\right) \cdot a}{t} \]
      6. distribute-rgt-neg-in57.8%

        \[\leadsto y + \frac{\color{blue}{\left(-\left(y - x\right) \cdot z\right)} + \left(y - x\right) \cdot a}{t} \]
      7. *-commutative57.8%

        \[\leadsto y + \frac{\left(-\color{blue}{z \cdot \left(y - x\right)}\right) + \left(y - x\right) \cdot a}{t} \]
      8. mul-1-neg57.8%

        \[\leadsto y + \frac{\color{blue}{-1 \cdot \left(z \cdot \left(y - x\right)\right)} + \left(y - x\right) \cdot a}{t} \]
      9. *-commutative57.8%

        \[\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-sub57.8%

        \[\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-neg57.8%

        \[\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*57.8%

        \[\leadsto y + \frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - \color{blue}{-1 \cdot \left(a \cdot \left(y - x\right)\right)}}{t} \]
      13. distribute-lft-out--57.8%

        \[\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/57.8%

        \[\leadsto y + \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
    6. Simplified71.4%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]
    7. Taylor expanded in y around 0 30.7%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - a\right)}{t}} \]
    8. Step-by-step derivation
      1. associate-*r/41.8%

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    9. Simplified41.8%

      \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]

    if -3.50000000000000003e-20 < t < 1.12e39

    1. Initial program 86.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative86.9%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative86.9%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*93.3%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/94.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def94.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified94.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around 0 65.4%

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*71.6%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    6. Simplified71.6%

      \[\leadsto \color{blue}{x + \frac{z}{\frac{a}{y - x}}} \]
    7. Taylor expanded in x around inf 53.3%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{a}\right)} \]
    8. Step-by-step derivation
      1. mul-1-neg53.3%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z}{a}\right)}\right) \]
      2. sub-neg53.3%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]
    9. Simplified53.3%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{a}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification51.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+199}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-20}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+39}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 22: 51.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.65 \cdot 10^{+199}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{+69}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+31}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.65e+199)
   y
   (if (<= t -1.55e+69)
     (* x (/ (- z a) t))
     (if (<= t 1.15e+31) (+ x (/ y (/ a z))) y))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.65e+199) {
		tmp = y;
	} else if (t <= -1.55e+69) {
		tmp = x * ((z - a) / t);
	} else if (t <= 1.15e+31) {
		tmp = x + (y / (a / z));
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-1.65d+199)) then
        tmp = y
    else if (t <= (-1.55d+69)) then
        tmp = x * ((z - a) / t)
    else if (t <= 1.15d+31) then
        tmp = x + (y / (a / z))
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.65e+199) {
		tmp = y;
	} else if (t <= -1.55e+69) {
		tmp = x * ((z - a) / t);
	} else if (t <= 1.15e+31) {
		tmp = x + (y / (a / z));
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.65e+199:
		tmp = y
	elif t <= -1.55e+69:
		tmp = x * ((z - a) / t)
	elif t <= 1.15e+31:
		tmp = x + (y / (a / z))
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.65e+199)
		tmp = y;
	elseif (t <= -1.55e+69)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (t <= 1.15e+31)
		tmp = Float64(x + Float64(y / Float64(a / z)));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -1.65e+199)
		tmp = y;
	elseif (t <= -1.55e+69)
		tmp = x * ((z - a) / t);
	elseif (t <= 1.15e+31)
		tmp = x + (y / (a / z));
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.65e+199], y, If[LessEqual[t, -1.55e+69], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+31], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+199}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -1.55 \cdot 10^{+69}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+31}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.6499999999999999e199 or 1.15e31 < t

    1. Initial program 31.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative31.6%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative31.6%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*60.7%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/65.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def65.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified65.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 54.4%

      \[\leadsto \color{blue}{y} \]

    if -1.6499999999999999e199 < t < -1.5499999999999999e69

    1. Initial program 47.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative47.6%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative47.6%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*76.9%

        \[\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 50.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-inv50.7%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \color{blue}{\left(-1 \cdot z + \left(--1\right) \cdot a\right)}}{t} \]
      2. metadata-eval50.7%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \left(-1 \cdot z + \color{blue}{1} \cdot a\right)}{t} \]
      3. *-lft-identity50.7%

        \[\leadsto y + \frac{\left(y - x\right) \cdot \left(-1 \cdot z + \color{blue}{a}\right)}{t} \]
      4. distribute-lft-in50.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-neg50.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-in50.3%

        \[\leadsto y + \frac{\color{blue}{\left(-\left(y - x\right) \cdot z\right)} + \left(y - x\right) \cdot a}{t} \]
      7. *-commutative50.3%

        \[\leadsto y + \frac{\left(-\color{blue}{z \cdot \left(y - x\right)}\right) + \left(y - x\right) \cdot a}{t} \]
      8. mul-1-neg50.3%

        \[\leadsto y + \frac{\color{blue}{-1 \cdot \left(z \cdot \left(y - x\right)\right)} + \left(y - x\right) \cdot a}{t} \]
      9. *-commutative50.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-sub50.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-neg50.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*50.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--50.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/50.3%

        \[\leadsto y + \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
    6. Simplified77.5%

      \[\leadsto \color{blue}{y - \frac{y - x}{\frac{t}{z - a}}} \]
    7. Taylor expanded in y around 0 30.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - a\right)}{t}} \]
    8. Step-by-step derivation
      1. associate-*r/53.1%

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    9. Simplified53.1%

      \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]

    if -1.5499999999999999e69 < t < 1.15e31

    1. Initial program 86.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative86.0%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative86.0%

        \[\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/93.5%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def93.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified93.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around 0 60.8%

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*65.9%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    6. Simplified65.9%

      \[\leadsto \color{blue}{x + \frac{z}{\frac{a}{y - x}}} \]
    7. Taylor expanded in y around inf 52.9%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*55.5%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    9. Simplified55.5%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification54.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.65 \cdot 10^{+199}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{+69}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+31}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 23: 38.1% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -22000000000000:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+26}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -22000000000000.0) y (if (<= t 1.45e+26) x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -22000000000000.0) {
		tmp = y;
	} else if (t <= 1.45e+26) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-22000000000000.0d0)) then
        tmp = y
    else if (t <= 1.45d+26) then
        tmp = x
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -22000000000000.0) {
		tmp = y;
	} else if (t <= 1.45e+26) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -22000000000000.0:
		tmp = y
	elif t <= 1.45e+26:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -22000000000000.0)
		tmp = y;
	elseif (t <= 1.45e+26)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -22000000000000.0)
		tmp = y;
	elseif (t <= 1.45e+26)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -22000000000000.0], y, If[LessEqual[t, 1.45e+26], x, y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -22000000000000:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1.45 \cdot 10^{+26}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.2e13 or 1.45e26 < t

    1. Initial program 40.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative40.4%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative40.4%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*67.4%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/71.3%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def71.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified71.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in t around inf 45.4%

      \[\leadsto \color{blue}{y} \]

    if -2.2e13 < t < 1.45e26

    1. Initial program 87.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative87.2%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. *-commutative87.2%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
      3. associate-/l*93.1%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/94.2%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      5. fma-def94.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    3. Simplified94.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
    4. Taylor expanded in a around inf 35.2%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -22000000000000:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+26}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 24: 24.6% accurate, 13.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 65.3%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. +-commutative65.3%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
    2. *-commutative65.3%

      \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}{a - t} + x \]
    3. associate-/l*81.0%

      \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
    4. associate-/r/83.5%

      \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
    5. fma-def83.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
  3. Simplified83.5%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
  4. Taylor expanded in a around inf 25.9%

    \[\leadsto \color{blue}{x} \]
  5. Final simplification25.9%

    \[\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 2024024 
(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))))