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

Percentage Accurate: 93.2% → 97.6%
Time: 10.7s
Alternatives: 16
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 16 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.2% 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.1× speedup?

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

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

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


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

    1. Initial program 90.3%

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

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

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

    if -3.99999999999999986e-64 < a

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, -\color{blue}{\left(z + \left(-t\right)\right)}, x\right) \]
      10. distribute-neg-in97.8%

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, \color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}, x\right) \]
      11. remove-double-neg97.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4 \cdot 10^{-64}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - z, x\right)\\ \end{array} \]

Alternative 2: 66.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{-11} \lor \neg \left(y \leq -1.4 \cdot 10^{-92}\right) \land \left(y \leq -6.2 \cdot 10^{-117} \lor \neg \left(y \leq 4.5 \cdot 10^{-195}\right)\right):\\ \;\;\;\;y \cdot \frac{t - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= y -8.5e-11)
         (and (not (<= y -1.4e-92))
              (or (<= y -6.2e-117) (not (<= y 4.5e-195)))))
   (* y (/ (- t z) a))
   x))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -8.5e-11) || (!(y <= -1.4e-92) && ((y <= -6.2e-117) || !(y <= 4.5e-195)))) {
		tmp = y * ((t - z) / 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 ((y <= (-8.5d-11)) .or. (.not. (y <= (-1.4d-92))) .and. (y <= (-6.2d-117)) .or. (.not. (y <= 4.5d-195))) then
        tmp = y * ((t - z) / 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 ((y <= -8.5e-11) || (!(y <= -1.4e-92) && ((y <= -6.2e-117) || !(y <= 4.5e-195)))) {
		tmp = y * ((t - z) / a);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (y <= -8.5e-11) or (not (y <= -1.4e-92) and ((y <= -6.2e-117) or not (y <= 4.5e-195))):
		tmp = y * ((t - z) / a)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((y <= -8.5e-11) || (!(y <= -1.4e-92) && ((y <= -6.2e-117) || !(y <= 4.5e-195))))
		tmp = Float64(y * Float64(Float64(t - z) / a));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((y <= -8.5e-11) || (~((y <= -1.4e-92)) && ((y <= -6.2e-117) || ~((y <= 4.5e-195)))))
		tmp = y * ((t - z) / a);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -8.5e-11], And[N[Not[LessEqual[y, -1.4e-92]], $MachinePrecision], Or[LessEqual[y, -6.2e-117], N[Not[LessEqual[y, 4.5e-195]], $MachinePrecision]]]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-11} \lor \neg \left(y \leq -1.4 \cdot 10^{-92}\right) \land \left(y \leq -6.2 \cdot 10^{-117} \lor \neg \left(y \leq 4.5 \cdot 10^{-195}\right)\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.50000000000000037e-11 or -1.4e-92 < y < -6.20000000000000022e-117 or 4.5e-195 < y

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.50000000000000037e-11 < y < -1.4e-92 or -6.20000000000000022e-117 < y < 4.5e-195

    1. Initial program 97.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{-11} \lor \neg \left(y \leq -1.4 \cdot 10^{-92}\right) \land \left(y \leq -6.2 \cdot 10^{-117} \lor \neg \left(y \leq 4.5 \cdot 10^{-195}\right)\right):\\ \;\;\;\;y \cdot \frac{t - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 67.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - z}{a}\\ \mathbf{if}\;y \leq -1.85 \cdot 10^{-10}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -7.1 \cdot 10^{-99}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{-116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-195}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t z) a))))
   (if (<= y -1.85e-10)
     t_1
     (if (<= y -7.1e-99)
       x
       (if (<= y -1.02e-116)
         t_1
         (if (<= y 4.5e-195) x (* (/ y a) (- t z))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - z) / a);
	double tmp;
	if (y <= -1.85e-10) {
		tmp = t_1;
	} else if (y <= -7.1e-99) {
		tmp = x;
	} else if (y <= -1.02e-116) {
		tmp = t_1;
	} else if (y <= 4.5e-195) {
		tmp = x;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = y * ((t - z) / a)
    if (y <= (-1.85d-10)) then
        tmp = t_1
    else if (y <= (-7.1d-99)) then
        tmp = x
    else if (y <= (-1.02d-116)) then
        tmp = t_1
    else if (y <= 4.5d-195) then
        tmp = x
    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 t_1 = y * ((t - z) / a);
	double tmp;
	if (y <= -1.85e-10) {
		tmp = t_1;
	} else if (y <= -7.1e-99) {
		tmp = x;
	} else if (y <= -1.02e-116) {
		tmp = t_1;
	} else if (y <= 4.5e-195) {
		tmp = x;
	} else {
		tmp = (y / a) * (t - z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - z) / a)
	tmp = 0
	if y <= -1.85e-10:
		tmp = t_1
	elif y <= -7.1e-99:
		tmp = x
	elif y <= -1.02e-116:
		tmp = t_1
	elif y <= 4.5e-195:
		tmp = x
	else:
		tmp = (y / a) * (t - z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - z) / a))
	tmp = 0.0
	if (y <= -1.85e-10)
		tmp = t_1;
	elseif (y <= -7.1e-99)
		tmp = x;
	elseif (y <= -1.02e-116)
		tmp = t_1;
	elseif (y <= 4.5e-195)
		tmp = x;
	else
		tmp = Float64(Float64(y / a) * Float64(t - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - z) / a);
	tmp = 0.0;
	if (y <= -1.85e-10)
		tmp = t_1;
	elseif (y <= -7.1e-99)
		tmp = x;
	elseif (y <= -1.02e-116)
		tmp = t_1;
	elseif (y <= 4.5e-195)
		tmp = x;
	else
		tmp = (y / a) * (t - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.85e-10], t$95$1, If[LessEqual[y, -7.1e-99], x, If[LessEqual[y, -1.02e-116], t$95$1, If[LessEqual[y, 4.5e-195], x, N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -7.1 \cdot 10^{-99}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -1.02 \cdot 10^{-116}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{-195}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.85000000000000007e-10 or -7.09999999999999994e-99 < y < -1.02e-116

    1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.85000000000000007e-10 < y < -7.09999999999999994e-99 or -1.02e-116 < y < 4.5e-195

    1. Initial program 97.9%

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

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

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

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

    if 4.5e-195 < y

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.85 \cdot 10^{-10}:\\ \;\;\;\;y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;y \leq -7.1 \cdot 10^{-99}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{-116}:\\ \;\;\;\;y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-195}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \end{array} \]

Alternative 4: 50.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -6.6 \cdot 10^{+66}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.2 \cdot 10^{+63}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.7e183

    1. Initial program 88.4%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    8. Applied egg-rr62.1%

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

    if -1.7e183 < y < -6.6000000000000003e66 or 1.2e63 < y

    1. Initial program 81.9%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-z \cdot y}}{a} \]
      4. distribute-lft-neg-in49.6%

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

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

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

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

    if -6.6000000000000003e66 < y < -6.40000000000000014e65

    1. Initial program 98.4%

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

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

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

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

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

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

    if -6.40000000000000014e65 < y < 1.2e63

    1. Initial program 98.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+183}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;y \leq -6.6 \cdot 10^{+66}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \mathbf{elif}\;y \leq -6.4 \cdot 10^{+65}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+63}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \end{array} \]

