Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F

Percentage Accurate: 93.3% → 97.6%
Time: 10.4s
Alternatives: 14
Speedup: 1.0×

Specification

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

\\
x - \frac{y \cdot \left(z - t\right)}{a}
\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 14 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: 93.3% accurate, 1.0× speedup?

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

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

Alternative 1: 97.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{-25}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.5000000000000002e-25

    1. Initial program 87.2%

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

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

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

    if -3.5000000000000002e-25 < a

    1. Initial program 94.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{-25}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - z}{\frac{a}{y}}\\ \end{array} \]

Alternative 2: 51.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a}\\ t_2 := z \cdot \frac{y}{-a}\\ \mathbf{if}\;a \leq -2.45 \cdot 10^{-24}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-208}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-256}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-7}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+40}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y a))) (t_2 (* z (/ y (- a)))))
   (if (<= a -2.45e-24)
     x
     (if (<= a -1.45e-208)
       t_2
       (if (<= a -3e-256)
         t_1
         (if (<= a 4.5e-7) t_2 (if (<= a 2.4e+40) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double t_2 = z * (y / -a);
	double tmp;
	if (a <= -2.45e-24) {
		tmp = x;
	} else if (a <= -1.45e-208) {
		tmp = t_2;
	} else if (a <= -3e-256) {
		tmp = t_1;
	} else if (a <= 4.5e-7) {
		tmp = t_2;
	} else if (a <= 2.4e+40) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * (y / a)
    t_2 = z * (y / -a)
    if (a <= (-2.45d-24)) then
        tmp = x
    else if (a <= (-1.45d-208)) then
        tmp = t_2
    else if (a <= (-3d-256)) then
        tmp = t_1
    else if (a <= 4.5d-7) then
        tmp = t_2
    else if (a <= 2.4d+40) then
        tmp = t_1
    else
        tmp = 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 / a);
	double t_2 = z * (y / -a);
	double tmp;
	if (a <= -2.45e-24) {
		tmp = x;
	} else if (a <= -1.45e-208) {
		tmp = t_2;
	} else if (a <= -3e-256) {
		tmp = t_1;
	} else if (a <= 4.5e-7) {
		tmp = t_2;
	} else if (a <= 2.4e+40) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / a)
	t_2 = z * (y / -a)
	tmp = 0
	if a <= -2.45e-24:
		tmp = x
	elif a <= -1.45e-208:
		tmp = t_2
	elif a <= -3e-256:
		tmp = t_1
	elif a <= 4.5e-7:
		tmp = t_2
	elif a <= 2.4e+40:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / a))
	t_2 = Float64(z * Float64(y / Float64(-a)))
	tmp = 0.0
	if (a <= -2.45e-24)
		tmp = x;
	elseif (a <= -1.45e-208)
		tmp = t_2;
	elseif (a <= -3e-256)
		tmp = t_1;
	elseif (a <= 4.5e-7)
		tmp = t_2;
	elseif (a <= 2.4e+40)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / a);
	t_2 = z * (y / -a);
	tmp = 0.0;
	if (a <= -2.45e-24)
		tmp = x;
	elseif (a <= -1.45e-208)
		tmp = t_2;
	elseif (a <= -3e-256)
		tmp = t_1;
	elseif (a <= 4.5e-7)
		tmp = t_2;
	elseif (a <= 2.4e+40)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.45e-24], x, If[LessEqual[a, -1.45e-208], t$95$2, If[LessEqual[a, -3e-256], t$95$1, If[LessEqual[a, 4.5e-7], t$95$2, If[LessEqual[a, 2.4e+40], t$95$1, x]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.45 \cdot 10^{-208}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -3 \cdot 10^{-256}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-7}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 2.4 \cdot 10^{+40}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.45e-24 or 2.4e40 < a

    1. Initial program 86.2%

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

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

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

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

    if -2.45e-24 < a < -1.45e-208 or -2.9999999999999998e-256 < a < 4.4999999999999998e-7

    1. Initial program 97.2%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{z \cdot \frac{y}{a}} \]
      4. distribute-rgt-neg-in55.7%

        \[\leadsto \color{blue}{z \cdot \left(-\frac{y}{a}\right)} \]
      5. *-lft-identity55.7%

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

        \[\leadsto z \cdot \left(-\color{blue}{\frac{1}{a} \cdot y}\right) \]
      7. remove-double-neg55.7%

        \[\leadsto z \cdot \left(-\frac{1}{a} \cdot \color{blue}{\left(-\left(-y\right)\right)}\right) \]
      8. neg-mul-155.7%

        \[\leadsto z \cdot \left(-\frac{1}{a} \cdot \color{blue}{\left(-1 \cdot \left(-y\right)\right)}\right) \]
      9. associate-*r*55.7%

        \[\leadsto z \cdot \left(-\color{blue}{\left(\frac{1}{a} \cdot -1\right) \cdot \left(-y\right)}\right) \]
      10. *-commutative55.7%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-1 \cdot \frac{1}{a}\right)} \cdot \left(-y\right)\right) \]
      11. neg-mul-155.7%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-\frac{1}{a}\right)} \cdot \left(-y\right)\right) \]
      12. *-commutative55.7%

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

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \color{blue}{\frac{-1}{a}}\right) \]
      14. metadata-eval55.7%

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \frac{\color{blue}{-1}}{a}\right) \]
      15. metadata-eval55.7%

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

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \color{blue}{\frac{1}{-1 \cdot a}}\right) \]
      17. neg-mul-155.7%

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

        \[\leadsto z \cdot \left(-\color{blue}{\frac{\left(-y\right) \cdot 1}{-a}}\right) \]
      19. *-rgt-identity55.7%

        \[\leadsto z \cdot \left(-\frac{\color{blue}{-y}}{-a}\right) \]
      20. distribute-frac-neg55.7%

        \[\leadsto z \cdot \color{blue}{\frac{-\left(-y\right)}{-a}} \]
      21. remove-double-neg55.7%

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

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

    if -1.45e-208 < a < -2.9999999999999998e-256 or 4.4999999999999998e-7 < a < 2.4e40

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.45 \cdot 10^{-24}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-208}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-256}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-7}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+40}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 51.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -8.8 \cdot 10^{-15}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -9.2 \cdot 10^{-207}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\

