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

Percentage Accurate: 68.1% → 88.6%
Time: 19.1s
Alternatives: 29
Speedup: 0.8×

Specification

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

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

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

Alternative 1: 88.6% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.22e202 or 3.1500000000000001e170 < z

    1. Initial program 27.8%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--87.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.22e202 < z < 3.1500000000000001e170

    1. Initial program 75.8%

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

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

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

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

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

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

Alternative 2: 68.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := t + \left(y - a\right) \cdot \frac{x}{z}\\ t_3 := x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -2.3 \cdot 10^{+202}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+124}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.06 \cdot 10^{+63}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{-129}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -7.7 \cdot 10^{-205}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+30}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+82}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z))))
        (t_2 (+ t (* (- y a) (/ x z))))
        (t_3 (+ x (* (- t x) (/ y a)))))
   (if (<= z -2.3e+202)
     t_2
     (if (<= z -2.6e+124)
       t_1
       (if (<= z -1.06e+63)
         t_2
         (if (<= z -2.05e-129)
           t_3
           (if (<= z -7.7e-205)
             (* y (/ (- t x) (- a z)))
             (if (<= z 1.8e+30)
               t_3
               (if (<= z 6.2e+76)
                 t_1
                 (if (<= z 8e+82)
                   (* x (+ (/ (- z y) (- a z)) 1.0))
                   t_2))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = t + ((y - a) * (x / z));
	double t_3 = x + ((t - x) * (y / a));
	double tmp;
	if (z <= -2.3e+202) {
		tmp = t_2;
	} else if (z <= -2.6e+124) {
		tmp = t_1;
	} else if (z <= -1.06e+63) {
		tmp = t_2;
	} else if (z <= -2.05e-129) {
		tmp = t_3;
	} else if (z <= -7.7e-205) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 1.8e+30) {
		tmp = t_3;
	} else if (z <= 6.2e+76) {
		tmp = t_1;
	} else if (z <= 8e+82) {
		tmp = x * (((z - y) / (a - z)) + 1.0);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = t + ((y - a) * (x / z))
    t_3 = x + ((t - x) * (y / a))
    if (z <= (-2.3d+202)) then
        tmp = t_2
    else if (z <= (-2.6d+124)) then
        tmp = t_1
    else if (z <= (-1.06d+63)) then
        tmp = t_2
    else if (z <= (-2.05d-129)) then
        tmp = t_3
    else if (z <= (-7.7d-205)) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 1.8d+30) then
        tmp = t_3
    else if (z <= 6.2d+76) then
        tmp = t_1
    else if (z <= 8d+82) then
        tmp = x * (((z - y) / (a - z)) + 1.0d0)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = t + ((y - a) * (x / z));
	double t_3 = x + ((t - x) * (y / a));
	double tmp;
	if (z <= -2.3e+202) {
		tmp = t_2;
	} else if (z <= -2.6e+124) {
		tmp = t_1;
	} else if (z <= -1.06e+63) {
		tmp = t_2;
	} else if (z <= -2.05e-129) {
		tmp = t_3;
	} else if (z <= -7.7e-205) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 1.8e+30) {
		tmp = t_3;
	} else if (z <= 6.2e+76) {
		tmp = t_1;
	} else if (z <= 8e+82) {
		tmp = x * (((z - y) / (a - z)) + 1.0);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = t + ((y - a) * (x / z))
	t_3 = x + ((t - x) * (y / a))
	tmp = 0
	if z <= -2.3e+202:
		tmp = t_2
	elif z <= -2.6e+124:
		tmp = t_1
	elif z <= -1.06e+63:
		tmp = t_2
	elif z <= -2.05e-129:
		tmp = t_3
	elif z <= -7.7e-205:
		tmp = y * ((t - x) / (a - z))
	elif z <= 1.8e+30:
		tmp = t_3
	elif z <= 6.2e+76:
		tmp = t_1
	elif z <= 8e+82:
		tmp = x * (((z - y) / (a - z)) + 1.0)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(t + Float64(Float64(y - a) * Float64(x / z)))
	t_3 = Float64(x + Float64(Float64(t - x) * Float64(y / a)))
	tmp = 0.0
	if (z <= -2.3e+202)
		tmp = t_2;
	elseif (z <= -2.6e+124)
		tmp = t_1;
	elseif (z <= -1.06e+63)
		tmp = t_2;
	elseif (z <= -2.05e-129)
		tmp = t_3;
	elseif (z <= -7.7e-205)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 1.8e+30)
		tmp = t_3;
	elseif (z <= 6.2e+76)
		tmp = t_1;
	elseif (z <= 8e+82)
		tmp = Float64(x * Float64(Float64(Float64(z - y) / Float64(a - z)) + 1.0));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = t + ((y - a) * (x / z));
	t_3 = x + ((t - x) * (y / a));
	tmp = 0.0;
	if (z <= -2.3e+202)
		tmp = t_2;
	elseif (z <= -2.6e+124)
		tmp = t_1;
	elseif (z <= -1.06e+63)
		tmp = t_2;
	elseif (z <= -2.05e-129)
		tmp = t_3;
	elseif (z <= -7.7e-205)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 1.8e+30)
		tmp = t_3;
	elseif (z <= 6.2e+76)
		tmp = t_1;
	elseif (z <= 8e+82)
		tmp = x * (((z - y) / (a - z)) + 1.0);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e+202], t$95$2, If[LessEqual[z, -2.6e+124], t$95$1, If[LessEqual[z, -1.06e+63], t$95$2, If[LessEqual[z, -2.05e-129], t$95$3, If[LessEqual[z, -7.7e-205], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+30], t$95$3, If[LessEqual[z, 6.2e+76], t$95$1, If[LessEqual[z, 8e+82], N[(x * N[(N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.6 \cdot 10^{+124}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.06 \cdot 10^{+63}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -2.05 \cdot 10^{-129}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;z \leq 1.8 \cdot 10^{+30}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+76}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.29999999999999999e202 or -2.6e124 < z < -1.0600000000000001e63 or 7.9999999999999997e82 < z

    1. Initial program 38.5%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.29999999999999999e202 < z < -2.6e124 or 1.8000000000000001e30 < z < 6.20000000000000023e76

    1. Initial program 45.1%

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

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

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

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

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

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

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

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

    if -1.0600000000000001e63 < z < -2.05e-129 or -7.7000000000000001e-205 < z < 1.8000000000000001e30

    1. Initial program 91.2%

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

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

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

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

    if -2.05e-129 < z < -7.7000000000000001e-205

    1. Initial program 83.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative81.0%

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

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

    if 6.20000000000000023e76 < z < 7.9999999999999997e82

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+202}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+124}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -1.06 \cdot 10^{+63}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{-129}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -7.7 \cdot 10^{-205}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+30}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+76}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+82}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\ \end{array} \]

Alternative 3: 68.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := t + \left(y - a\right) \cdot \frac{x}{z}\\ t_3 := x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -2.3 \cdot 10^{+202}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{+122}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{+64}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-128}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -7.7 \cdot 10^{-205}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+29}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+72}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{+77}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z))))
        (t_2 (+ t (* (- y a) (/ x z))))
        (t_3 (+ x (* (- t x) (/ y a)))))
   (if (<= z -2.3e+202)
     t_2
     (if (<= z -7.2e+122)
       t_1
       (if (<= z -1.85e+64)
         t_2
         (if (<= z -8.2e-128)
           t_3
           (if (<= z -7.7e-205)
             (* y (/ (- t x) (- a z)))
             (if (<= z 2e+29)
               t_3
               (if (<= z 5.4e+72)
                 t_1
                 (if (<= z 1.06e+77) (+ x (/ (* t y) a)) t_2))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = t + ((y - a) * (x / z));
	double t_3 = x + ((t - x) * (y / a));
	double tmp;
	if (z <= -2.3e+202) {
		tmp = t_2;
	} else if (z <= -7.2e+122) {
		tmp = t_1;
	} else if (z <= -1.85e+64) {
		tmp = t_2;
	} else if (z <= -8.2e-128) {
		tmp = t_3;
	} else if (z <= -7.7e-205) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 2e+29) {
		tmp = t_3;
	} else if (z <= 5.4e+72) {
		tmp = t_1;
	} else if (z <= 1.06e+77) {
		tmp = x + ((t * y) / a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = t + ((y - a) * (x / z))
    t_3 = x + ((t - x) * (y / a))
    if (z <= (-2.3d+202)) then
        tmp = t_2
    else if (z <= (-7.2d+122)) then
        tmp = t_1
    else if (z <= (-1.85d+64)) then
        tmp = t_2
    else if (z <= (-8.2d-128)) then
        tmp = t_3
    else if (z <= (-7.7d-205)) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 2d+29) then
        tmp = t_3
    else if (z <= 5.4d+72) then
        tmp = t_1
    else if (z <= 1.06d+77) then
        tmp = x + ((t * y) / a)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = t + ((y - a) * (x / z));
	double t_3 = x + ((t - x) * (y / a));
	double tmp;
	if (z <= -2.3e+202) {
		tmp = t_2;
	} else if (z <= -7.2e+122) {
		tmp = t_1;
	} else if (z <= -1.85e+64) {
		tmp = t_2;
	} else if (z <= -8.2e-128) {
		tmp = t_3;
	} else if (z <= -7.7e-205) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 2e+29) {
		tmp = t_3;
	} else if (z <= 5.4e+72) {
		tmp = t_1;
	} else if (z <= 1.06e+77) {
		tmp = x + ((t * y) / a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = t + ((y - a) * (x / z))
	t_3 = x + ((t - x) * (y / a))
	tmp = 0
	if z <= -2.3e+202:
		tmp = t_2
	elif z <= -7.2e+122:
		tmp = t_1
	elif z <= -1.85e+64:
		tmp = t_2
	elif z <= -8.2e-128:
		tmp = t_3
	elif z <= -7.7e-205:
		tmp = y * ((t - x) / (a - z))
	elif z <= 2e+29:
		tmp = t_3
	elif z <= 5.4e+72:
		tmp = t_1
	elif z <= 1.06e+77:
		tmp = x + ((t * y) / a)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(t + Float64(Float64(y - a) * Float64(x / z)))
	t_3 = Float64(x + Float64(Float64(t - x) * Float64(y / a)))
	tmp = 0.0
	if (z <= -2.3e+202)
		tmp = t_2;
	elseif (z <= -7.2e+122)
		tmp = t_1;
	elseif (z <= -1.85e+64)
		tmp = t_2;
	elseif (z <= -8.2e-128)
		tmp = t_3;
	elseif (z <= -7.7e-205)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 2e+29)
		tmp = t_3;
	elseif (z <= 5.4e+72)
		tmp = t_1;
	elseif (z <= 1.06e+77)
		tmp = Float64(x + Float64(Float64(t * y) / a));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = t + ((y - a) * (x / z));
	t_3 = x + ((t - x) * (y / a));
	tmp = 0.0;
	if (z <= -2.3e+202)
		tmp = t_2;
	elseif (z <= -7.2e+122)
		tmp = t_1;
	elseif (z <= -1.85e+64)
		tmp = t_2;
	elseif (z <= -8.2e-128)
		tmp = t_3;
	elseif (z <= -7.7e-205)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 2e+29)
		tmp = t_3;
	elseif (z <= 5.4e+72)
		tmp = t_1;
	elseif (z <= 1.06e+77)
		tmp = x + ((t * y) / a);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e+202], t$95$2, If[LessEqual[z, -7.2e+122], t$95$1, If[LessEqual[z, -1.85e+64], t$95$2, If[LessEqual[z, -8.2e-128], t$95$3, If[LessEqual[z, -7.7e-205], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+29], t$95$3, If[LessEqual[z, 5.4e+72], t$95$1, If[LessEqual[z, 1.06e+77], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -7.2 \cdot 10^{+122}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.85 \cdot 10^{+64}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -8.2 \cdot 10^{-128}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;z \leq 2 \cdot 10^{+29}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 5.4 \cdot 10^{+72}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.29999999999999999e202 or -7.2000000000000005e122 < z < -1.84999999999999992e64 or 1.06000000000000003e77 < z

    1. Initial program 38.8%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.29999999999999999e202 < z < -7.2000000000000005e122 or 1.99999999999999983e29 < z < 5.4000000000000001e72

    1. Initial program 43.3%

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

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

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

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

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

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

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

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

    if -1.84999999999999992e64 < z < -8.1999999999999999e-128 or -7.7000000000000001e-205 < z < 1.99999999999999983e29

    1. Initial program 91.2%

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

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

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

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

    if -8.1999999999999999e-128 < z < -7.7000000000000001e-205

    1. Initial program 83.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative81.0%

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

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

    if 5.4000000000000001e72 < z < 1.06000000000000003e77

    1. Initial program 100.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+202}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{+122}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{+64}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-128}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -7.7 \cdot 10^{-205}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+29}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+72}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{+77}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\ \end{array} \]

Alternative 4: 74.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -2.5 \cdot 10^{+123}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.6 \cdot 10^{+67}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -1.6 \cdot 10^{-184}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.25 \cdot 10^{+113}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.1000000000000003e197 or -2.49999999999999987e123 < z < -1.59999999999999991e67 or 1.25e113 < z

    1. Initial program 37.3%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--84.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1000000000000003e197 < z < -2.49999999999999987e123 or -1.59999999999999991e67 < z < -1.6e-184 or 8e-175 < z < 1.25e113

    1. Initial program 75.8%

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

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

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

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

    if -1.6e-184 < z < 8e-175

    1. Initial program 91.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{+197}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{+123}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{+67}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-184}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-175}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+113}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{else}:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\ \end{array} \]