Alternative 5: 49.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+63}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-137}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-42}:\\ \;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{+65}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-z}{\frac{a}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -5.2e+63)
   (* z (/ y (- a)))
   (if (<= y 5.5e-137)
     x
     (if (<= y 4e-42)
       (/ (* y (- z)) a)
       (if (<= y 1.25e+65) x (/ (- z) (/ a y)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -5.2e+63) {
		tmp = z * (y / -a);
	} else if (y <= 5.5e-137) {
		tmp = x;
	} else if (y <= 4e-42) {
		tmp = (y * -z) / a;
	} else if (y <= 1.25e+65) {
		tmp = x;
	} else {
		tmp = -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 (y <= (-5.2d+63)) then
        tmp = z * (y / -a)
    else if (y <= 5.5d-137) then
        tmp = x
    else if (y <= 4d-42) then
        tmp = (y * -z) / a
    else if (y <= 1.25d+65) then
        tmp = x
    else
        tmp = -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 (y <= -5.2e+63) {
		tmp = z * (y / -a);
	} else if (y <= 5.5e-137) {
		tmp = x;
	} else if (y <= 4e-42) {
		tmp = (y * -z) / a;
	} else if (y <= 1.25e+65) {
		tmp = x;
	} else {
		tmp = -z / (a / y);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -5.2e+63:
		tmp = z * (y / -a)
	elif y <= 5.5e-137:
		tmp = x
	elif y <= 4e-42:
		tmp = (y * -z) / a
	elif y <= 1.25e+65:
		tmp = x
	else:
		tmp = -z / (a / y)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -5.2e+63)
		tmp = Float64(z * Float64(y / Float64(-a)));
	elseif (y <= 5.5e-137)
		tmp = x;
	elseif (y <= 4e-42)
		tmp = Float64(Float64(y * Float64(-z)) / a);
	elseif (y <= 1.25e+65)
		tmp = x;
	else
		tmp = Float64(Float64(-z) / Float64(a / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -5.2e+63)
		tmp = z * (y / -a);
	elseif (y <= 5.5e-137)
		tmp = x;
	elseif (y <= 4e-42)
		tmp = (y * -z) / a;
	elseif (y <= 1.25e+65)
		tmp = x;
	else
		tmp = -z / (a / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.2e+63], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e-137], x, If[LessEqual[y, 4e-42], N[(N[(y * (-z)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 1.25e+65], x, N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+63}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\

\mathbf{elif}\;y \leq 5.5 \cdot 10^{-137}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq 1.25 \cdot 10^{+65}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.2000000000000002e63

    1. Initial program 86.2%

      \[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 z around inf 42.2%

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

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

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

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

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

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

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

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

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

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

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

    if -5.2000000000000002e63 < y < 5.5000000000000003e-137 or 4.00000000000000015e-42 < y < 1.24999999999999993e65

    1. Initial program 98.0%

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

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

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

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

    if 5.5000000000000003e-137 < y < 4.00000000000000015e-42

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \frac{y}{-a}} \]
    7. Step-by-step derivation
      1. frac-2neg58.3%

        \[\leadsto z \cdot \color{blue}{\frac{-y}{-\left(-a\right)}} \]
      2. remove-double-neg58.3%

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

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

        \[\leadsto \color{blue}{-z \cdot \frac{y}{a}} \]
      5. distribute-lft-neg-in58.3%

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

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

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

    if 1.24999999999999993e65 < y

    1. Initial program 81.8%

      \[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 z around inf 51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \frac{y}{-a}} \]
    7. Step-by-step derivation
      1. frac-2neg61.9%

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

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

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

        \[\leadsto \color{blue}{-z \cdot \frac{y}{a}} \]
      5. distribute-lft-neg-in61.9%

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

        \[\leadsto \left(-z\right) \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      7. un-div-inv62.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+63}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-137}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-42}:\\ \;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{+65}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-z}{\frac{a}{y}}\\ \end{array} \]

Alternative 6: 74.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+82} \lor \neg \left(y \leq 5.5 \cdot 10^{+60}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.39999999999999998e82 or 5.5000000000000001e60 < y

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.39999999999999998e82 < y < 5.5000000000000001e60

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, -\color{blue}{\left(z + \left(-t\right)\right)}, x\right) \]
      10. distribute-neg-in95.9%

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, \color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}, x\right) \]
      11. remove-double-neg95.9%

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

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

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

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

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

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

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

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

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