\mathbf{elif}\;a \leq -1.55 \cdot 10^{-253}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 6 \cdot 10^{+32}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -8.79999999999999942e-15 or 6e32 < a

    1. Initial program 86.2%

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

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

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

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

    if -8.79999999999999942e-15 < a < -9.2000000000000002e-207

    1. Initial program 99.7%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{a} \cdot z} \]
      3. *-commutative53.4%

        \[\leadsto -\color{blue}{z \cdot \frac{y}{a}} \]
      4. distribute-rgt-neg-in53.4%

        \[\leadsto \color{blue}{z \cdot \left(-\frac{y}{a}\right)} \]
      5. *-lft-identity53.4%

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

        \[\leadsto z \cdot \left(-\color{blue}{\frac{1}{a} \cdot y}\right) \]
      7. remove-double-neg53.4%

        \[\leadsto z \cdot \left(-\frac{1}{a} \cdot \color{blue}{\left(-\left(-y\right)\right)}\right) \]
      8. neg-mul-153.4%

        \[\leadsto z \cdot \left(-\frac{1}{a} \cdot \color{blue}{\left(-1 \cdot \left(-y\right)\right)}\right) \]
      9. associate-*r*53.4%

        \[\leadsto z \cdot \left(-\color{blue}{\left(\frac{1}{a} \cdot -1\right) \cdot \left(-y\right)}\right) \]
      10. *-commutative53.4%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-1 \cdot \frac{1}{a}\right)} \cdot \left(-y\right)\right) \]
      11. neg-mul-153.4%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-\frac{1}{a}\right)} \cdot \left(-y\right)\right) \]
      12. *-commutative53.4%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-y\right) \cdot \left(-\frac{1}{a}\right)}\right) \]
      13. distribute-neg-frac53.4%

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \color{blue}{\frac{-1}{a}}\right) \]
      14. metadata-eval53.4%

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \frac{\color{blue}{-1}}{a}\right) \]
      15. metadata-eval53.4%

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

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \color{blue}{\frac{1}{-1 \cdot a}}\right) \]
      17. neg-mul-153.4%

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

        \[\leadsto z \cdot \left(-\color{blue}{\frac{\left(-y\right) \cdot 1}{-a}}\right) \]
      19. *-rgt-identity53.4%

        \[\leadsto z \cdot \left(-\frac{\color{blue}{-y}}{-a}\right) \]
      20. distribute-frac-neg53.4%

        \[\leadsto z \cdot \color{blue}{\frac{-\left(-y\right)}{-a}} \]
      21. remove-double-neg53.4%

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

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

        \[\leadsto \color{blue}{\frac{z \cdot y}{-a}} \]
      2. add-sqr-sqrt55.5%

        \[\leadsto \frac{z \cdot y}{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}} \]
      3. sqrt-unprod47.0%

        \[\leadsto \frac{z \cdot y}{\color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}} \]
      4. sqr-neg47.0%

        \[\leadsto \frac{z \cdot y}{\sqrt{\color{blue}{a \cdot a}}} \]
      5. sqrt-unprod0.0%

        \[\leadsto \frac{z \cdot y}{\color{blue}{\sqrt{a} \cdot \sqrt{a}}} \]
      6. add-sqr-sqrt1.3%

        \[\leadsto \frac{z \cdot y}{\color{blue}{a}} \]
      7. associate-/l*1.3%

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

        \[\leadsto \color{blue}{\frac{-z}{-\frac{a}{y}}} \]
      9. distribute-frac-neg1.3%

        \[\leadsto \frac{-z}{\color{blue}{\frac{-a}{y}}} \]
      10. add-sqr-sqrt1.3%

        \[\leadsto \frac{-z}{\frac{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}}{y}} \]
      11. sqrt-unprod1.2%

        \[\leadsto \frac{-z}{\frac{\color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}}{y}} \]
      12. sqr-neg1.2%

        \[\leadsto \frac{-z}{\frac{\sqrt{\color{blue}{a \cdot a}}}{y}} \]
      13. sqrt-unprod0.0%

        \[\leadsto \frac{-z}{\frac{\color{blue}{\sqrt{a} \cdot \sqrt{a}}}{y}} \]
      14. add-sqr-sqrt54.4%

        \[\leadsto \frac{-z}{\frac{\color{blue}{a}}{y}} \]
    8. Applied egg-rr54.4%

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

    if -9.2000000000000002e-207 < a < -1.54999999999999998e-253 or 1.00000000000000008e-5 < a < 6e32

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

    if -1.54999999999999998e-253 < a < 1.00000000000000008e-5

    1. Initial program 95.9%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg55.2%

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

        \[\leadsto -\color{blue}{\frac{y}{a} \cdot z} \]
      3. *-commutative56.9%

        \[\leadsto -\color{blue}{z \cdot \frac{y}{a}} \]
      4. distribute-rgt-neg-in56.9%

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

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

        \[\leadsto z \cdot \left(-\color{blue}{\frac{1}{a} \cdot y}\right) \]
      7. remove-double-neg56.8%

        \[\leadsto z \cdot \left(-\frac{1}{a} \cdot \color{blue}{\left(-\left(-y\right)\right)}\right) \]
      8. neg-mul-156.8%

        \[\leadsto z \cdot \left(-\frac{1}{a} \cdot \color{blue}{\left(-1 \cdot \left(-y\right)\right)}\right) \]
      9. associate-*r*56.8%

        \[\leadsto z \cdot \left(-\color{blue}{\left(\frac{1}{a} \cdot -1\right) \cdot \left(-y\right)}\right) \]
      10. *-commutative56.8%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-1 \cdot \frac{1}{a}\right)} \cdot \left(-y\right)\right) \]
      11. neg-mul-156.8%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-\frac{1}{a}\right)} \cdot \left(-y\right)\right) \]
      12. *-commutative56.8%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-y\right) \cdot \left(-\frac{1}{a}\right)}\right) \]
      13. distribute-neg-frac56.8%

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \color{blue}{\frac{-1}{a}}\right) \]
      14. metadata-eval56.8%

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \frac{\color{blue}{-1}}{a}\right) \]
      15. metadata-eval56.8%

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

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \color{blue}{\frac{1}{-1 \cdot a}}\right) \]
      17. neg-mul-156.8%

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

        \[\leadsto z \cdot \left(-\color{blue}{\frac{\left(-y\right) \cdot 1}{-a}}\right) \]
      19. *-rgt-identity56.9%

        \[\leadsto z \cdot \left(-\frac{\color{blue}{-y}}{-a}\right) \]
      20. distribute-frac-neg56.9%

        \[\leadsto z \cdot \color{blue}{\frac{-\left(-y\right)}{-a}} \]
      21. remove-double-neg56.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.8 \cdot 10^{-15}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{-207}:\\ \;\;\;\;\frac{-z}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-253}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 10^{-5}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+32}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 51.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -1.1 \cdot 10^{-14}:\\