Alternative 5: 53.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - x \cdot \frac{y}{a}\\ t_2 := t - x \cdot \frac{a}{z}\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+74}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-257}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-274}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-153}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{+84}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* x (/ y a)))) (t_2 (- t (* x (/ a z)))))
   (if (<= z -1.4e+74)
     t_2
     (if (<= z -3.8e-257)
       t_1
       (if (<= z 2.6e-274)
         (+ x (/ (* t y) a))
         (if (<= z 1.65e-185)
           t_1
           (if (<= z 2.3e-153)
             (* t (/ y (- a z)))
             (if (<= z 7.6e+84) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double t_2 = t - (x * (a / z));
	double tmp;
	if (z <= -1.4e+74) {
		tmp = t_2;
	} else if (z <= -3.8e-257) {
		tmp = t_1;
	} else if (z <= 2.6e-274) {
		tmp = x + ((t * y) / a);
	} else if (z <= 1.65e-185) {
		tmp = t_1;
	} else if (z <= 2.3e-153) {
		tmp = t * (y / (a - z));
	} else if (z <= 7.6e+84) {
		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 - (x * (y / a))
    t_2 = t - (x * (a / z))
    if (z <= (-1.4d+74)) then
        tmp = t_2
    else if (z <= (-3.8d-257)) then
        tmp = t_1
    else if (z <= 2.6d-274) then
        tmp = x + ((t * y) / a)
    else if (z <= 1.65d-185) then
        tmp = t_1
    else if (z <= 2.3d-153) then
        tmp = t * (y / (a - z))
    else if (z <= 7.6d+84) 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 - (x * (y / a));
	double t_2 = t - (x * (a / z));
	double tmp;
	if (z <= -1.4e+74) {
		tmp = t_2;
	} else if (z <= -3.8e-257) {
		tmp = t_1;
	} else if (z <= 2.6e-274) {
		tmp = x + ((t * y) / a);
	} else if (z <= 1.65e-185) {
		tmp = t_1;
	} else if (z <= 2.3e-153) {
		tmp = t * (y / (a - z));
	} else if (z <= 7.6e+84) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (x * (y / a))
	t_2 = t - (x * (a / z))
	tmp = 0
	if z <= -1.4e+74:
		tmp = t_2
	elif z <= -3.8e-257:
		tmp = t_1
	elif z <= 2.6e-274:
		tmp = x + ((t * y) / a)
	elif z <= 1.65e-185:
		tmp = t_1
	elif z <= 2.3e-153:
		tmp = t * (y / (a - z))
	elif z <= 7.6e+84:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(x * Float64(y / a)))
	t_2 = Float64(t - Float64(x * Float64(a / z)))
	tmp = 0.0
	if (z <= -1.4e+74)
		tmp = t_2;
	elseif (z <= -3.8e-257)
		tmp = t_1;
	elseif (z <= 2.6e-274)
		tmp = Float64(x + Float64(Float64(t * y) / a));
	elseif (z <= 1.65e-185)
		tmp = t_1;
	elseif (z <= 2.3e-153)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (z <= 7.6e+84)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (x * (y / a));
	t_2 = t - (x * (a / z));
	tmp = 0.0;
	if (z <= -1.4e+74)
		tmp = t_2;
	elseif (z <= -3.8e-257)
		tmp = t_1;
	elseif (z <= 2.6e-274)
		tmp = x + ((t * y) / a);
	elseif (z <= 1.65e-185)
		tmp = t_1;
	elseif (z <= 2.3e-153)
		tmp = t * (y / (a - z));
	elseif (z <= 7.6e+84)
		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[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(x * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+74], t$95$2, If[LessEqual[z, -3.8e-257], t$95$1, If[LessEqual[z, 2.6e-274], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-185], t$95$1, If[LessEqual[z, 2.3e-153], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e+84], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -3.8 \cdot 10^{-257}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{-185}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 7.6 \cdot 10^{+84}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.40000000000000001e74 or 7.6000000000000002e84 < z

    1. Initial program 37.9%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--77.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{a}{z} \cdot x} \]
      2. *-commutative56.1%

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

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

    if -1.40000000000000001e74 < z < -3.8000000000000004e-257 or 2.6e-274 < z < 1.6499999999999999e-185 or 2.29999999999999997e-153 < z < 7.6000000000000002e84

    1. Initial program 87.0%

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-y \cdot x}}{a} \]
      3. distribute-rgt-neg-out53.0%

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

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

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

    if -3.8000000000000004e-257 < z < 2.6e-274

    1. Initial program 94.3%

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

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

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

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

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

    if 1.6499999999999999e-185 < z < 2.29999999999999997e-153

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+74}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-257}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-274}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-185}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-153}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{+84}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \end{array} \]

Alternative 6: 55.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - x \cdot \frac{y}{a}\\ t_2 := t + x \cdot \frac{y}{z}\\ \mathbf{if}\;z \leq -2.65 \cdot 10^{+63}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-257}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-272}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{-185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-153}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+112}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* x (/ y a)))) (t_2 (+ t (* x (/ y z)))))
   (if (<= z -2.65e+63)
     t_2
     (if (<= z -1.2e-257)
       t_1
       (if (<= z 1.25e-272)
         (+ x (/ (* t y) a))
         (if (<= z 1.08e-185)
           t_1
           (if (<= z 5e-153)
             (* t (/ y (- a z)))
             (if (<= z 2.35e+112) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double t_2 = t + (x * (y / z));
	double tmp;
	if (z <= -2.65e+63) {
		tmp = t_2;
	} else if (z <= -1.2e-257) {
		tmp = t_1;
	} else if (z <= 1.25e-272) {
		tmp = x + ((t * y) / a);
	} else if (z <= 1.08e-185) {
		tmp = t_1;
	} else if (z <= 5e-153) {
		tmp = t * (y / (a - z));
	} else if (z <= 2.35e+112) {
		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 - (x * (y / a))
    t_2 = t + (x * (y / z))
    if (z <= (-2.65d+63)) then
        tmp = t_2
    else if (z <= (-1.2d-257)) then
        tmp = t_1
    else if (z <= 1.25d-272) then
        tmp = x + ((t * y) / a)
    else if (z <= 1.08d-185) then
        tmp = t_1
    else if (z <= 5d-153) then
        tmp = t * (y / (a - z))
    else if (z <= 2.35d+112) 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 - (x * (y / a));
	double t_2 = t + (x * (y / z));
	double tmp;
	if (z <= -2.65e+63) {
		tmp = t_2;
	} else if (z <= -1.2e-257) {
		tmp = t_1;
	} else if (z <= 1.25e-272) {
		tmp = x + ((t * y) / a);
	} else if (z <= 1.08e-185) {
		tmp = t_1;
	} else if (z <= 5e-153) {
		tmp = t * (y / (a - z));
	} else if (z <= 2.35e+112) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (x * (y / a))
	t_2 = t + (x * (y / z))
	tmp = 0
	if z <= -2.65e+63:
		tmp = t_2
	elif z <= -1.2e-257:
		tmp = t_1
	elif z <= 1.25e-272:
		tmp = x + ((t * y) / a)
	elif z <= 1.08e-185:
		tmp = t_1
	elif z <= 5e-153:
		tmp = t * (y / (a - z))
	elif z <= 2.35e+112:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(x * Float64(y / a)))
	t_2 = Float64(t + Float64(x * Float64(y / z)))
	tmp = 0.0
	if (z <= -2.65e+63)
		tmp = t_2;
	elseif (z <= -1.2e-257)
		tmp = t_1;
	elseif (z <= 1.25e-272)
		tmp = Float64(x + Float64(Float64(t * y) / a));
	elseif (z <= 1.08e-185)
		tmp = t_1;
	elseif (z <= 5e-153)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (z <= 2.35e+112)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (x * (y / a));
	t_2 = t + (x * (y / z));
	tmp = 0.0;
	if (z <= -2.65e+63)
		tmp = t_2;
	elseif (z <= -1.2e-257)
		tmp = t_1;
	elseif (z <= 1.25e-272)
		tmp = x + ((t * y) / a);
	elseif (z <= 1.08e-185)
		tmp = t_1;
	elseif (z <= 5e-153)
		tmp = t * (y / (a - z));
	elseif (z <= 2.35e+112)
		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[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.65e+63], t$95$2, If[LessEqual[z, -1.2e-257], t$95$1, If[LessEqual[z, 1.25e-272], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.08e-185], t$95$1, If[LessEqual[z, 5e-153], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.35e+112], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq 1.08 \cdot 10^{-185}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.35 \cdot 10^{+112}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.65e63 or 2.34999999999999999e112 < z

    1. Initial program 36.9%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.65e63 < z < -1.20000000000000008e-257 or 1.24999999999999995e-272 < z < 1.08e-185 or 5.00000000000000033e-153 < z < 2.34999999999999999e112

    1. Initial program 85.9%

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-y \cdot x}}{a} \]
      3. distribute-rgt-neg-out52.6%

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

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

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

    if -1.20000000000000008e-257 < z < 1.24999999999999995e-272

    1. Initial program 94.3%

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

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

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

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

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

    if 1.08e-185 < z < 5.00000000000000033e-153

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.65 \cdot 10^{+63}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-257}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-272}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{-185}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-153}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+112}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \end{array} \]

