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

Percentage Accurate: 92.9% → 97.3%
Time: 9.9s
Alternatives: 13
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 13 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: 92.9% 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.3% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 49.4% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;a \leq -1.2 \cdot 10^{-227}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 3.1 \cdot 10^{-65}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.1999999999999997e24 or -2.89999999999999985e-137 < a < -1.2e-227 or 3.10000000000000016e-65 < a

    1. Initial program 88.1%

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

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

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

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

    if -5.1999999999999997e24 < a < -2.89999999999999985e-137 or -4.3999999999999999e-271 < a < 3.10000000000000016e-65

    1. Initial program 98.5%

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{a}} \cdot y \]
    6. Step-by-step derivation
      1. *-commutative50.8%

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
      2. clear-num50.7%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      3. un-div-inv50.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
    9. Applied egg-rr55.1%

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

    if -1.2e-227 < a < -4.3999999999999999e-271

    1. Initial program 99.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.2 \cdot 10^{+24}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-137}:\\ \;\;\;\;\frac{y}{a} \cdot z\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-227}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{-271}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-65}:\\ \;\;\;\;\frac{y}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 49.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -5.2 \cdot 10^{-138}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -1.65 \cdot 10^{-227}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 3.1 \cdot 10^{-64}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.50000000000000054e26 or -5.2e-138 < a < -1.65e-227 or 3.10000000000000025e-64 < a

    1. Initial program 88.1%

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

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

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

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

    if -9.50000000000000054e26 < a < -5.2e-138 or -6.5000000000000005e-271 < a < 3.10000000000000025e-64

    1. Initial program 98.5%

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{a}} \cdot y \]
    6. Step-by-step derivation
      1. *-commutative50.8%

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
      2. clear-num50.7%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      3. un-div-inv50.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
    9. Applied egg-rr55.1%

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

    if -1.65e-227 < a < -6.5000000000000005e-271

    1. Initial program 99.7%

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
      2. clear-num79.1%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      3. un-div-inv80.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.5 \cdot 10^{+26}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-138}:\\ \;\;\;\;\frac{y}{a} \cdot z\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-227}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-271}:\\ \;\;\;\;\frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-64}:\\ \;\;\;\;\frac{y}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 49.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -1.15 \cdot 10^{-225}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.1 \cdot 10^{-284}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 4.8 \cdot 10^{-217}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.0000000000000001e59 or 2.8999999999999998e-65 < a

    1. Initial program 86.3%

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

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

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

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

    if -6.0000000000000001e59 < a < -1.1499999999999999e-225 or 1.1e-284 < a < 4.7999999999999997e-217

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-t}}{a} \cdot y \]
    7. Simplified51.4%

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

    if -1.1499999999999999e-225 < a < 1.1e-284 or 4.7999999999999997e-217 < a < 2.8999999999999998e-65

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a}{y}}} \]
    9. Applied egg-rr76.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{+59}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-225}:\\ \;\;\;\;y \cdot \left(-\frac{t}{a}\right)\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-284}:\\ \;\;\;\;\frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-217}:\\ \;\;\;\;y \cdot \left(-\frac{t}{a}\right)\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-65}:\\ \;\;\;\;\frac{y \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 5: 51.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot z}{a}\\ t_2 := \frac{t}{\frac{-a}{y}}\\ \mathbf{if}\;a \leq -9.8 \cdot 10^{+55}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-227}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 5.1 \cdot 10^{-287}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-217}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.95 \cdot 10^{-64}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* y z) a)) (t_2 (/ t (/ (- a) y))))
   (if (<= a -9.8e+55)
     x
     (if (<= a -2.3e-227)
       t_2
       (if (<= a 5.1e-287)
         t_1
         (if (<= a 5.4e-217) t_2 (if (<= a 2.95e-64) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * z) / a;
	double t_2 = t / (-a / y);
	double tmp;
	if (a <= -9.8e+55) {
		tmp = x;
	} else if (a <= -2.3e-227) {
		tmp = t_2;
	} else if (a <= 5.1e-287) {
		tmp = t_1;
	} else if (a <= 5.4e-217) {
		tmp = t_2;
	} else if (a <= 2.95e-64) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (y * z) / a
    t_2 = t / (-a / y)
    if (a <= (-9.8d+55)) then
        tmp = x
    else if (a <= (-2.3d-227)) then
        tmp = t_2
    else if (a <= 5.1d-287) then
        tmp = t_1
    else if (a <= 5.4d-217) then
        tmp = t_2
    else if (a <= 2.95d-64) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * z) / a;
	double t_2 = t / (-a / y);
	double tmp;
	if (a <= -9.8e+55) {
		tmp = x;
	} else if (a <= -2.3e-227) {
		tmp = t_2;
	} else if (a <= 5.1e-287) {
		tmp = t_1;
	} else if (a <= 5.4e-217) {
		tmp = t_2;
	} else if (a <= 2.95e-64) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y * z) / a
	t_2 = t / (-a / y)
	tmp = 0
	if a <= -9.8e+55:
		tmp = x
	elif a <= -2.3e-227:
		tmp = t_2
	elif a <= 5.1e-287:
		tmp = t_1
	elif a <= 5.4e-217:
		tmp = t_2
	elif a <= 2.95e-64:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y * z) / a)
	t_2 = Float64(t / Float64(Float64(-a) / y))
	tmp = 0.0
	if (a <= -9.8e+55)
		tmp = x;
	elseif (a <= -2.3e-227)
		tmp = t_2;
	elseif (a <= 5.1e-287)
		tmp = t_1;
	elseif (a <= 5.4e-217)
		tmp = t_2;
	elseif (a <= 2.95e-64)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y * z) / a;
	t_2 = t / (-a / y);
	tmp = 0.0;
	if (a <= -9.8e+55)
		tmp = x;
	elseif (a <= -2.3e-227)
		tmp = t_2;
	elseif (a <= 5.1e-287)
		tmp = t_1;
	elseif (a <= 5.4e-217)
		tmp = t_2;
	elseif (a <= 2.95e-64)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[((-a) / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.8e+55], x, If[LessEqual[a, -2.3e-227], t$95$2, If[LessEqual[a, 5.1e-287], t$95$1, If[LessEqual[a, 5.4e-217], t$95$2, If[LessEqual[a, 2.95e-64], t$95$1, x]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.3 \cdot 10^{-227}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 5.1 \cdot 10^{-287}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 5.4 \cdot 10^{-217}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 2.95 \cdot 10^{-64}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.80000000000000029e55 or 2.94999999999999997e-64 < a

    1. Initial program 86.3%

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

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

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

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

    if -9.80000000000000029e55 < a < -2.30000000000000012e-227 or 5.0999999999999998e-287 < a < 5.40000000000000032e-217

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-t}}{a} \cdot y \]
    7. Simplified51.4%

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

        \[\leadsto \color{blue}{\frac{\left(-t\right) \cdot y}{a}} \]
      2. add-cube-cbrt58.8%

        \[\leadsto \frac{\left(-t\right) \cdot y}{\color{blue}{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}}} \]
      3. times-frac55.7%

        \[\leadsto \color{blue}{\frac{-t}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{y}{\sqrt[3]{a}}} \]
      4. add-sqr-sqrt26.7%

        \[\leadsto \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{y}{\sqrt[3]{a}} \]
      5. sqrt-unprod26.0%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{y}{\sqrt[3]{a}} \]
      6. sqr-neg26.0%

        \[\leadsto \frac{\sqrt{\color{blue}{t \cdot t}}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{y}{\sqrt[3]{a}} \]
      7. sqrt-unprod2.8%

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

        \[\leadsto \frac{\color{blue}{t}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{y}{\sqrt[3]{a}} \]
      9. times-frac3.6%

        \[\leadsto \color{blue}{\frac{t \cdot y}{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}}} \]
      10. *-commutative3.6%

        \[\leadsto \frac{\color{blue}{y \cdot t}}{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}} \]
      11. add-cube-cbrt3.6%

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

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

        \[\leadsto \color{blue}{\left(t \cdot y\right)} \cdot \frac{1}{a} \]
      14. associate-*l*3.6%

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

        \[\leadsto t \cdot \color{blue}{\frac{y}{a}} \]
      16. clear-num3.6%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      17. div-inv3.6%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
      18. frac-2neg3.6%

        \[\leadsto \color{blue}{\frac{-t}{-\frac{a}{y}}} \]
      19. add-sqr-sqrt0.8%

        \[\leadsto \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{-\frac{a}{y}} \]
      20. sqrt-unprod22.0%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{-\frac{a}{y}} \]
      21. sqr-neg22.0%

        \[\leadsto \frac{\sqrt{\color{blue}{t \cdot t}}}{-\frac{a}{y}} \]
      22. sqrt-unprod29.3%

        \[\leadsto \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{-\frac{a}{y}} \]
      23. add-sqr-sqrt57.8%

        \[\leadsto \frac{\color{blue}{t}}{-\frac{a}{y}} \]
      24. distribute-neg-frac57.8%

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

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

    if -2.30000000000000012e-227 < a < 5.0999999999999998e-287 or 5.40000000000000032e-217 < a < 2.94999999999999997e-64

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a}{y}}} \]
    9. Applied egg-rr76.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.8 \cdot 10^{+55}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-227}:\\ \;\;\;\;\frac{t}{\frac{-a}{y}}\\ \mathbf{elif}\;a \leq 5.1 \cdot 10^{-287}:\\ \;\;\;\;\frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-217}:\\ \;\;\;\;\frac{t}{\frac{-a}{y}}\\ \mathbf{elif}\;a \leq 2.95 \cdot 10^{-64}:\\ \;\;\;\;\frac{y \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 6: 50.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -1.05 \cdot 10^{-226}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 6.6 \cdot 10^{-286}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 5.4 \cdot 10^{-217}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 7.2 \cdot 10^{-66}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.00000000000000017e55 or 7.20000000000000025e-66 < a

    1. Initial program 86.3%

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

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

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

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

    if -3.00000000000000017e55 < a < -1.0500000000000001e-226 or 6.5999999999999997e-286 < a < 5.40000000000000032e-217

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-t}}{a} \cdot y \]
    7. Simplified51.4%

      \[\leadsto \color{blue}{\frac{-t}{a}} \cdot y \]
    8. Step-by-step derivation
      1. *-commutative51.4%

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

        \[\leadsto y \cdot \color{blue}{\frac{-\left(-t\right)}{-a}} \]
      3. remove-double-neg51.4%

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

        \[\leadsto \color{blue}{\frac{y \cdot t}{-a}} \]
    9. Applied egg-rr59.4%

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

    if -1.0500000000000001e-226 < a < 6.5999999999999997e-286 or 5.40000000000000032e-217 < a < 7.20000000000000025e-66

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a}{y}}} \]
    9. Applied egg-rr76.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3 \cdot 10^{+55}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-226}:\\ \;\;\;\;\frac{y \cdot t}{-a}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-286}:\\ \;\;\;\;\frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-217}:\\ \;\;\;\;\frac{y \cdot t}{-a}\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-66}:\\ \;\;\;\;\frac{y \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 7: 76.6% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;x \leq 8 \cdot 10^{+26}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -6.3999999999999998e-80 or 1.2e37 < x

    1. Initial program 93.1%

      \[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 0 80.0%

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

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

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

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

    if -6.3999999999999998e-80 < x < 2.60000000000000009e-6

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

    if 2.60000000000000009e-6 < x < 8.00000000000000038e26

    1. Initial program 100.0%

      \[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}{\frac{a}{z - t}}} \]
    3. Simplified100.0%

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

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

    if 8.00000000000000038e26 < x < 1.2e37

    1. Initial program 99.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(-t\right) \cdot y}{a}} \]
      2. add-cube-cbrt98.0%

        \[\leadsto \frac{\left(-t\right) \cdot y}{\color{blue}{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}}} \]
      3. times-frac97.9%

        \[\leadsto \color{blue}{\frac{-t}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{y}{\sqrt[3]{a}}} \]
      4. add-sqr-sqrt24.4%

        \[\leadsto \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{y}{\sqrt[3]{a}} \]
      5. sqrt-unprod24.7%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{y}{\sqrt[3]{a}} \]
      6. sqr-neg24.7%

        \[\leadsto \frac{\sqrt{\color{blue}{t \cdot t}}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{y}{\sqrt[3]{a}} \]
      7. sqrt-unprod0.4%

        \[\leadsto \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{y}{\sqrt[3]{a}} \]
      8. add-sqr-sqrt0.5%

        \[\leadsto \frac{\color{blue}{t}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{y}{\sqrt[3]{a}} \]
      9. times-frac0.5%

        \[\leadsto \color{blue}{\frac{t \cdot y}{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}}} \]
      10. *-commutative0.5%

        \[\leadsto \frac{\color{blue}{y \cdot t}}{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}} \]
      11. add-cube-cbrt0.5%

        \[\leadsto \frac{y \cdot t}{\color{blue}{a}} \]
      12. div-inv0.5%

        \[\leadsto \color{blue}{\left(y \cdot t\right) \cdot \frac{1}{a}} \]
      13. *-commutative0.5%

        \[\leadsto \color{blue}{\left(t \cdot y\right)} \cdot \frac{1}{a} \]
      14. associate-*l*0.5%

        \[\leadsto \color{blue}{t \cdot \left(y \cdot \frac{1}{a}\right)} \]
      15. div-inv0.5%

        \[\leadsto t \cdot \color{blue}{\frac{y}{a}} \]
      16. clear-num0.5%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      17. div-inv0.5%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
      18. frac-2neg0.5%

        \[\leadsto \color{blue}{\frac{-t}{-\frac{a}{y}}} \]
      19. add-sqr-sqrt0.1%

        \[\leadsto \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{-\frac{a}{y}} \]
      20. sqrt-unprod51.5%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{-\frac{a}{y}} \]
      21. sqr-neg51.5%

        \[\leadsto \frac{\sqrt{\color{blue}{t \cdot t}}}{-\frac{a}{y}} \]
      22. sqrt-unprod74.2%

        \[\leadsto \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{-\frac{a}{y}} \]
      23. add-sqr-sqrt99.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.4 \cdot 10^{-80}:\\ \;\;\;\;x + \frac{y}{a} \cdot z\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{-6}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+26}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{+37}:\\ \;\;\;\;\frac{t}{\frac{-a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{a} \cdot z\\ \end{array} \]

Alternative 8: 75.2% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.5999999999999999e-81 or 5.79999999999999962e-10 < x

    1. Initial program 93.6%

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

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

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

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

    if -2.5999999999999999e-81 < x < 5.79999999999999962e-10

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 84.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{-75} \lor \neg \left(t \leq 1.6 \cdot 10^{+87}\right):\\
\;\;\;\;x - \frac{y}{a} \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.70000000000000024e-75 or 1.6e87 < t

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.70000000000000024e-75 < t < 1.6e87

    1. Initial program 93.0%

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

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

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

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

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

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

Alternative 10: 65.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.15 \cdot 10^{+205}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.15000000000000007e205 or 1.5999999999999999e40 < x

    1. Initial program 93.6%

      \[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 x around inf 76.1%

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

    if -3.15000000000000007e205 < x < 1.5999999999999999e40

    1. Initial program 91.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 y around inf 69.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.15 \cdot 10^{+205}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+40}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 76.1% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.59999999999999978e-80

    1. Initial program 92.0%

      \[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 0 74.9%

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

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

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

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

    if -5.59999999999999978e-80 < x < 7.60000000000000023e-9

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

    if 7.60000000000000023e-9 < x

    1. Initial program 95.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.6 \cdot 10^{-80}:\\ \;\;\;\;x + \frac{y}{a} \cdot z\\ \mathbf{elif}\;x \leq 7.6 \cdot 10^{-9}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \end{array} \]

Alternative 12: 51.9% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.05e24 or 7.79999999999999965e-66 < a

    1. Initial program 86.7%

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

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

      \[\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 -2.05e24 < a < 7.79999999999999965e-66

    1. Initial program 98.8%

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{a}} \cdot y \]
    6. Step-by-step derivation
      1. *-commutative45.9%

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
      2. clear-num45.9%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      3. un-div-inv46.0%

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
    9. Applied egg-rr47.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.05 \cdot 10^{+24}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{-66}:\\ \;\;\;\;\frac{y}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 39.1% accurate, 9.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification42.8%

    \[\leadsto x \]

Developer target: 99.0% 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 2023196 
(FPCore (x y z t a)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
  :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)))