\;\;\;\;x\\

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

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

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

\mathbf{elif}\;a \leq 7 \cdot 10^{+31}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.1e-14 or 7e31 < a

    1. Initial program 86.2%

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

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

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

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

    if -1.1e-14 < a < -9.8000000000000007e-209

    1. Initial program 99.7%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{a} \cdot z} \]
      3. *-commutative53.4%

        \[\leadsto -\color{blue}{z \cdot \frac{y}{a}} \]
      4. distribute-rgt-neg-in53.4%

        \[\leadsto \color{blue}{z \cdot \left(-\frac{y}{a}\right)} \]
      5. *-lft-identity53.4%

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

        \[\leadsto z \cdot \left(-\color{blue}{\frac{1}{a} \cdot y}\right) \]
      7. remove-double-neg53.4%

        \[\leadsto z \cdot \left(-\frac{1}{a} \cdot \color{blue}{\left(-\left(-y\right)\right)}\right) \]
      8. neg-mul-153.4%

        \[\leadsto z \cdot \left(-\frac{1}{a} \cdot \color{blue}{\left(-1 \cdot \left(-y\right)\right)}\right) \]
      9. associate-*r*53.4%

        \[\leadsto z \cdot \left(-\color{blue}{\left(\frac{1}{a} \cdot -1\right) \cdot \left(-y\right)}\right) \]
      10. *-commutative53.4%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-1 \cdot \frac{1}{a}\right)} \cdot \left(-y\right)\right) \]
      11. neg-mul-153.4%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-\frac{1}{a}\right)} \cdot \left(-y\right)\right) \]
      12. *-commutative53.4%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-y\right) \cdot \left(-\frac{1}{a}\right)}\right) \]
      13. distribute-neg-frac53.4%

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \color{blue}{\frac{-1}{a}}\right) \]
      14. metadata-eval53.4%

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \frac{\color{blue}{-1}}{a}\right) \]
      15. metadata-eval53.4%

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

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \color{blue}{\frac{1}{-1 \cdot a}}\right) \]
      17. neg-mul-153.4%

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

        \[\leadsto z \cdot \left(-\color{blue}{\frac{\left(-y\right) \cdot 1}{-a}}\right) \]
      19. *-rgt-identity53.4%

        \[\leadsto z \cdot \left(-\frac{\color{blue}{-y}}{-a}\right) \]
      20. distribute-frac-neg53.4%

        \[\leadsto z \cdot \color{blue}{\frac{-\left(-y\right)}{-a}} \]
      21. remove-double-neg53.4%

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

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

        \[\leadsto \color{blue}{\frac{z \cdot y}{-a}} \]
      2. add-sqr-sqrt55.5%

        \[\leadsto \frac{z \cdot y}{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}} \]
      3. sqrt-unprod47.0%

        \[\leadsto \frac{z \cdot y}{\color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}} \]
      4. sqr-neg47.0%

        \[\leadsto \frac{z \cdot y}{\sqrt{\color{blue}{a \cdot a}}} \]
      5. sqrt-unprod0.0%

        \[\leadsto \frac{z \cdot y}{\color{blue}{\sqrt{a} \cdot \sqrt{a}}} \]
      6. add-sqr-sqrt1.3%

        \[\leadsto \frac{z \cdot y}{\color{blue}{a}} \]
      7. associate-*l/1.3%

        \[\leadsto \color{blue}{\frac{z}{a} \cdot y} \]
      8. frac-2neg1.3%

        \[\leadsto \color{blue}{\frac{-z}{-a}} \cdot y \]
      9. associate-*l/1.3%

        \[\leadsto \color{blue}{\frac{\left(-z\right) \cdot y}{-a}} \]
      10. add-sqr-sqrt1.3%

        \[\leadsto \frac{\left(-z\right) \cdot y}{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}} \]
      11. sqrt-unprod1.2%

        \[\leadsto \frac{\left(-z\right) \cdot y}{\color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}} \]
      12. sqr-neg1.2%

        \[\leadsto \frac{\left(-z\right) \cdot y}{\sqrt{\color{blue}{a \cdot a}}} \]
      13. sqrt-unprod0.0%

        \[\leadsto \frac{\left(-z\right) \cdot y}{\color{blue}{\sqrt{a} \cdot \sqrt{a}}} \]
      14. add-sqr-sqrt55.7%

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

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

    if -9.8000000000000007e-209 < a < -1.79999999999999989e-258 or 1.34999999999999999e-6 < a < 7e31

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

    if -1.79999999999999989e-258 < a < 1.34999999999999999e-6

    1. Initial program 95.9%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg55.2%

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

        \[\leadsto -\color{blue}{\frac{y}{a} \cdot z} \]
      3. *-commutative56.9%

        \[\leadsto -\color{blue}{z \cdot \frac{y}{a}} \]
      4. distribute-rgt-neg-in56.9%

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

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

        \[\leadsto z \cdot \left(-\color{blue}{\frac{1}{a} \cdot y}\right) \]
      7. remove-double-neg56.8%

        \[\leadsto z \cdot \left(-\frac{1}{a} \cdot \color{blue}{\left(-\left(-y\right)\right)}\right) \]
      8. neg-mul-156.8%

        \[\leadsto z \cdot \left(-\frac{1}{a} \cdot \color{blue}{\left(-1 \cdot \left(-y\right)\right)}\right) \]
      9. associate-*r*56.8%

        \[\leadsto z \cdot \left(-\color{blue}{\left(\frac{1}{a} \cdot -1\right) \cdot \left(-y\right)}\right) \]
      10. *-commutative56.8%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-1 \cdot \frac{1}{a}\right)} \cdot \left(-y\right)\right) \]
      11. neg-mul-156.8%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-\frac{1}{a}\right)} \cdot \left(-y\right)\right) \]
      12. *-commutative56.8%

        \[\leadsto z \cdot \left(-\color{blue}{\left(-y\right) \cdot \left(-\frac{1}{a}\right)}\right) \]
      13. distribute-neg-frac56.8%

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \color{blue}{\frac{-1}{a}}\right) \]
      14. metadata-eval56.8%

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \frac{\color{blue}{-1}}{a}\right) \]
      15. metadata-eval56.8%

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

        \[\leadsto z \cdot \left(-\left(-y\right) \cdot \color{blue}{\frac{1}{-1 \cdot a}}\right) \]
      17. neg-mul-156.8%

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

        \[\leadsto z \cdot \left(-\color{blue}{\frac{\left(-y\right) \cdot 1}{-a}}\right) \]
      19. *-rgt-identity56.9%

        \[\leadsto z \cdot \left(-\frac{\color{blue}{-y}}{-a}\right) \]
      20. distribute-frac-neg56.9%

        \[\leadsto z \cdot \color{blue}{\frac{-\left(-y\right)}{-a}} \]
      21. remove-double-neg56.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{-14}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9.8 \cdot 10^{-209}:\\ \;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-258}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-6}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+31}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 5: 67.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -5.8 \cdot 10^{+150} \lor \neg \left(a \leq -1.95 \cdot 10^{-7}\right) \land a \leq 1.95 \cdot 10^{+40}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.4499999999999999e184 or -5.80000000000000022e150 < a < -1.95000000000000012e-7 or 1.95e40 < a

    1. Initial program 87.8%

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

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

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

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

    if -1.4499999999999999e184 < a < -5.80000000000000022e150 or -1.95000000000000012e-7 < a < 1.95e40

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \left(-\frac{z - t}{a}\right)} \]
      4. neg-sub073.2%

        \[\leadsto y \cdot \color{blue}{\left(0 - \frac{z - t}{a}\right)} \]
      5. div-sub70.6%

        \[\leadsto y \cdot \left(0 - \color{blue}{\left(\frac{z}{a} - \frac{t}{a}\right)}\right) \]
      6. associate--r-70.6%

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

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

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

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

        \[\leadsto y \cdot \left(\frac{t}{a} + \color{blue}{\left(-\frac{z}{a}\right)}\right) \]
      11. sub-neg70.6%

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

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

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

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

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

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

        \[\leadsto \frac{y}{a} \cdot t - \color{blue}{\frac{z \cdot y}{a}} \]
      18. *-commutative68.3%

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

        \[\leadsto \frac{y}{a} \cdot t - \color{blue}{\frac{y}{a} \cdot z} \]
      20. distribute-lft-out--82.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{+184}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{+150} \lor \neg \left(a \leq -1.95 \cdot 10^{-7}\right) \land a \leq 1.95 \cdot 10^{+40}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 6: 81.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 1.9 \cdot 10^{-108}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 4.4 \cdot 10^{+70}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.0999999999999999e95 or 4.40000000000000001e70 < t

    1. Initial program 89.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv84.7%

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

        \[\leadsto x + \color{blue}{1} \cdot \frac{t \cdot y}{a} \]
      3. associate-*l/85.2%

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a}} \]
      6. *-commutative85.2%

        \[\leadsto x + \color{blue}{\frac{t}{a} \cdot y} \]
      7. associate-*l/84.7%

        \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
      8. associate-*r/87.8%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified87.8%

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

    if -1.0999999999999999e95 < t < 1.89999999999999987e-108 or 1.60000000000000014e26 < t < 4.40000000000000001e70

    1. Initial program 94.6%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z}{\frac{a}{y}}} \]
      3. associate-/r/88.1%

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

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

    if 1.89999999999999987e-108 < t < 1.60000000000000014e26

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(0 - \frac{z - t}{a}\right)} \]
      5. div-sub69.7%

        \[\leadsto y \cdot \left(0 - \color{blue}{\left(\frac{z}{a} - \frac{t}{a}\right)}\right) \]
      6. associate--r-69.7%

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a} + \frac{-z}{a}\right)} \]
      10. distribute-frac-neg69.7%

        \[\leadsto y \cdot \left(\frac{t}{a} + \color{blue}{\left(-\frac{z}{a}\right)}\right) \]
      11. sub-neg69.7%

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} - \frac{z}{\frac{a}{y}} \]
      16. *-commutative69.3%

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

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

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

        \[\leadsto \frac{y}{a} \cdot t - \color{blue}{\frac{y}{a} \cdot z} \]
      20. distribute-lft-out--78.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{+95}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-108}:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+26}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+70}:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]