Alternative 7: 59.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - x \cdot \frac{y}{a}\\ \mathbf{if}\;x \leq -2.15 \cdot 10^{+93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -5000:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{-19}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;x \leq 8.6 \cdot 10^{+86}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.08 \cdot 10^{+154}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;x \leq 2.25 \cdot 10^{+201}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* x (/ y a)))))
   (if (<= x -2.15e+93)
     t_1
     (if (<= x -5000.0)
       (* y (/ (- t x) (- a z)))
       (if (<= x -1.45e-19)
         (+ t (* x (/ y z)))
         (if (<= x 8.6e+86)
           (* t (/ (- y z) (- a z)))
           (if (<= x 1.08e+154)
             (+ x (/ (* t y) a))
             (if (<= x 2.25e+201) (- t (* x (/ a z))) t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double tmp;
	if (x <= -2.15e+93) {
		tmp = t_1;
	} else if (x <= -5000.0) {
		tmp = y * ((t - x) / (a - z));
	} else if (x <= -1.45e-19) {
		tmp = t + (x * (y / z));
	} else if (x <= 8.6e+86) {
		tmp = t * ((y - z) / (a - z));
	} else if (x <= 1.08e+154) {
		tmp = x + ((t * y) / a);
	} else if (x <= 2.25e+201) {
		tmp = t - (x * (a / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - (x * (y / a))
    if (x <= (-2.15d+93)) then
        tmp = t_1
    else if (x <= (-5000.0d0)) then
        tmp = y * ((t - x) / (a - z))
    else if (x <= (-1.45d-19)) then
        tmp = t + (x * (y / z))
    else if (x <= 8.6d+86) then
        tmp = t * ((y - z) / (a - z))
    else if (x <= 1.08d+154) then
        tmp = x + ((t * y) / a)
    else if (x <= 2.25d+201) then
        tmp = t - (x * (a / z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double tmp;
	if (x <= -2.15e+93) {
		tmp = t_1;
	} else if (x <= -5000.0) {
		tmp = y * ((t - x) / (a - z));
	} else if (x <= -1.45e-19) {
		tmp = t + (x * (y / z));
	} else if (x <= 8.6e+86) {
		tmp = t * ((y - z) / (a - z));
	} else if (x <= 1.08e+154) {
		tmp = x + ((t * y) / a);
	} else if (x <= 2.25e+201) {
		tmp = t - (x * (a / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (x * (y / a))
	tmp = 0
	if x <= -2.15e+93:
		tmp = t_1
	elif x <= -5000.0:
		tmp = y * ((t - x) / (a - z))
	elif x <= -1.45e-19:
		tmp = t + (x * (y / z))
	elif x <= 8.6e+86:
		tmp = t * ((y - z) / (a - z))
	elif x <= 1.08e+154:
		tmp = x + ((t * y) / a)
	elif x <= 2.25e+201:
		tmp = t - (x * (a / z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(x * Float64(y / a)))
	tmp = 0.0
	if (x <= -2.15e+93)
		tmp = t_1;
	elseif (x <= -5000.0)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (x <= -1.45e-19)
		tmp = Float64(t + Float64(x * Float64(y / z)));
	elseif (x <= 8.6e+86)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	elseif (x <= 1.08e+154)
		tmp = Float64(x + Float64(Float64(t * y) / a));
	elseif (x <= 2.25e+201)
		tmp = Float64(t - Float64(x * Float64(a / z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (x * (y / a));
	tmp = 0.0;
	if (x <= -2.15e+93)
		tmp = t_1;
	elseif (x <= -5000.0)
		tmp = y * ((t - x) / (a - z));
	elseif (x <= -1.45e-19)
		tmp = t + (x * (y / z));
	elseif (x <= 8.6e+86)
		tmp = t * ((y - z) / (a - z));
	elseif (x <= 1.08e+154)
		tmp = x + ((t * y) / a);
	elseif (x <= 2.25e+201)
		tmp = t - (x * (a / z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.15e+93], t$95$1, If[LessEqual[x, -5000.0], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.45e-19], N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.6e+86], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.08e+154], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.25e+201], N[(t - N[(x * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - x \cdot \frac{y}{a}\\
\mathbf{if}\;x \leq -2.15 \cdot 10^{+93}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq -1.45 \cdot 10^{-19}:\\
\;\;\;\;t + x \cdot \frac{y}{z}\\

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

\mathbf{elif}\;x \leq 1.08 \cdot 10^{+154}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -2.15e93 or 2.25000000000000005e201 < x

    1. Initial program 49.5%

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-y \cdot x}}{a} \]
      3. distribute-rgt-neg-out48.8%

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

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

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

    if -2.15e93 < x < -5e3

    1. Initial program 66.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative67.5%

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

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

    if -5e3 < x < -1.45e-19

    1. Initial program 100.0%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--41.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.45e-19 < x < 8.6000000000000004e86

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

    if 8.6000000000000004e86 < x < 1.08e154

    1. Initial program 67.5%

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

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

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

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

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

    if 1.08e154 < x < 2.25000000000000005e201

    1. Initial program 36.6%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{a}{z} \cdot x} \]
      2. *-commutative60.1%

        \[\leadsto t - \color{blue}{x \cdot \frac{a}{z}} \]
    12. Simplified60.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.15 \cdot 10^{+93}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -5000:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{-19}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;x \leq 8.6 \cdot 10^{+86}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.08 \cdot 10^{+154}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;x \leq 2.25 \cdot 10^{+201}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]

Alternative 8: 66.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -2.05 \cdot 10^{-129}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;z \leq 2.9 \cdot 10^{+115}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.54999999999999999e69 or 1.15e30 < z < 2.90000000000000005e115

    1. Initial program 43.7%

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

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

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

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

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

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

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

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

    if -2.54999999999999999e69 < z < -2.05e-129 or -7.7000000000000001e-205 < z < 1.15e30

    1. Initial program 90.5%

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

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

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

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

    if -2.05e-129 < z < -7.7000000000000001e-205

    1. Initial program 83.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative81.0%

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

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

    if 2.90000000000000005e115 < z

    1. Initial program 37.2%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.55 \cdot 10^{+69}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{-129}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -7.7 \cdot 10^{-205}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+30}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+115}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \end{array} \]

Alternative 9: 78.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -1.7 \cdot 10^{-184}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+111}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.6e65 or 1.4e111 < z

    1. Initial program 36.9%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.6e65 < z < -1.70000000000000002e-184 or 1e-174 < z < 1.4e111

    1. Initial program 83.4%

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

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

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

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

    if -1.70000000000000002e-184 < z < 1e-174

    1. Initial program 91.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+65}:\\ \;\;\;\;t + \frac{y - a}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-184}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;z \leq 10^{-174}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+111}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y - a}{z} \cdot \left(x - t\right)\\ \end{array} \]

Alternative 10: 77.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -1.7 \cdot 10^{-184}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.9 \cdot 10^{+111}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.1999999999999998e66

    1. Initial program 37.1%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--79.7%

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

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

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

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

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

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

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

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

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

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

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

    if -2.1999999999999998e66 < z < -1.70000000000000002e-184 or 1e-174 < z < 2.9e111

    1. Initial program 83.4%

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

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

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

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

    if -1.70000000000000002e-184 < z < 1e-174

    1. Initial program 91.8%

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

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

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

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

    if 2.9e111 < z

    1. Initial program 36.6%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--80.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+66}:\\ \;\;\;\;t + \frac{a - y}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-184}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;z \leq 10^{-174}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+111}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y - a}{z} \cdot \left(x - t\right)\\ \end{array} \]