Alternative 7: 77.8% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.29999999999999988e82 or 4.7999999999999998e61 < y

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.29999999999999988e82 < y < 4.7999999999999998e61

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, -\color{blue}{\left(z + \left(-t\right)\right)}, x\right) \]
      10. distribute-neg-in95.9%

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, \color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}, x\right) \]
      11. remove-double-neg95.9%

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

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

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

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

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

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

Alternative 8: 86.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{+99} \lor \neg \left(t \leq 2 \cdot 10^{+30}\right):\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -5e+99) (not (<= t 2e+30)))
   (+ x (* t (/ y a)))
   (- x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -5e+99) || !(t <= 2e+30)) {
		tmp = x + (t * (y / a));
	} else {
		tmp = x - (z * (y / 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 <= (-5d+99)) .or. (.not. (t <= 2d+30))) then
        tmp = x + (t * (y / a))
    else
        tmp = x - (z * (y / 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 <= -5e+99) || !(t <= 2e+30)) {
		tmp = x + (t * (y / a));
	} else {
		tmp = x - (z * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -5e+99) or not (t <= 2e+30):
		tmp = x + (t * (y / a))
	else:
		tmp = x - (z * (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -5e+99) || !(t <= 2e+30))
		tmp = Float64(x + Float64(t * Float64(y / a)));
	else
		tmp = Float64(x - Float64(z * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -5e+99) || ~((t <= 2e+30)))
		tmp = x + (t * (y / a));
	else
		tmp = x - (z * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5e+99], N[Not[LessEqual[t, 2e+30]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{+99} \lor \neg \left(t \leq 2 \cdot 10^{+30}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.00000000000000008e99 or 2e30 < t

    1. Initial program 92.2%

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000008e99 < t < 2e30

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

Alternative 9: 79.3% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.00000000000000013e85 < z < 1.39999999999999996e106

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

    if 1.39999999999999996e106 < z

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 97.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -8.8 \cdot 10^{-66}:\\ \;\;\;\;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 -8.8e-66) (- 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 <= -8.8e-66) {
		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 <= (-8.8d-66)) 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 <= -8.8e-66) {
		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 <= -8.8e-66:
		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 <= -8.8e-66)
		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 <= -8.8e-66)
		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, -8.8e-66], 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 -8.8 \cdot 10^{-66}:\\
\;\;\;\;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 < -8.8000000000000004e-66

    1. Initial program 90.3%

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

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

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

    if -8.8000000000000004e-66 < a

    1. Initial program 93.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.1%

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

Alternative 11: 50.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+63} \lor \neg \left(y \leq 5.8 \cdot 10^{+60}\right):\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= y -4.4e+63) (not (<= y 5.8e+60))) (* z (/ y (- a))) x))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -4.4e+63) || !(y <= 5.8e+60)) {
		tmp = z * (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 ((y <= (-4.4d+63)) .or. (.not. (y <= 5.8d+60))) then
        tmp = z * (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 ((y <= -4.4e+63) || !(y <= 5.8e+60)) {
		tmp = z * (y / -a);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (y <= -4.4e+63) or not (y <= 5.8e+60):
		tmp = z * (y / -a)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((y <= -4.4e+63) || !(y <= 5.8e+60))
		tmp = Float64(z * Float64(y / Float64(-a)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((y <= -4.4e+63) || ~((y <= 5.8e+60)))
		tmp = z * (y / -a);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -4.4e+63], N[Not[LessEqual[y, 5.8e+60]], $MachinePrecision]], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+63} \lor \neg \left(y \leq 5.8 \cdot 10^{+60}\right):\\
\;\;\;\;z \cdot \frac{y}{-a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.3999999999999997e63 or 5.79999999999999999e60 < y

    1. Initial program 84.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.3999999999999997e63 < y < 5.79999999999999999e60

    1. Initial program 98.2%

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

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

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

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

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

Alternative 12: 50.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+63}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\

\mathbf{elif}\;y \leq 5.5 \cdot 10^{+61}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.7999999999999999e63

    1. Initial program 86.2%

      \[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 z around inf 42.2%

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

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

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

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

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

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

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

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

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

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

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

    if -5.7999999999999999e63 < y < 5.50000000000000036e61

    1. Initial program 98.2%

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

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

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

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

    if 5.50000000000000036e61 < y

    1. Initial program 81.8%

      \[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 z around inf 51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \frac{y}{-a}} \]
    7. Step-by-step derivation
      1. frac-2neg61.9%

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

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

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

        \[\leadsto \color{blue}{-z \cdot \frac{y}{a}} \]
      5. distribute-lft-neg-in61.9%

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

        \[\leadsto \left(-z\right) \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      7. un-div-inv62.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{+63}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{+61}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-z}{\frac{a}{y}}\\ \end{array} \]

Alternative 13: 49.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+93} \lor \neg \left(y \leq 4.6 \cdot 10^{+95}\right):\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= y -7.5e+93) (not (<= y 4.6e+95))) (* t (/ y a)) x))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -7.5e+93) || !(y <= 4.6e+95)) {
		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 ((y <= (-7.5d+93)) .or. (.not. (y <= 4.6d+95))) 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 ((y <= -7.5e+93) || !(y <= 4.6e+95)) {
		tmp = t * (y / a);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (y <= -7.5e+93) or not (y <= 4.6e+95):
		tmp = t * (y / a)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((y <= -7.5e+93) || !(y <= 4.6e+95))
		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 ((y <= -7.5e+93) || ~((y <= 4.6e+95)))
		tmp = t * (y / a);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -7.5e+93], N[Not[LessEqual[y, 4.6e+95]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+93} \lor \neg \left(y \leq 4.6 \cdot 10^{+95}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.5000000000000002e93 or 4.59999999999999994e95 < y

    1. Initial program 84.1%

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

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

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

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

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

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

    if -7.5000000000000002e93 < y < 4.59999999999999994e95

    1. Initial program 97.2%

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

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification58.0%

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

Alternative 14: 49.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+93}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

\mathbf{elif}\;y \leq 1.5 \cdot 10^{+95}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.99999999999999996e93

    1. Initial program 86.1%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    8. Applied egg-rr55.6%

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

    if -6.99999999999999996e93 < y < 1.49999999999999996e95

    1. Initial program 97.2%

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

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

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

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

    if 1.49999999999999996e95 < y

    1. Initial program 81.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+93}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+95}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \]

Alternative 15: 97.4% 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.6%

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

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

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

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

Alternative 16: 38.8% 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.6%

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification41.9%

    \[\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 2023332 
(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)))