Alternative 7: 49.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{-46}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.4 \cdot 10^{-203} \lor \neg \left(a \leq 1.75 \cdot 10^{-144}\right) \land a \leq 8.6 \cdot 10^{+34}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.49999999999999996e-46 or 1.40000000000000011e-203 < a < 1.7499999999999999e-144 or 8.59999999999999988e34 < a

    1. Initial program 87.9%

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

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

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

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

    if -2.49999999999999996e-46 < a < 1.40000000000000011e-203 or 1.7499999999999999e-144 < a < 8.59999999999999988e34

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{-46}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-203} \lor \neg \left(a \leq 1.75 \cdot 10^{-144}\right) \land a \leq 8.6 \cdot 10^{+34}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8: 50.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -9.2 \cdot 10^{-260}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 0.000112:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\

\mathbf{elif}\;a \leq 1.7 \cdot 10^{+32}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.4999999999999999e-37 or 1.69999999999999989e32 < a

    1. Initial program 86.9%

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

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

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

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

    if -2.4999999999999999e-37 < a < -9.2e-260 or 1.11999999999999998e-4 < a < 1.69999999999999989e32

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

    if -9.2e-260 < a < 1.11999999999999998e-4

    1. Initial program 95.9%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg55.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{-37}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{-260}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 0.000112:\\ \;\;\;\;\frac{-y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+32}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 77.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.15 \cdot 10^{-8} \lor \neg \left(a \leq 3.6 \cdot 10^{+29}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.1500000000000001e-8 or 3.59999999999999976e29 < a

    1. Initial program 86.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv76.0%

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

        \[\leadsto x + \color{blue}{1} \cdot \frac{t \cdot y}{a} \]
      3. associate-*l/81.8%

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a}} \]
      6. *-commutative81.8%

        \[\leadsto x + \color{blue}{\frac{t}{a} \cdot y} \]
      7. associate-*l/76.0%

        \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
      8. associate-*r/78.8%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified78.8%

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

    if -2.1500000000000001e-8 < a < 3.59999999999999976e29

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(0 - \color{blue}{\left(\frac{z}{a} - \frac{t}{a}\right)}\right) \]
      6. associate--r-70.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{a} \cdot t - \color{blue}{\frac{z \cdot y}{a}} \]
      18. *-commutative71.1%

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

        \[\leadsto \frac{y}{a} \cdot t - \color{blue}{\frac{y}{a} \cdot z} \]
      20. distribute-lft-out--82.8%

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

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

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