Alternative 11: 39.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;y \leq -4.7 \cdot 10^{+184}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.08 \cdot 10^{-144}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+41}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{+217}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y (- a z)))))
   (if (<= y -4.7e+184)
     t_1
     (if (<= y -1.08e-144)
       (+ t x)
       (if (<= y -1.8e-223)
         (* t (/ (- y z) a))
         (if (<= y 7.2e+41)
           (+ t x)
           (if (<= y 2.05e+217) t_1 (* x (/ y z)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (y <= -4.7e+184) {
		tmp = t_1;
	} else if (y <= -1.08e-144) {
		tmp = t + x;
	} else if (y <= -1.8e-223) {
		tmp = t * ((y - z) / a);
	} else if (y <= 7.2e+41) {
		tmp = t + x;
	} else if (y <= 2.05e+217) {
		tmp = t_1;
	} else {
		tmp = x * (y / 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) :: t_1
    real(8) :: tmp
    t_1 = t * (y / (a - z))
    if (y <= (-4.7d+184)) then
        tmp = t_1
    else if (y <= (-1.08d-144)) then
        tmp = t + x
    else if (y <= (-1.8d-223)) then
        tmp = t * ((y - z) / a)
    else if (y <= 7.2d+41) then
        tmp = t + x
    else if (y <= 2.05d+217) then
        tmp = t_1
    else
        tmp = x * (y / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (y <= -4.7e+184) {
		tmp = t_1;
	} else if (y <= -1.08e-144) {
		tmp = t + x;
	} else if (y <= -1.8e-223) {
		tmp = t * ((y - z) / a);
	} else if (y <= 7.2e+41) {
		tmp = t + x;
	} else if (y <= 2.05e+217) {
		tmp = t_1;
	} else {
		tmp = x * (y / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / (a - z))
	tmp = 0
	if y <= -4.7e+184:
		tmp = t_1
	elif y <= -1.08e-144:
		tmp = t + x
	elif y <= -1.8e-223:
		tmp = t * ((y - z) / a)
	elif y <= 7.2e+41:
		tmp = t + x
	elif y <= 2.05e+217:
		tmp = t_1
	else:
		tmp = x * (y / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (y <= -4.7e+184)
		tmp = t_1;
	elseif (y <= -1.08e-144)
		tmp = Float64(t + x);
	elseif (y <= -1.8e-223)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (y <= 7.2e+41)
		tmp = Float64(t + x);
	elseif (y <= 2.05e+217)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(y / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / (a - z));
	tmp = 0.0;
	if (y <= -4.7e+184)
		tmp = t_1;
	elseif (y <= -1.08e-144)
		tmp = t + x;
	elseif (y <= -1.8e-223)
		tmp = t * ((y - z) / a);
	elseif (y <= 7.2e+41)
		tmp = t + x;
	elseif (y <= 2.05e+217)
		tmp = t_1;
	else
		tmp = x * (y / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.7e+184], t$95$1, If[LessEqual[y, -1.08e-144], N[(t + x), $MachinePrecision], If[LessEqual[y, -1.8e-223], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e+41], N[(t + x), $MachinePrecision], If[LessEqual[y, 2.05e+217], t$95$1, N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;y \leq 7.2 \cdot 10^{+41}:\\
\;\;\;\;t + x\\

\mathbf{elif}\;y \leq 2.05 \cdot 10^{+217}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.7000000000000003e184 or 7.20000000000000051e41 < y < 2.0500000000000001e217

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

    if -4.7000000000000003e184 < y < -1.08e-144 or -1.8000000000000002e-223 < y < 7.20000000000000051e41

    1. Initial program 64.3%

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

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

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

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

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

    if -1.08e-144 < y < -1.8000000000000002e-223

    1. Initial program 71.5%

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

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

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

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

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

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

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

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

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

    if 2.0500000000000001e217 < y

    1. Initial program 72.0%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    12. Simplified65.3%

      \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification49.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.7 \cdot 10^{+184}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq -1.08 \cdot 10^{-144}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+41}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{+217}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]

Alternative 12: 39.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;y \leq -1.5 \cdot 10^{+185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.08 \cdot 10^{-144}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+42}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+219}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y (- a z)))))
   (if (<= y -1.5e+185)
     t_1
     (if (<= y -1.08e-144)
       (+ t x)
       (if (<= y -1.8e-223)
         (* t (/ (- y z) a))
         (if (<= y 1.65e+42)
           (+ t x)
           (if (<= y 3.6e+219) t_1 (* x (/ (- y a) z)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (y <= -1.5e+185) {
		tmp = t_1;
	} else if (y <= -1.08e-144) {
		tmp = t + x;
	} else if (y <= -1.8e-223) {
		tmp = t * ((y - z) / a);
	} else if (y <= 1.65e+42) {
		tmp = t + x;
	} else if (y <= 3.6e+219) {
		tmp = t_1;
	} else {
		tmp = x * ((y - a) / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (y / (a - z))
    if (y <= (-1.5d+185)) then
        tmp = t_1
    else if (y <= (-1.08d-144)) then
        tmp = t + x
    else if (y <= (-1.8d-223)) then
        tmp = t * ((y - z) / a)
    else if (y <= 1.65d+42) then
        tmp = t + x
    else if (y <= 3.6d+219) then
        tmp = t_1
    else
        tmp = x * ((y - a) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (y <= -1.5e+185) {
		tmp = t_1;
	} else if (y <= -1.08e-144) {
		tmp = t + x;
	} else if (y <= -1.8e-223) {
		tmp = t * ((y - z) / a);
	} else if (y <= 1.65e+42) {
		tmp = t + x;
	} else if (y <= 3.6e+219) {
		tmp = t_1;
	} else {
		tmp = x * ((y - a) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / (a - z))
	tmp = 0
	if y <= -1.5e+185:
		tmp = t_1
	elif y <= -1.08e-144:
		tmp = t + x
	elif y <= -1.8e-223:
		tmp = t * ((y - z) / a)
	elif y <= 1.65e+42:
		tmp = t + x
	elif y <= 3.6e+219:
		tmp = t_1
	else:
		tmp = x * ((y - a) / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (y <= -1.5e+185)
		tmp = t_1;
	elseif (y <= -1.08e-144)
		tmp = Float64(t + x);
	elseif (y <= -1.8e-223)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (y <= 1.65e+42)
		tmp = Float64(t + x);
	elseif (y <= 3.6e+219)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(Float64(y - a) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / (a - z));
	tmp = 0.0;
	if (y <= -1.5e+185)
		tmp = t_1;
	elseif (y <= -1.08e-144)
		tmp = t + x;
	elseif (y <= -1.8e-223)
		tmp = t * ((y - z) / a);
	elseif (y <= 1.65e+42)
		tmp = t + x;
	elseif (y <= 3.6e+219)
		tmp = t_1;
	else
		tmp = x * ((y - a) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e+185], t$95$1, If[LessEqual[y, -1.08e-144], N[(t + x), $MachinePrecision], If[LessEqual[y, -1.8e-223], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+42], N[(t + x), $MachinePrecision], If[LessEqual[y, 3.6e+219], t$95$1, N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;y \leq 1.65 \cdot 10^{+42}:\\
\;\;\;\;t + x\\

\mathbf{elif}\;y \leq 3.6 \cdot 10^{+219}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.49999999999999997e185 or 1.6499999999999999e42 < y < 3.60000000000000006e219

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

    if -1.49999999999999997e185 < y < -1.08e-144 or -1.8000000000000002e-223 < y < 1.6499999999999999e42

    1. Initial program 64.3%

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

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

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

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

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

    if -1.08e-144 < y < -1.8000000000000002e-223

    1. Initial program 71.5%

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

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

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

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

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

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

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

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

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

    if 3.60000000000000006e219 < y

    1. Initial program 72.0%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - a}{z} \cdot x} \]
      2. *-commutative65.3%

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    12. Simplified65.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{+185}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq -1.08 \cdot 10^{-144}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+42}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+219}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \]

Alternative 13: 38.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t}{a - z}\\ \mathbf{if}\;y \leq -4.7 \cdot 10^{+184}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.08 \cdot 10^{-144}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+43}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+217}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ t (- a z)))))
   (if (<= y -4.7e+184)
     t_1
     (if (<= y -1.08e-144)
       (+ t x)
       (if (<= y -1.8e-223)
         (* t (/ (- y z) a))
         (if (<= y 5.2e+43)
           (+ t x)
           (if (<= y 2.2e+217) t_1 (* x (/ (- y a) z)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (t / (a - z));
	double tmp;
	if (y <= -4.7e+184) {
		tmp = t_1;
	} else if (y <= -1.08e-144) {
		tmp = t + x;
	} else if (y <= -1.8e-223) {
		tmp = t * ((y - z) / a);
	} else if (y <= 5.2e+43) {
		tmp = t + x;
	} else if (y <= 2.2e+217) {
		tmp = t_1;
	} else {
		tmp = x * ((y - a) / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (t / (a - z))
    if (y <= (-4.7d+184)) then
        tmp = t_1
    else if (y <= (-1.08d-144)) then
        tmp = t + x
    else if (y <= (-1.8d-223)) then
        tmp = t * ((y - z) / a)
    else if (y <= 5.2d+43) then
        tmp = t + x
    else if (y <= 2.2d+217) then
        tmp = t_1
    else
        tmp = x * ((y - a) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (t / (a - z));
	double tmp;
	if (y <= -4.7e+184) {
		tmp = t_1;
	} else if (y <= -1.08e-144) {
		tmp = t + x;
	} else if (y <= -1.8e-223) {
		tmp = t * ((y - z) / a);
	} else if (y <= 5.2e+43) {
		tmp = t + x;
	} else if (y <= 2.2e+217) {
		tmp = t_1;
	} else {
		tmp = x * ((y - a) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (t / (a - z))
	tmp = 0
	if y <= -4.7e+184:
		tmp = t_1
	elif y <= -1.08e-144:
		tmp = t + x
	elif y <= -1.8e-223:
		tmp = t * ((y - z) / a)
	elif y <= 5.2e+43:
		tmp = t + x
	elif y <= 2.2e+217:
		tmp = t_1
	else:
		tmp = x * ((y - a) / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(t / Float64(a - z)))
	tmp = 0.0
	if (y <= -4.7e+184)
		tmp = t_1;
	elseif (y <= -1.08e-144)
		tmp = Float64(t + x);
	elseif (y <= -1.8e-223)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (y <= 5.2e+43)
		tmp = Float64(t + x);
	elseif (y <= 2.2e+217)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(Float64(y - a) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (t / (a - z));
	tmp = 0.0;
	if (y <= -4.7e+184)
		tmp = t_1;
	elseif (y <= -1.08e-144)
		tmp = t + x;
	elseif (y <= -1.8e-223)
		tmp = t * ((y - z) / a);
	elseif (y <= 5.2e+43)
		tmp = t + x;
	elseif (y <= 2.2e+217)
		tmp = t_1;
	else
		tmp = x * ((y - a) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.7e+184], t$95$1, If[LessEqual[y, -1.08e-144], N[(t + x), $MachinePrecision], If[LessEqual[y, -1.8e-223], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+43], N[(t + x), $MachinePrecision], If[LessEqual[y, 2.2e+217], t$95$1, N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+43}:\\
\;\;\;\;t + x\\

\mathbf{elif}\;y \leq 2.2 \cdot 10^{+217}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.7000000000000003e184 or 5.20000000000000042e43 < y < 2.2e217

    1. Initial program 73.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative83.7%

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

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

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

    if -4.7000000000000003e184 < y < -1.08e-144 or -1.8000000000000002e-223 < y < 5.20000000000000042e43

    1. Initial program 64.3%

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

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

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

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

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

    if -1.08e-144 < y < -1.8000000000000002e-223

    1. Initial program 71.5%

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

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

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

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

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

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

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

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

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

    if 2.2e217 < y

    1. Initial program 72.0%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - a}{z} \cdot x} \]
      2. *-commutative65.3%

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    12. Simplified65.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.7 \cdot 10^{+184}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq -1.08 \cdot 10^{-144}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+43}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+217}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \]

Alternative 14: 40.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{+80}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;y \leq -1.08 \cdot 10^{-144}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;y \leq 2.12 \cdot 10^{+43}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+217}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -6.8e+80)
   (* y (/ (- t x) a))
   (if (<= y -1.08e-144)
     (+ t x)
     (if (<= y -1.8e-223)
       (* t (/ (- y z) a))
       (if (<= y 2.12e+43)
         (+ t x)
         (if (<= y 7e+217) (* y (/ t (- a z))) (* x (/ (- y a) z))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -6.8e+80) {
		tmp = y * ((t - x) / a);
	} else if (y <= -1.08e-144) {
		tmp = t + x;
	} else if (y <= -1.8e-223) {
		tmp = t * ((y - z) / a);
	} else if (y <= 2.12e+43) {
		tmp = t + x;
	} else if (y <= 7e+217) {
		tmp = y * (t / (a - z));
	} else {
		tmp = x * ((y - a) / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (y <= (-6.8d+80)) then
        tmp = y * ((t - x) / a)
    else if (y <= (-1.08d-144)) then
        tmp = t + x
    else if (y <= (-1.8d-223)) then
        tmp = t * ((y - z) / a)
    else if (y <= 2.12d+43) then
        tmp = t + x
    else if (y <= 7d+217) then
        tmp = y * (t / (a - z))
    else
        tmp = x * ((y - a) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -6.8e+80) {
		tmp = y * ((t - x) / a);
	} else if (y <= -1.08e-144) {
		tmp = t + x;
	} else if (y <= -1.8e-223) {
		tmp = t * ((y - z) / a);
	} else if (y <= 2.12e+43) {
		tmp = t + x;
	} else if (y <= 7e+217) {
		tmp = y * (t / (a - z));
	} else {
		tmp = x * ((y - a) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -6.8e+80:
		tmp = y * ((t - x) / a)
	elif y <= -1.08e-144:
		tmp = t + x
	elif y <= -1.8e-223:
		tmp = t * ((y - z) / a)
	elif y <= 2.12e+43:
		tmp = t + x
	elif y <= 7e+217:
		tmp = y * (t / (a - z))
	else:
		tmp = x * ((y - a) / z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -6.8e+80)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (y <= -1.08e-144)
		tmp = Float64(t + x);
	elseif (y <= -1.8e-223)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (y <= 2.12e+43)
		tmp = Float64(t + x);
	elseif (y <= 7e+217)
		tmp = Float64(y * Float64(t / Float64(a - z)));
	else
		tmp = Float64(x * Float64(Float64(y - a) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -6.8e+80)
		tmp = y * ((t - x) / a);
	elseif (y <= -1.08e-144)
		tmp = t + x;
	elseif (y <= -1.8e-223)
		tmp = t * ((y - z) / a);
	elseif (y <= 2.12e+43)
		tmp = t + x;
	elseif (y <= 7e+217)
		tmp = y * (t / (a - z));
	else
		tmp = x * ((y - a) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -6.8e+80], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.08e-144], N[(t + x), $MachinePrecision], If[LessEqual[y, -1.8e-223], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.12e+43], N[(t + x), $MachinePrecision], If[LessEqual[y, 7e+217], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{+80}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\

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

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

\mathbf{elif}\;y \leq 2.12 \cdot 10^{+43}:\\
\;\;\;\;t + x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -6.79999999999999984e80

    1. Initial program 62.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative71.5%

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

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

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

    if -6.79999999999999984e80 < y < -1.08e-144 or -1.8000000000000002e-223 < y < 2.12000000000000011e43

    1. Initial program 66.2%

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

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

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

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

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

    if -1.08e-144 < y < -1.8000000000000002e-223

    1. Initial program 71.5%

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

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

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

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

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

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

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

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

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

    if 2.12000000000000011e43 < y < 6.9999999999999996e217

    1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

    if 6.9999999999999996e217 < y

    1. Initial program 72.0%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - a}{z} \cdot x} \]
      2. *-commutative65.3%

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    12. Simplified65.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{+80}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;y \leq -1.08 \cdot 10^{-144}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;y \leq 2.12 \cdot 10^{+43}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+217}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \]

Alternative 15: 67.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq 2.65 \cdot 10^{-191}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1550000000:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 64.9%

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

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

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

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

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

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

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

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

    if -1.1e73 < a < 2.64999999999999993e-191 or 1.20000000000000004e-53 < a < 1.55e9

    1. Initial program 68.7%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.64999999999999993e-191 < a < 1.20000000000000004e-53

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]

    if 1.55e9 < a

    1. Initial program 65.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative65.1%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/92.7%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def92.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified92.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around 0 63.3%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a} + x} \]
    5. Step-by-step derivation
      1. +-commutative63.3%

        \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
      2. associate-/l*80.1%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified80.1%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification71.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{+73}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq 2.65 \cdot 10^{-191}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-53}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1550000000:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 16: 66.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + y \cdot \frac{x - t}{z}\\ \mathbf{if}\;a \leq -1.25 \cdot 10^{+77}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{-188}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-54}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;a \leq 2400000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* y (/ (- x t) z)))))
   (if (<= a -1.25e+77)
     (+ x (/ (- y z) (/ a t)))
     (if (<= a 4.6e-188)
       t_1
       (if (<= a 1.7e-54)
         (/ (* y (- t x)) (- a z))
         (if (<= a 2400000000.0) t_1 (+ x (/ y (/ a (- t x))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (y * ((x - t) / z));
	double tmp;
	if (a <= -1.25e+77) {
		tmp = x + ((y - z) / (a / t));
	} else if (a <= 4.6e-188) {
		tmp = t_1;
	} else if (a <= 1.7e-54) {
		tmp = (y * (t - x)) / (a - z);
	} else if (a <= 2400000000.0) {
		tmp = t_1;
	} else {
		tmp = x + (y / (a / (t - x)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t + (y * ((x - t) / z))
    if (a <= (-1.25d+77)) then
        tmp = x + ((y - z) / (a / t))
    else if (a <= 4.6d-188) then
        tmp = t_1
    else if (a <= 1.7d-54) then
        tmp = (y * (t - x)) / (a - z)
    else if (a <= 2400000000.0d0) then
        tmp = t_1
    else
        tmp = x + (y / (a / (t - x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (y * ((x - t) / z));
	double tmp;
	if (a <= -1.25e+77) {
		tmp = x + ((y - z) / (a / t));
	} else if (a <= 4.6e-188) {
		tmp = t_1;
	} else if (a <= 1.7e-54) {
		tmp = (y * (t - x)) / (a - z);
	} else if (a <= 2400000000.0) {
		tmp = t_1;
	} else {
		tmp = x + (y / (a / (t - x)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (y * ((x - t) / z))
	tmp = 0
	if a <= -1.25e+77:
		tmp = x + ((y - z) / (a / t))
	elif a <= 4.6e-188:
		tmp = t_1
	elif a <= 1.7e-54:
		tmp = (y * (t - x)) / (a - z)
	elif a <= 2400000000.0:
		tmp = t_1
	else:
		tmp = x + (y / (a / (t - x)))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(y * Float64(Float64(x - t) / z)))
	tmp = 0.0
	if (a <= -1.25e+77)
		tmp = Float64(x + Float64(Float64(y - z) / Float64(a / t)));
	elseif (a <= 4.6e-188)
		tmp = t_1;
	elseif (a <= 1.7e-54)
		tmp = Float64(Float64(y * Float64(t - x)) / Float64(a - z));
	elseif (a <= 2400000000.0)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(y / Float64(a / Float64(t - x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + (y * ((x - t) / z));
	tmp = 0.0;
	if (a <= -1.25e+77)
		tmp = x + ((y - z) / (a / t));
	elseif (a <= 4.6e-188)
		tmp = t_1;
	elseif (a <= 1.7e-54)
		tmp = (y * (t - x)) / (a - z);
	elseif (a <= 2400000000.0)
		tmp = t_1;
	else
		tmp = x + (y / (a / (t - x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.25e+77], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.6e-188], t$95$1, If[LessEqual[a, 1.7e-54], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2400000000.0], t$95$1, N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + y \cdot \frac{x - t}{z}\\
\mathbf{if}\;a \leq -1.25 \cdot 10^{+77}:\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\

\mathbf{elif}\;a \leq 4.6 \cdot 10^{-188}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.7 \cdot 10^{-54}:\\
\;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\

\mathbf{elif}\;a \leq 2400000000:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.25000000000000001e77

    1. Initial program 64.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*90.4%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified90.4%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Taylor expanded in t around inf 80.4%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    5. Taylor expanded in a around inf 61.5%

      \[\leadsto x + \color{blue}{\frac{t \cdot \left(y - z\right)}{a}} \]
    6. Step-by-step derivation
      1. *-commutative61.5%

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot t}}{a} \]
      2. associate-/l*65.7%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a}{t}}} \]
    7. Simplified65.7%

      \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a}{t}}} \]

    if -1.25000000000000001e77 < a < 4.6e-188 or 1.69999999999999994e-54 < a < 2.4e9

    1. Initial program 68.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative68.7%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/78.5%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def78.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified78.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 74.2%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative74.2%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*79.5%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--79.5%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg79.5%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac79.5%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*74.2%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative74.2%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--74.3%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg74.3%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--74.2%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative74.2%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*79.5%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified79.5%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in y around inf 64.9%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    8. Step-by-step derivation
      1. associate-*r/70.9%

        \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    9. Simplified70.9%

      \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]

    if 4.6e-188 < a < 1.69999999999999994e-54

    1. Initial program 74.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative74.4%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/80.6%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def80.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified80.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in y around -inf 69.4%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]

    if 2.4e9 < a

    1. Initial program 65.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative65.1%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/92.7%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def92.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified92.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around 0 63.3%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a} + x} \]
    5. Step-by-step derivation
      1. +-commutative63.3%

        \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
      2. associate-/l*80.1%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified80.1%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification71.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.25 \cdot 10^{+77}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{-188}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-54}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;a \leq 2400000000:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 17: 88.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+202} \lor \neg \left(z \leq 1.95 \cdot 10^{+171}\right):\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{a - z} \cdot \left(t - x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -1.6e+202) (not (<= z 1.95e+171)))
   (+ t (* (- y a) (/ x z)))
   (+ x (* (/ (- y z) (- a z)) (- t x)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.6e+202) || !(z <= 1.95e+171)) {
		tmp = t + ((y - a) * (x / z));
	} else {
		tmp = x + (((y - z) / (a - z)) * (t - x));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-1.6d+202)) .or. (.not. (z <= 1.95d+171))) then
        tmp = t + ((y - a) * (x / z))
    else
        tmp = x + (((y - z) / (a - z)) * (t - x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.6e+202) || !(z <= 1.95e+171)) {
		tmp = t + ((y - a) * (x / z));
	} else {
		tmp = x + (((y - z) / (a - z)) * (t - x));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.6e+202) or not (z <= 1.95e+171):
		tmp = t + ((y - a) * (x / z))
	else:
		tmp = x + (((y - z) / (a - z)) * (t - x))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1.6e+202) || !(z <= 1.95e+171))
		tmp = Float64(t + Float64(Float64(y - a) * Float64(x / z)));
	else
		tmp = Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * Float64(t - x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -1.6e+202) || ~((z <= 1.95e+171)))
		tmp = t + ((y - a) * (x / z));
	else
		tmp = x + (((y - z) / (a - z)) * (t - x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.6e+202], N[Not[LessEqual[z, 1.95e+171]], $MachinePrecision]], N[(t + N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+202} \lor \neg \left(z \leq 1.95 \cdot 10^{+171}\right):\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{a - z} \cdot \left(t - x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.60000000000000006e202 or 1.95e171 < z

    1. Initial program 27.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative27.8%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/60.7%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def61.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified61.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 63.2%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative63.2%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*87.3%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--87.3%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg87.3%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac87.3%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*63.2%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative63.2%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--60.7%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg60.7%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--63.2%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative63.2%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*87.3%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified87.3%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 87.6%

      \[\leadsto t - \frac{y - a}{\color{blue}{-1 \cdot \frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-*r/87.6%

        \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-1 \cdot z}{x}}} \]
      2. neg-mul-187.6%

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    9. Simplified87.6%

      \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-z}{x}}} \]
    10. Taylor expanded in z around 0 78.9%

      \[\leadsto t - \color{blue}{-1 \cdot \frac{\left(y - a\right) \cdot x}{z}} \]
    11. Step-by-step derivation
      1. associate-/l*87.6%

        \[\leadsto t - -1 \cdot \color{blue}{\frac{y - a}{\frac{z}{x}}} \]
      2. associate-*r/87.6%

        \[\leadsto t - \color{blue}{\frac{-1 \cdot \left(y - a\right)}{\frac{z}{x}}} \]
      3. associate-*l/87.6%

        \[\leadsto t - \color{blue}{\frac{-1}{\frac{z}{x}} \cdot \left(y - a\right)} \]
      4. metadata-eval87.6%

        \[\leadsto t - \frac{\color{blue}{-1}}{\frac{z}{x}} \cdot \left(y - a\right) \]
      5. distribute-neg-frac87.6%

        \[\leadsto t - \color{blue}{\left(-\frac{1}{\frac{z}{x}}\right)} \cdot \left(y - a\right) \]
      6. *-commutative87.6%

        \[\leadsto t - \color{blue}{\left(y - a\right) \cdot \left(-\frac{1}{\frac{z}{x}}\right)} \]
      7. associate-/r/90.5%

        \[\leadsto t - \left(y - a\right) \cdot \left(-\color{blue}{\frac{1}{z} \cdot x}\right) \]
      8. associate-*l/90.6%

        \[\leadsto t - \left(y - a\right) \cdot \left(-\color{blue}{\frac{1 \cdot x}{z}}\right) \]
      9. *-lft-identity90.6%

        \[\leadsto t - \left(y - a\right) \cdot \left(-\frac{\color{blue}{x}}{z}\right) \]
    12. Simplified90.6%

      \[\leadsto t - \color{blue}{\left(y - a\right) \cdot \left(-\frac{x}{z}\right)} \]

    if -1.60000000000000006e202 < z < 1.95e171

    1. Initial program 75.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/90.8%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified90.8%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification90.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+202} \lor \neg \left(z \leq 1.95 \cdot 10^{+171}\right):\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{a - z} \cdot \left(t - x\right)\\ \end{array} \]

Alternative 18: 53.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{t \cdot y}{a}\\ t_2 := t - x \cdot \frac{a}{z}\\ \mathbf{if}\;z \leq -5.8 \cdot 10^{+100}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-151}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-218}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+83}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* t y) a))) (t_2 (- t (* x (/ a z)))))
   (if (<= z -5.8e+100)
     t_2
     (if (<= z -1.4e-151)
       t_1
       (if (<= z -1.85e-218)
         (* (- t x) (/ y a))
         (if (<= z 1.9e+83) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t * y) / a);
	double t_2 = t - (x * (a / z));
	double tmp;
	if (z <= -5.8e+100) {
		tmp = t_2;
	} else if (z <= -1.4e-151) {
		tmp = t_1;
	} else if (z <= -1.85e-218) {
		tmp = (t - x) * (y / a);
	} else if (z <= 1.9e+83) {
		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 + ((t * y) / a)
    t_2 = t - (x * (a / z))
    if (z <= (-5.8d+100)) then
        tmp = t_2
    else if (z <= (-1.4d-151)) then
        tmp = t_1
    else if (z <= (-1.85d-218)) then
        tmp = (t - x) * (y / a)
    else if (z <= 1.9d+83) 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 + ((t * y) / a);
	double t_2 = t - (x * (a / z));
	double tmp;
	if (z <= -5.8e+100) {
		tmp = t_2;
	} else if (z <= -1.4e-151) {
		tmp = t_1;
	} else if (z <= -1.85e-218) {
		tmp = (t - x) * (y / a);
	} else if (z <= 1.9e+83) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((t * y) / a)
	t_2 = t - (x * (a / z))
	tmp = 0
	if z <= -5.8e+100:
		tmp = t_2
	elif z <= -1.4e-151:
		tmp = t_1
	elif z <= -1.85e-218:
		tmp = (t - x) * (y / a)
	elif z <= 1.9e+83:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(t * y) / a))
	t_2 = Float64(t - Float64(x * Float64(a / z)))
	tmp = 0.0
	if (z <= -5.8e+100)
		tmp = t_2;
	elseif (z <= -1.4e-151)
		tmp = t_1;
	elseif (z <= -1.85e-218)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (z <= 1.9e+83)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((t * y) / a);
	t_2 = t - (x * (a / z));
	tmp = 0.0;
	if (z <= -5.8e+100)
		tmp = t_2;
	elseif (z <= -1.4e-151)
		tmp = t_1;
	elseif (z <= -1.85e-218)
		tmp = (t - x) * (y / a);
	elseif (z <= 1.9e+83)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(x * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e+100], t$95$2, If[LessEqual[z, -1.4e-151], t$95$1, If[LessEqual[z, -1.85e-218], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+83], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{t \cdot y}{a}\\
t_2 := t - x \cdot \frac{a}{z}\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{+100}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -1.4 \cdot 10^{-151}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.85 \cdot 10^{-218}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq 1.9 \cdot 10^{+83}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.8000000000000001e100 or 1.9000000000000001e83 < z

    1. Initial program 37.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative37.2%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/69.6%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def69.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified69.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 58.6%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative58.6%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*77.7%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--77.7%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg77.7%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac77.7%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*58.6%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative58.6%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--57.3%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg57.3%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--58.6%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative58.6%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*77.7%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified77.7%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 72.8%

      \[\leadsto t - \frac{y - a}{\color{blue}{-1 \cdot \frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-*r/72.8%

        \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-1 \cdot z}{x}}} \]
      2. neg-mul-172.8%

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    9. Simplified72.8%

      \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-z}{x}}} \]
    10. Taylor expanded in y around 0 56.5%

      \[\leadsto t - \color{blue}{\frac{a \cdot x}{z}} \]
    11. Step-by-step derivation
      1. associate-*l/58.0%

        \[\leadsto t - \color{blue}{\frac{a}{z} \cdot x} \]
      2. *-commutative58.0%

        \[\leadsto t - \color{blue}{x \cdot \frac{a}{z}} \]
    12. Simplified58.0%

      \[\leadsto t - \color{blue}{x \cdot \frac{a}{z}} \]

    if -5.8000000000000001e100 < z < -1.4e-151 or -1.8500000000000001e-218 < z < 1.9000000000000001e83

    1. Initial program 85.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/95.5%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified95.5%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 69.7%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
    5. Taylor expanded in t around inf 55.4%

      \[\leadsto x + \color{blue}{\frac{y \cdot t}{a}} \]

    if -1.4e-151 < z < -1.8500000000000001e-218

    1. Initial program 83.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative83.3%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/92.3%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def92.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified92.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in y around inf 85.7%

      \[\leadsto \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y} \]
    5. Step-by-step derivation
      1. div-sub85.7%

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative85.7%

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Simplified85.7%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    7. Taylor expanded in a around inf 55.8%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*65.8%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/69.3%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(t - x\right)} \]
    9. Simplified69.3%

      \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(t - x\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+100}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-151}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-218}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+83}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \end{array} \]