Alternative 10: 77.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.8 \cdot 10^{-9} \lor \neg \left(a \leq 2.8 \cdot 10^{+29}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.79999999999999984e-9 or 2.8e29 < a

    1. Initial program 86.2%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv76.2%

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

        \[\leadsto x + \color{blue}{1} \cdot \frac{t \cdot y}{a} \]
      3. *-lft-identity76.2%

        \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
      4. +-commutative76.2%

        \[\leadsto \color{blue}{\frac{t \cdot y}{a} + x} \]
      5. associate-/l*78.9%

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

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

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

    if -2.79999999999999984e-9 < a < 2.8e29

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(0 - \color{blue}{\left(\frac{z}{a} - \frac{t}{a}\right)}\right) \]
      6. associate--r-70.0%

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a} + \frac{-z}{a}\right)} \]
      10. distribute-frac-neg70.0%

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{a} \cdot t - \color{blue}{\frac{z \cdot y}{a}} \]
      18. *-commutative70.9%

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

        \[\leadsto \frac{y}{a} \cdot t - \color{blue}{\frac{y}{a} \cdot z} \]
      20. distribute-lft-out--82.7%

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

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

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

Alternative 11: 83.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+96} \lor \neg \left(t \leq 5.4 \cdot 10^{+71}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.5e96 or 5.39999999999999993e71 < t

    1. Initial program 89.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv84.7%

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

        \[\leadsto x + \color{blue}{1} \cdot \frac{t \cdot y}{a} \]
      3. associate-*l/85.2%

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a}} \]
      6. *-commutative85.2%

        \[\leadsto x + \color{blue}{\frac{t}{a} \cdot y} \]
      7. associate-*l/84.7%

        \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
      8. associate-*r/87.8%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified87.8%

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

    if -6.5e96 < t < 5.39999999999999993e71

    1. Initial program 94.2%

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

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

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

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

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

Alternative 12: 97.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{-9}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.2e-9

    1. Initial program 86.6%

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

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

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

    if -1.2e-9 < a

    1. Initial program 94.3%

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

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

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

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

Alternative 13: 97.2% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 14: 39.1% accurate, 9.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 92.4%

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification37.3%

    \[\leadsto x \]

Developer target: 99.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x - \frac{1}{\frac{t_1}{y}}\\

\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x - \frac{y \cdot \left(z - t\right)}{a}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{y}{t_1}\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023318 
(FPCore (x y z t a)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
  :precision binary64

  :herbie-target
  (if (< y -1.0761266216389975e-10) (- x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t))))))

  (- x (/ (* y (- z t)) a)))