Alternative 19: 60.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - x \cdot \frac{y}{a}\\ \mathbf{if}\;x \leq -1.15 \cdot 10^{+96}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.12 \cdot 10^{+153}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+202}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* x (/ y a)))))
   (if (<= x -1.15e+96)
     t_1
     (if (<= x 6.8e+85)
       (* t (/ (- y z) (- a z)))
       (if (<= x 1.12e+153)
         (+ x (/ (* t y) a))
         (if (<= x 4e+202) (- t (* x (/ a z))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double tmp;
	if (x <= -1.15e+96) {
		tmp = t_1;
	} else if (x <= 6.8e+85) {
		tmp = t * ((y - z) / (a - z));
	} else if (x <= 1.12e+153) {
		tmp = x + ((t * y) / a);
	} else if (x <= 4e+202) {
		tmp = t - (x * (a / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - (x * (y / a))
    if (x <= (-1.15d+96)) then
        tmp = t_1
    else if (x <= 6.8d+85) then
        tmp = t * ((y - z) / (a - z))
    else if (x <= 1.12d+153) then
        tmp = x + ((t * y) / a)
    else if (x <= 4d+202) then
        tmp = t - (x * (a / z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double tmp;
	if (x <= -1.15e+96) {
		tmp = t_1;
	} else if (x <= 6.8e+85) {
		tmp = t * ((y - z) / (a - z));
	} else if (x <= 1.12e+153) {
		tmp = x + ((t * y) / a);
	} else if (x <= 4e+202) {
		tmp = t - (x * (a / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (x * (y / a))
	tmp = 0
	if x <= -1.15e+96:
		tmp = t_1
	elif x <= 6.8e+85:
		tmp = t * ((y - z) / (a - z))
	elif x <= 1.12e+153:
		tmp = x + ((t * y) / a)
	elif x <= 4e+202:
		tmp = t - (x * (a / z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(x * Float64(y / a)))
	tmp = 0.0
	if (x <= -1.15e+96)
		tmp = t_1;
	elseif (x <= 6.8e+85)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	elseif (x <= 1.12e+153)
		tmp = Float64(x + Float64(Float64(t * y) / a));
	elseif (x <= 4e+202)
		tmp = Float64(t - Float64(x * Float64(a / z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (x * (y / a));
	tmp = 0.0;
	if (x <= -1.15e+96)
		tmp = t_1;
	elseif (x <= 6.8e+85)
		tmp = t * ((y - z) / (a - z));
	elseif (x <= 1.12e+153)
		tmp = x + ((t * y) / a);
	elseif (x <= 4e+202)
		tmp = t - (x * (a / z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.15e+96], t$95$1, If[LessEqual[x, 6.8e+85], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.12e+153], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4e+202], N[(t - N[(x * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - x \cdot \frac{y}{a}\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{+96}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 6.8 \cdot 10^{+85}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

\mathbf{elif}\;x \leq 1.12 \cdot 10^{+153}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\

\mathbf{elif}\;x \leq 4 \cdot 10^{+202}:\\
\;\;\;\;t - x \cdot \frac{a}{z}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.15000000000000008e96 or 3.9999999999999996e202 < x

    1. Initial program 49.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/74.7%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified74.7%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 60.6%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
    5. Taylor expanded in t around 0 48.8%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{y \cdot x}{a}} \]
    6. Step-by-step derivation
      1. associate-*r/48.8%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(y \cdot x\right)}{a}} \]
      2. mul-1-neg48.8%

        \[\leadsto x + \frac{\color{blue}{-y \cdot x}}{a} \]
      3. distribute-rgt-neg-out48.8%

        \[\leadsto x + \frac{\color{blue}{y \cdot \left(-x\right)}}{a} \]
      4. associate-*l/58.4%

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot \left(-x\right)} \]
    7. Simplified58.4%

      \[\leadsto x + \color{blue}{\frac{y}{a} \cdot \left(-x\right)} \]

    if -1.15000000000000008e96 < x < 6.8000000000000007e85

    1. Initial program 77.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative77.9%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/92.5%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def92.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified92.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in t around inf 67.5%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    5. Step-by-step derivation
      1. div-sub67.5%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    6. Simplified67.5%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if 6.8000000000000007e85 < x < 1.1200000000000001e153

    1. Initial program 67.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/75.8%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified75.8%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Taylor expanded in z around 0 76.0%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
    5. Taylor expanded in t around inf 76.5%

      \[\leadsto x + \color{blue}{\frac{y \cdot t}{a}} \]

    if 1.1200000000000001e153 < x < 3.9999999999999996e202

    1. Initial program 36.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative36.6%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/67.6%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def67.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified67.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 52.0%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative52.0%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*76.1%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--76.1%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg76.1%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac76.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*52.0%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative52.0%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--52.0%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg52.0%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--52.0%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative52.0%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*76.1%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified76.1%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 76.1%

      \[\leadsto t - \frac{y - a}{\color{blue}{-1 \cdot \frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-*r/76.1%

        \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-1 \cdot z}{x}}} \]
      2. neg-mul-176.1%

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    9. Simplified76.1%

      \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-z}{x}}} \]
    10. Taylor expanded in y around 0 44.5%

      \[\leadsto t - \color{blue}{\frac{a \cdot x}{z}} \]
    11. Step-by-step derivation
      1. associate-*l/60.1%

        \[\leadsto t - \color{blue}{\frac{a}{z} \cdot x} \]
      2. *-commutative60.1%

        \[\leadsto t - \color{blue}{x \cdot \frac{a}{z}} \]
    12. Simplified60.1%

      \[\leadsto t - \color{blue}{x \cdot \frac{a}{z}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification65.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.15 \cdot 10^{+96}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.12 \cdot 10^{+153}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+202}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]

Alternative 20: 41.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;y \leq -4.7 \cdot 10^{+184}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+37}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+217}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y (- a z)))))
   (if (<= y -4.7e+184)
     t_1
     (if (<= y 5.8e+37) (+ t x) (if (<= y 6.5e+217) t_1 (* x (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (y <= -4.7e+184) {
		tmp = t_1;
	} else if (y <= 5.8e+37) {
		tmp = t + x;
	} else if (y <= 6.5e+217) {
		tmp = t_1;
	} else {
		tmp = x * (y / 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) :: t_1
    real(8) :: tmp
    t_1 = t * (y / (a - z))
    if (y <= (-4.7d+184)) then
        tmp = t_1
    else if (y <= 5.8d+37) then
        tmp = t + x
    else if (y <= 6.5d+217) then
        tmp = t_1
    else
        tmp = x * (y / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (y <= -4.7e+184) {
		tmp = t_1;
	} else if (y <= 5.8e+37) {
		tmp = t + x;
	} else if (y <= 6.5e+217) {
		tmp = t_1;
	} else {
		tmp = x * (y / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / (a - z))
	tmp = 0
	if y <= -4.7e+184:
		tmp = t_1
	elif y <= 5.8e+37:
		tmp = t + x
	elif y <= 6.5e+217:
		tmp = t_1
	else:
		tmp = x * (y / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (y <= -4.7e+184)
		tmp = t_1;
	elseif (y <= 5.8e+37)
		tmp = Float64(t + x);
	elseif (y <= 6.5e+217)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(y / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / (a - z));
	tmp = 0.0;
	if (y <= -4.7e+184)
		tmp = t_1;
	elseif (y <= 5.8e+37)
		tmp = t + x;
	elseif (y <= 6.5e+217)
		tmp = t_1;
	else
		tmp = x * (y / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.7e+184], t$95$1, If[LessEqual[y, 5.8e+37], N[(t + x), $MachinePrecision], If[LessEqual[y, 6.5e+217], t$95$1, N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a - z}\\
\mathbf{if}\;y \leq -4.7 \cdot 10^{+184}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{+37}:\\
\;\;\;\;t + x\\

\mathbf{elif}\;y \leq 6.5 \cdot 10^{+217}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.7000000000000003e184 or 5.79999999999999957e37 < y < 6.50000000000000005e217

    1. Initial program 73.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative73.6%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/92.8%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def92.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified92.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in t around inf 55.4%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    5. Step-by-step derivation
      1. div-sub55.4%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    6. Simplified55.4%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Taylor expanded in y around inf 50.1%

      \[\leadsto t \cdot \color{blue}{\frac{y}{a - z}} \]

    if -4.7000000000000003e184 < y < 5.79999999999999957e37

    1. Initial program 65.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*76.9%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified76.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Taylor expanded in t around inf 68.0%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    5. Taylor expanded in z around inf 45.6%

      \[\leadsto x + \color{blue}{t} \]

    if 6.50000000000000005e217 < y

    1. Initial program 72.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative72.0%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/95.8%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def96.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified96.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 61.0%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative61.0%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*71.2%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--71.2%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg71.2%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac71.2%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*61.0%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative61.0%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--61.0%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg61.0%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--61.0%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative61.0%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*71.2%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified71.2%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 42.7%

      \[\leadsto t - \frac{y - a}{\color{blue}{-1 \cdot \frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-*r/42.7%

        \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-1 \cdot z}{x}}} \]
      2. neg-mul-142.7%

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    9. Simplified42.7%

      \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-z}{x}}} \]
    10. Taylor expanded in y around inf 37.9%

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
    11. Step-by-step derivation
      1. associate-*l/65.3%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    12. Simplified65.3%

      \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.7 \cdot 10^{+184}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+37}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+217}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]

Alternative 21: 43.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.7 \cdot 10^{+79}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+37}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+221}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -4.7e+79)
   (* (- t x) (/ y a))
   (if (<= y 2.7e+37)
     (+ t x)
     (if (<= y 5.2e+221) (* y (/ t (- a z))) (* x (/ (- y a) z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -4.7e+79) {
		tmp = (t - x) * (y / a);
	} else if (y <= 2.7e+37) {
		tmp = t + x;
	} else if (y <= 5.2e+221) {
		tmp = y * (t / (a - z));
	} else {
		tmp = x * ((y - a) / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (y <= (-4.7d+79)) then
        tmp = (t - x) * (y / a)
    else if (y <= 2.7d+37) then
        tmp = t + x
    else if (y <= 5.2d+221) then
        tmp = y * (t / (a - z))
    else
        tmp = x * ((y - a) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -4.7e+79) {
		tmp = (t - x) * (y / a);
	} else if (y <= 2.7e+37) {
		tmp = t + x;
	} else if (y <= 5.2e+221) {
		tmp = y * (t / (a - z));
	} else {
		tmp = x * ((y - a) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -4.7e+79:
		tmp = (t - x) * (y / a)
	elif y <= 2.7e+37:
		tmp = t + x
	elif y <= 5.2e+221:
		tmp = y * (t / (a - z))
	else:
		tmp = x * ((y - a) / z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -4.7e+79)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (y <= 2.7e+37)
		tmp = Float64(t + x);
	elseif (y <= 5.2e+221)
		tmp = Float64(y * Float64(t / Float64(a - z)));
	else
		tmp = Float64(x * Float64(Float64(y - a) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -4.7e+79)
		tmp = (t - x) * (y / a);
	elseif (y <= 2.7e+37)
		tmp = t + x;
	elseif (y <= 5.2e+221)
		tmp = y * (t / (a - z));
	else
		tmp = x * ((y - a) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4.7e+79], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+37], N[(t + x), $MachinePrecision], If[LessEqual[y, 5.2e+221], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.7 \cdot 10^{+79}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\

\mathbf{elif}\;y \leq 2.7 \cdot 10^{+37}:\\
\;\;\;\;t + x\\

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+221}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.70000000000000023e79

    1. Initial program 62.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative62.3%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/91.8%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def91.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified91.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in y around inf 71.5%

      \[\leadsto \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y} \]
    5. Step-by-step derivation
      1. div-sub71.5%

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative71.5%

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Simplified71.5%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    7. Taylor expanded in a around inf 34.8%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*50.1%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/50.1%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(t - x\right)} \]
    9. Simplified50.1%

      \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(t - x\right)} \]

    if -4.70000000000000023e79 < y < 2.69999999999999986e37

    1. Initial program 66.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*75.0%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified75.0%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Taylor expanded in t around inf 68.2%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    5. Taylor expanded in z around inf 46.5%

      \[\leadsto x + \color{blue}{t} \]

    if 2.69999999999999986e37 < y < 5.20000000000000008e221

    1. Initial program 77.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative77.0%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/95.4%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def95.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified95.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in y around inf 79.6%

      \[\leadsto \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y} \]
    5. Step-by-step derivation
      1. div-sub79.6%

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative79.6%

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Simplified79.6%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    7. Taylor expanded in t around inf 55.8%

      \[\leadsto y \cdot \color{blue}{\frac{t}{a - z}} \]

    if 5.20000000000000008e221 < y

    1. Initial program 72.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative72.0%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/95.8%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def96.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified96.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 61.0%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative61.0%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*71.2%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--71.2%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg71.2%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac71.2%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*61.0%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative61.0%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--61.0%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg61.0%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--61.0%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative61.0%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*71.2%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified71.2%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 42.7%

      \[\leadsto t - \frac{y - a}{\color{blue}{-1 \cdot \frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-*r/42.7%

        \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-1 \cdot z}{x}}} \]
      2. neg-mul-142.7%

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    9. Simplified42.7%

      \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-z}{x}}} \]
    10. Taylor expanded in t around 0 37.9%

      \[\leadsto \color{blue}{\frac{\left(y - a\right) \cdot x}{z}} \]
    11. Step-by-step derivation
      1. associate-*l/65.3%

        \[\leadsto \color{blue}{\frac{y - a}{z} \cdot x} \]
      2. *-commutative65.3%

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    12. Simplified65.3%

      \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification49.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.7 \cdot 10^{+79}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+37}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+221}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \]

Alternative 22: 38.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.7 \cdot 10^{+184}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+43}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+214}:\\ \;\;\;\;y \cdot \left(-\frac{t}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -4.7e+184)
   (* y (/ t a))
   (if (<= y 5.2e+43)
     (+ t x)
     (if (<= y 1.9e+214) (* y (- (/ t z))) (* x (/ y z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -4.7e+184) {
		tmp = y * (t / a);
	} else if (y <= 5.2e+43) {
		tmp = t + x;
	} else if (y <= 1.9e+214) {
		tmp = y * -(t / z);
	} else {
		tmp = x * (y / 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 (y <= (-4.7d+184)) then
        tmp = y * (t / a)
    else if (y <= 5.2d+43) then
        tmp = t + x
    else if (y <= 1.9d+214) then
        tmp = y * -(t / z)
    else
        tmp = x * (y / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -4.7e+184) {
		tmp = y * (t / a);
	} else if (y <= 5.2e+43) {
		tmp = t + x;
	} else if (y <= 1.9e+214) {
		tmp = y * -(t / z);
	} else {
		tmp = x * (y / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -4.7e+184:
		tmp = y * (t / a)
	elif y <= 5.2e+43:
		tmp = t + x
	elif y <= 1.9e+214:
		tmp = y * -(t / z)
	else:
		tmp = x * (y / z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -4.7e+184)
		tmp = Float64(y * Float64(t / a));
	elseif (y <= 5.2e+43)
		tmp = Float64(t + x);
	elseif (y <= 1.9e+214)
		tmp = Float64(y * Float64(-Float64(t / z)));
	else
		tmp = Float64(x * Float64(y / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -4.7e+184)
		tmp = y * (t / a);
	elseif (y <= 5.2e+43)
		tmp = t + x;
	elseif (y <= 1.9e+214)
		tmp = y * -(t / z);
	else
		tmp = x * (y / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4.7e+184], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+43], N[(t + x), $MachinePrecision], If[LessEqual[y, 1.9e+214], N[(y * (-N[(t / z), $MachinePrecision])), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.7 \cdot 10^{+184}:\\
\;\;\;\;y \cdot \frac{t}{a}\\

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+43}:\\
\;\;\;\;t + x\\

\mathbf{elif}\;y \leq 1.9 \cdot 10^{+214}:\\
\;\;\;\;y \cdot \left(-\frac{t}{z}\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.7000000000000003e184

    1. Initial program 69.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative69.6%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/89.6%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def89.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified89.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in y around inf 88.4%

      \[\leadsto \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y} \]
    5. Step-by-step derivation
      1. div-sub88.4%

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative88.4%

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Simplified88.4%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    7. Taylor expanded in t around inf 46.8%

      \[\leadsto y \cdot \color{blue}{\frac{t}{a - z}} \]
    8. Taylor expanded in a around inf 33.9%

      \[\leadsto y \cdot \color{blue}{\frac{t}{a}} \]

    if -4.7000000000000003e184 < y < 5.20000000000000042e43

    1. Initial program 65.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*76.9%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified76.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Taylor expanded in t around inf 68.0%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    5. Taylor expanded in z around inf 45.6%

      \[\leadsto x + \color{blue}{t} \]

    if 5.20000000000000042e43 < y < 1.89999999999999999e214

    1. Initial program 77.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative77.0%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/95.4%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def95.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified95.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in y around inf 79.6%

      \[\leadsto \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y} \]
    5. Step-by-step derivation
      1. div-sub79.6%

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative79.6%

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Simplified79.6%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    7. Taylor expanded in t around inf 55.8%

      \[\leadsto y \cdot \color{blue}{\frac{t}{a - z}} \]
    8. Taylor expanded in a around 0 35.1%

      \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{t}{z}\right)} \]
    9. Step-by-step derivation
      1. associate-*r/35.1%

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot t}{z}} \]
      2. neg-mul-135.1%

        \[\leadsto y \cdot \frac{\color{blue}{-t}}{z} \]
    10. Simplified35.1%

      \[\leadsto y \cdot \color{blue}{\frac{-t}{z}} \]

    if 1.89999999999999999e214 < y

    1. Initial program 72.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative72.0%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/95.8%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def96.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified96.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 61.0%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative61.0%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*71.2%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--71.2%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg71.2%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac71.2%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*61.0%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative61.0%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--61.0%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg61.0%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--61.0%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative61.0%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*71.2%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified71.2%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 42.7%

      \[\leadsto t - \frac{y - a}{\color{blue}{-1 \cdot \frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-*r/42.7%

        \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-1 \cdot z}{x}}} \]
      2. neg-mul-142.7%

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    9. Simplified42.7%

      \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-z}{x}}} \]
    10. Taylor expanded in y around inf 37.9%

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
    11. Step-by-step derivation
      1. associate-*l/65.3%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    12. Simplified65.3%

      \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification44.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.7 \cdot 10^{+184}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+43}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+214}:\\ \;\;\;\;y \cdot \left(-\frac{t}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]

Alternative 23: 38.6% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t}{a}\\ \mathbf{if}\;y \leq -8 \cdot 10^{+184}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+43}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+222}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ t a))))
   (if (<= y -8e+184)
     t_1
     (if (<= y 5.2e+43) (+ t x) (if (<= y 1.2e+222) t_1 (* y (/ x z)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (t / a);
	double tmp;
	if (y <= -8e+184) {
		tmp = t_1;
	} else if (y <= 5.2e+43) {
		tmp = t + x;
	} else if (y <= 1.2e+222) {
		tmp = t_1;
	} else {
		tmp = y * (x / 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) :: t_1
    real(8) :: tmp
    t_1 = y * (t / a)
    if (y <= (-8d+184)) then
        tmp = t_1
    else if (y <= 5.2d+43) then
        tmp = t + x
    else if (y <= 1.2d+222) then
        tmp = t_1
    else
        tmp = y * (x / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (t / a);
	double tmp;
	if (y <= -8e+184) {
		tmp = t_1;
	} else if (y <= 5.2e+43) {
		tmp = t + x;
	} else if (y <= 1.2e+222) {
		tmp = t_1;
	} else {
		tmp = y * (x / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (t / a)
	tmp = 0
	if y <= -8e+184:
		tmp = t_1
	elif y <= 5.2e+43:
		tmp = t + x
	elif y <= 1.2e+222:
		tmp = t_1
	else:
		tmp = y * (x / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(t / a))
	tmp = 0.0
	if (y <= -8e+184)
		tmp = t_1;
	elseif (y <= 5.2e+43)
		tmp = Float64(t + x);
	elseif (y <= 1.2e+222)
		tmp = t_1;
	else
		tmp = Float64(y * Float64(x / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (t / a);
	tmp = 0.0;
	if (y <= -8e+184)
		tmp = t_1;
	elseif (y <= 5.2e+43)
		tmp = t + x;
	elseif (y <= 1.2e+222)
		tmp = t_1;
	else
		tmp = y * (x / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8e+184], t$95$1, If[LessEqual[y, 5.2e+43], N[(t + x), $MachinePrecision], If[LessEqual[y, 1.2e+222], t$95$1, N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a}\\
\mathbf{if}\;y \leq -8 \cdot 10^{+184}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+43}:\\
\;\;\;\;t + x\\

\mathbf{elif}\;y \leq 1.2 \cdot 10^{+222}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.00000000000000014e184 or 5.20000000000000042e43 < y < 1.2000000000000001e222

    1. Initial program 73.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative73.6%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/92.8%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def92.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified92.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in y around inf 83.6%

      \[\leadsto \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y} \]
    5. Step-by-step derivation
      1. div-sub83.7%

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative83.7%

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Simplified83.7%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    7. Taylor expanded in t around inf 51.7%

      \[\leadsto y \cdot \color{blue}{\frac{t}{a - z}} \]
    8. Taylor expanded in a around inf 33.5%

      \[\leadsto y \cdot \color{blue}{\frac{t}{a}} \]

    if -8.00000000000000014e184 < y < 5.20000000000000042e43

    1. Initial program 65.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*76.9%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified76.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Taylor expanded in t around inf 68.0%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    5. Taylor expanded in z around inf 45.6%

      \[\leadsto x + \color{blue}{t} \]

    if 1.2000000000000001e222 < y

    1. Initial program 72.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative72.0%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/95.8%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def96.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified96.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 61.0%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative61.0%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*71.2%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--71.2%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg71.2%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac71.2%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*61.0%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative61.0%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--61.0%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg61.0%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--61.0%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative61.0%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*71.2%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified71.2%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 42.7%

      \[\leadsto t - \frac{y - a}{\color{blue}{-1 \cdot \frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-*r/42.7%

        \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-1 \cdot z}{x}}} \]
      2. neg-mul-142.7%

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    9. Simplified42.7%

      \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-z}{x}}} \]
    10. Taylor expanded in t around 0 37.9%

      \[\leadsto \color{blue}{\frac{\left(y - a\right) \cdot x}{z}} \]
    11. Taylor expanded in y around inf 37.9%

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/50.1%

        \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
    13. Simplified50.1%

      \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+184}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+43}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+222}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 24: 39.6% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{+186} \lor \neg \left(y \leq 4.8 \cdot 10^{+43}\right):\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= y -2.4e+186) (not (<= y 4.8e+43))) (* t (/ y a)) (+ t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -2.4e+186) || !(y <= 4.8e+43)) {
		tmp = t * (y / a);
	} else {
		tmp = t + x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((y <= (-2.4d+186)) .or. (.not. (y <= 4.8d+43))) then
        tmp = t * (y / a)
    else
        tmp = t + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -2.4e+186) || !(y <= 4.8e+43)) {
		tmp = t * (y / a);
	} else {
		tmp = t + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (y <= -2.4e+186) or not (y <= 4.8e+43):
		tmp = t * (y / a)
	else:
		tmp = t + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((y <= -2.4e+186) || !(y <= 4.8e+43))
		tmp = Float64(t * Float64(y / a));
	else
		tmp = Float64(t + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((y <= -2.4e+186) || ~((y <= 4.8e+43)))
		tmp = t * (y / a);
	else
		tmp = t + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.4e+186], N[Not[LessEqual[y, 4.8e+43]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+186} \lor \neg \left(y \leq 4.8 \cdot 10^{+43}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\

\mathbf{else}:\\
\;\;\;\;t + x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.39999999999999995e186 or 4.80000000000000046e43 < y

    1. Initial program 73.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative73.3%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/93.4%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def93.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified93.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in t around inf 50.3%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    5. Step-by-step derivation
      1. div-sub50.3%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    6. Simplified50.3%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Taylor expanded in z around 0 26.8%

      \[\leadsto t \cdot \color{blue}{\frac{y}{a}} \]

    if -2.39999999999999995e186 < y < 4.80000000000000046e43

    1. Initial program 65.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*76.9%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified76.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Taylor expanded in t around inf 68.0%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    5. Taylor expanded in z around inf 45.6%

      \[\leadsto x + \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{+186} \lor \neg \left(y \leq 4.8 \cdot 10^{+43}\right):\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]

Alternative 25: 39.1% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+184} \lor \neg \left(y \leq 4.8 \cdot 10^{+43}\right):\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= y -8e+184) (not (<= y 4.8e+43))) (* y (/ t a)) (+ t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -8e+184) || !(y <= 4.8e+43)) {
		tmp = y * (t / a);
	} else {
		tmp = t + x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((y <= (-8d+184)) .or. (.not. (y <= 4.8d+43))) then
        tmp = y * (t / a)
    else
        tmp = t + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -8e+184) || !(y <= 4.8e+43)) {
		tmp = y * (t / a);
	} else {
		tmp = t + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (y <= -8e+184) or not (y <= 4.8e+43):
		tmp = y * (t / a)
	else:
		tmp = t + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((y <= -8e+184) || !(y <= 4.8e+43))
		tmp = Float64(y * Float64(t / a));
	else
		tmp = Float64(t + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((y <= -8e+184) || ~((y <= 4.8e+43)))
		tmp = y * (t / a);
	else
		tmp = t + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -8e+184], N[Not[LessEqual[y, 4.8e+43]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+184} \lor \neg \left(y \leq 4.8 \cdot 10^{+43}\right):\\
\;\;\;\;y \cdot \frac{t}{a}\\

\mathbf{else}:\\
\;\;\;\;t + x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.00000000000000014e184 or 4.80000000000000046e43 < y

    1. Initial program 73.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative73.3%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/93.4%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def93.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified93.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in y around inf 85.7%

      \[\leadsto \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y} \]
    5. Step-by-step derivation
      1. div-sub85.7%

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative85.7%

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Simplified85.7%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    7. Taylor expanded in t around inf 47.5%

      \[\leadsto y \cdot \color{blue}{\frac{t}{a - z}} \]
    8. Taylor expanded in a around inf 26.9%

      \[\leadsto y \cdot \color{blue}{\frac{t}{a}} \]

    if -8.00000000000000014e184 < y < 4.80000000000000046e43

    1. Initial program 65.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*76.9%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified76.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Taylor expanded in t around inf 68.0%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    5. Taylor expanded in z around inf 45.6%

      \[\leadsto x + \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+184} \lor \neg \left(y \leq 4.8 \cdot 10^{+43}\right):\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]

Alternative 26: 39.3% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.7 \cdot 10^{+184}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+43}:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -4.7e+184) (* y (/ t a)) (if (<= y 5.2e+43) (+ t x) (* x (/ y z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -4.7e+184) {
		tmp = y * (t / a);
	} else if (y <= 5.2e+43) {
		tmp = t + x;
	} else {
		tmp = x * (y / 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 (y <= (-4.7d+184)) then
        tmp = y * (t / a)
    else if (y <= 5.2d+43) then
        tmp = t + x
    else
        tmp = x * (y / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -4.7e+184) {
		tmp = y * (t / a);
	} else if (y <= 5.2e+43) {
		tmp = t + x;
	} else {
		tmp = x * (y / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -4.7e+184:
		tmp = y * (t / a)
	elif y <= 5.2e+43:
		tmp = t + x
	else:
		tmp = x * (y / z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -4.7e+184)
		tmp = Float64(y * Float64(t / a));
	elseif (y <= 5.2e+43)
		tmp = Float64(t + x);
	else
		tmp = Float64(x * Float64(y / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -4.7e+184)
		tmp = y * (t / a);
	elseif (y <= 5.2e+43)
		tmp = t + x;
	else
		tmp = x * (y / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4.7e+184], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+43], N[(t + x), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.7 \cdot 10^{+184}:\\
\;\;\;\;y \cdot \frac{t}{a}\\

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+43}:\\
\;\;\;\;t + x\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.7000000000000003e184

    1. Initial program 69.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative69.6%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/89.6%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def89.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified89.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in y around inf 88.4%

      \[\leadsto \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y} \]
    5. Step-by-step derivation
      1. div-sub88.4%

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative88.4%

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Simplified88.4%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    7. Taylor expanded in t around inf 46.8%

      \[\leadsto y \cdot \color{blue}{\frac{t}{a - z}} \]
    8. Taylor expanded in a around inf 33.9%

      \[\leadsto y \cdot \color{blue}{\frac{t}{a}} \]

    if -4.7000000000000003e184 < y < 5.20000000000000042e43

    1. Initial program 65.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*76.9%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    3. Simplified76.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
    4. Taylor expanded in t around inf 68.0%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
    5. Taylor expanded in z around inf 45.6%

      \[\leadsto x + \color{blue}{t} \]

    if 5.20000000000000042e43 < y

    1. Initial program 75.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative75.3%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/95.5%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def95.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified95.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 51.7%

      \[\leadsto \color{blue}{\frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z} + t} \]
    5. Step-by-step derivation
      1. +-commutative51.7%

        \[\leadsto \color{blue}{t + \frac{\left(-1 \cdot y - -1 \cdot a\right) \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*61.1%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot y - -1 \cdot a}{\frac{z}{t - x}}} \]
      3. distribute-lft-out--61.1%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y - a\right)}}{\frac{z}{t - x}} \]
      4. mul-1-neg61.1%

        \[\leadsto t + \frac{\color{blue}{-\left(y - a\right)}}{\frac{z}{t - x}} \]
      5. distribute-neg-frac61.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y - a}{\frac{z}{t - x}}\right)} \]
      6. associate-/l*51.7%

        \[\leadsto t + \left(-\color{blue}{\frac{\left(y - a\right) \cdot \left(t - x\right)}{z}}\right) \]
      7. *-commutative51.7%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      8. distribute-rgt-out--51.5%

        \[\leadsto t + \left(-\frac{\color{blue}{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}}{z}\right) \]
      9. unsub-neg51.5%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      10. distribute-rgt-out--51.7%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      11. *-commutative51.7%

        \[\leadsto t - \frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      12. associate-/l*61.1%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    6. Simplified61.1%

      \[\leadsto \color{blue}{t - \frac{y - a}{\frac{z}{t - x}}} \]
    7. Taylor expanded in t around 0 31.6%

      \[\leadsto t - \frac{y - a}{\color{blue}{-1 \cdot \frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-*r/31.6%

        \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-1 \cdot z}{x}}} \]
      2. neg-mul-131.6%

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    9. Simplified31.6%

      \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-z}{x}}} \]
    10. Taylor expanded in y around inf 24.3%

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
    11. Step-by-step derivation
      1. associate-*l/37.3%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    12. Simplified37.3%

      \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification42.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.7 \cdot 10^{+184}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+43}:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]

Alternative 27: 39.3% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+65}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{+112}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.85e+65) t (if (<= z 1.52e+112) x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.85e+65) {
		tmp = t;
	} else if (z <= 1.52e+112) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1.85d+65)) then
        tmp = t
    else if (z <= 1.52d+112) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.85e+65) {
		tmp = t;
	} else if (z <= 1.52e+112) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.85e+65:
		tmp = t
	elif z <= 1.52e+112:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.85e+65)
		tmp = t;
	elseif (z <= 1.52e+112)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.85e+65)
		tmp = t;
	elseif (z <= 1.52e+112)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.85e+65], t, If[LessEqual[z, 1.52e+112], x, t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+65}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 1.52 \cdot 10^{+112}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.84999999999999997e65 or 1.5199999999999999e112 < z

    1. Initial program 36.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative36.9%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/69.9%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def70.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified70.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around inf 42.3%

      \[\leadsto \color{blue}{t} \]

    if -1.84999999999999997e65 < z < 1.5199999999999999e112

    1. Initial program 86.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative86.3%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. associate-*l/95.2%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
      3. fma-def95.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    3. Simplified95.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in a around inf 35.6%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+65}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{+112}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 28: 34.6% accurate, 4.3× speedup?

\[\begin{array}{l} \\ t + x \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ t x))
double code(double x, double y, double z, double t, double a) {
	return t + 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 = t + x
end function
public static double code(double x, double y, double z, double t, double a) {
	return t + x;
}
def code(x, y, z, t, a):
	return t + x
function code(x, y, z, t, a)
	return Float64(t + x)
end
function tmp = code(x, y, z, t, a)
	tmp = t + x;
end
code[x_, y_, z_, t_, a_] := N[(t + x), $MachinePrecision]
\begin{array}{l}

\\
t + x
\end{array}
Derivation
  1. Initial program 67.6%

    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
  2. Step-by-step derivation
    1. associate-/l*81.9%

      \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
  3. Simplified81.9%

    \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t - x}}} \]
  4. Taylor expanded in t around inf 65.4%

    \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a - z}{t}}} \]
  5. Taylor expanded in z around inf 35.9%

    \[\leadsto x + \color{blue}{t} \]
  6. Final simplification35.9%

    \[\leadsto t + x \]

Alternative 29: 25.4% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return 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 = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 67.6%

    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
  2. Step-by-step derivation
    1. +-commutative67.6%

      \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
    2. associate-*l/85.6%

      \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} + x \]
    3. fma-def85.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
  3. Simplified85.7%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
  4. Taylor expanded in z around inf 21.8%

    \[\leadsto \color{blue}{t} \]
  5. Final simplification21.8%

    \[\leadsto t \]

Developer target: 84.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- t (* (/ y z) (- t x)))))
   (if (< z -1.2536131056095036e+188)
     t_1
     (if (< z 4.446702369113811e+64)
       (+ x (/ (- y z) (/ (- a z) (- t x))))
       t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - 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 = t - ((y / z) * (t - x))
    if (z < (-1.2536131056095036d+188)) then
        tmp = t_1
    else if (z < 4.446702369113811d+64) then
        tmp = x + ((y - z) / ((a - z) / (t - 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 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t - ((y / z) * (t - x))
	tmp = 0
	if z < -1.2536131056095036e+188:
		tmp = t_1
	elif z < 4.446702369113811e+64:
		tmp = x + ((y - z) / ((a - z) / (t - x)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x)))
	tmp = 0.0
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t - ((y / z) * (t - x));
	tmp = 0.0;
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023171 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

  (+ x (/ (* (- y z) (- t x)) (- a z))))