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

Percentage Accurate: 93.5% → 99.6%
Time: 11.5s
Alternatives: 15
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 15 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.5% 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: 99.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+292} \lor \neg \left(t_1 \leq 2 \cdot 10^{+246}\right):\\
\;\;\;\;x + \frac{t - z}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 y (-.f64 z t)) < -2e292 or 2.00000000000000014e246 < (*.f64 y (-.f64 z t))

    1. Initial program 71.0%

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

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

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

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

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

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

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

    if -2e292 < (*.f64 y (-.f64 z t)) < 2.00000000000000014e246

    1. Initial program 99.3%

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

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

Alternative 2: 99.6% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 y (-.f64 z t)) < -2.00000000000000014e174

    1. Initial program 83.4%

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

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

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

    if -2.00000000000000014e174 < (*.f64 y (-.f64 z t)) < 4.00000000000000026e260

    1. Initial program 99.2%

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

    if 4.00000000000000026e260 < (*.f64 y (-.f64 z t))

    1. Initial program 71.7%

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

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

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

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

Alternative 3: 49.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z}{a} \cdot \left(-y\right)\\ \mathbf{if}\;t \leq -1.26 \cdot 10^{+60}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-110}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-62}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-12}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (/ z a) (- y))))
   (if (<= t -1.26e+60)
     (/ t (/ a y))
     (if (<= t -2.5e-110)
       x
       (if (<= t 1.4e-174)
         t_1
         (if (<= t 5.2e-62)
           x
           (if (<= t 5.4e-46) t_1 (if (<= t 1.15e-12) x (* t (/ y a))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (z / a) * -y;
	double tmp;
	if (t <= -1.26e+60) {
		tmp = t / (a / y);
	} else if (t <= -2.5e-110) {
		tmp = x;
	} else if (t <= 1.4e-174) {
		tmp = t_1;
	} else if (t <= 5.2e-62) {
		tmp = x;
	} else if (t <= 5.4e-46) {
		tmp = t_1;
	} else if (t <= 1.15e-12) {
		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) :: t_1
    real(8) :: tmp
    t_1 = (z / a) * -y
    if (t <= (-1.26d+60)) then
        tmp = t / (a / y)
    else if (t <= (-2.5d-110)) then
        tmp = x
    else if (t <= 1.4d-174) then
        tmp = t_1
    else if (t <= 5.2d-62) then
        tmp = x
    else if (t <= 5.4d-46) then
        tmp = t_1
    else if (t <= 1.15d-12) 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 t_1 = (z / a) * -y;
	double tmp;
	if (t <= -1.26e+60) {
		tmp = t / (a / y);
	} else if (t <= -2.5e-110) {
		tmp = x;
	} else if (t <= 1.4e-174) {
		tmp = t_1;
	} else if (t <= 5.2e-62) {
		tmp = x;
	} else if (t <= 5.4e-46) {
		tmp = t_1;
	} else if (t <= 1.15e-12) {
		tmp = x;
	} else {
		tmp = t * (y / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (z / a) * -y
	tmp = 0
	if t <= -1.26e+60:
		tmp = t / (a / y)
	elif t <= -2.5e-110:
		tmp = x
	elif t <= 1.4e-174:
		tmp = t_1
	elif t <= 5.2e-62:
		tmp = x
	elif t <= 5.4e-46:
		tmp = t_1
	elif t <= 1.15e-12:
		tmp = x
	else:
		tmp = t * (y / a)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(z / a) * Float64(-y))
	tmp = 0.0
	if (t <= -1.26e+60)
		tmp = Float64(t / Float64(a / y));
	elseif (t <= -2.5e-110)
		tmp = x;
	elseif (t <= 1.4e-174)
		tmp = t_1;
	elseif (t <= 5.2e-62)
		tmp = x;
	elseif (t <= 5.4e-46)
		tmp = t_1;
	elseif (t <= 1.15e-12)
		tmp = x;
	else
		tmp = Float64(t * Float64(y / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (z / a) * -y;
	tmp = 0.0;
	if (t <= -1.26e+60)
		tmp = t / (a / y);
	elseif (t <= -2.5e-110)
		tmp = x;
	elseif (t <= 1.4e-174)
		tmp = t_1;
	elseif (t <= 5.2e-62)
		tmp = x;
	elseif (t <= 5.4e-46)
		tmp = t_1;
	elseif (t <= 1.15e-12)
		tmp = x;
	else
		tmp = t * (y / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / a), $MachinePrecision] * (-y)), $MachinePrecision]}, If[LessEqual[t, -1.26e+60], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.5e-110], x, If[LessEqual[t, 1.4e-174], t$95$1, If[LessEqual[t, 5.2e-62], x, If[LessEqual[t, 5.4e-46], t$95$1, If[LessEqual[t, 1.15e-12], x, N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2.5 \cdot 10^{-110}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.4 \cdot 10^{-174}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 5.2 \cdot 10^{-62}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 5.4 \cdot 10^{-46}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{-12}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.26e60

    1. Initial program 89.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    6. Simplified74.3%

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

    if -1.26e60 < t < -2.5e-110 or 1.39999999999999999e-174 < t < 5.1999999999999999e-62 or 5.4e-46 < t < 1.14999999999999995e-12

    1. Initial program 92.5%

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

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

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

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

    if -2.5e-110 < t < 1.39999999999999999e-174 or 5.1999999999999999e-62 < t < 5.4e-46

    1. Initial program 89.1%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{\frac{y}{a}}{\frac{1}{z - t}}} \]
    5. Applied egg-rr90.7%

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

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

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

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

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

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

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

    if 1.14999999999999995e-12 < t

    1. Initial program 91.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.26 \cdot 10^{+60}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-110}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-174}:\\ \;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-62}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-46}:\\ \;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-12}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \]

Alternative 4: 49.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -3.3 \cdot 10^{-110}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 2.3 \cdot 10^{-61}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 1.12 \cdot 10^{-11}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -6.0000000000000001e59

    1. Initial program 89.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    6. Simplified74.3%

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

    if -6.0000000000000001e59 < t < -3.2999999999999999e-110 or 4.69999999999999998e-175 < t < 2.29999999999999992e-61 or 5.2e-42 < t < 1.1200000000000001e-11

    1. Initial program 92.5%

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

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

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

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

    if -3.2999999999999999e-110 < t < 4.69999999999999998e-175

    1. Initial program 89.8%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{\frac{y}{a}}{\frac{1}{z - t}}} \]
    5. Applied egg-rr90.0%

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

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

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

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

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

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

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

    if 2.29999999999999992e-61 < t < 5.2e-42

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1200000000000001e-11 < t

    1. Initial program 91.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{+59}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-110}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{-175}:\\ \;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-61}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-42}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-11}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \]

Alternative 5: 49.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -8.4 \cdot 10^{-109}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 6.6 \cdot 10^{-62}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 1.32 \cdot 10^{-11}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -3e59

    1. Initial program 89.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    6. Simplified74.3%

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

    if -3e59 < t < -8.39999999999999984e-109 or 1.2e-174 < t < 6.60000000000000009e-62 or 3.99999999999999972e-39 < t < 1.32e-11

    1. Initial program 92.5%

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

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

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

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

    if -8.39999999999999984e-109 < t < 1.2e-174

    1. Initial program 89.8%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{\frac{y}{a}}{\frac{1}{z - t}}} \]
    5. Applied egg-rr90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.60000000000000009e-62 < t < 3.99999999999999972e-39

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.32e-11 < t

    1. Initial program 91.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+59}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq -8.4 \cdot 10^{-109}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-174}:\\ \;\;\;\;\frac{y}{\frac{-a}{z}}\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{-62}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-39}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;t \leq 1.32 \cdot 10^{-11}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \]

Alternative 6: 83.1% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.0200000000000001e60 or 2.3000000000000001e119 < t

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

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

    if -1.0200000000000001e60 < t < 78

    1. Initial program 90.9%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
      2. div-inv97.4%

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

        \[\leadsto x - \color{blue}{\frac{\frac{y}{a}}{\frac{1}{z - t}}} \]
    5. Applied egg-rr93.7%

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

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

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

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

    if 78 < t < 2.3000000000000001e119

    1. Initial program 95.1%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{\frac{y}{a}}{\frac{1}{z - t}}} \]
    5. Applied egg-rr99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} - \frac{y}{a} \cdot z \]
      15. *-commutative48.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.02 \cdot 10^{+60}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq 78:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+119}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]

Alternative 7: 75.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.42 \cdot 10^{-70} \lor \neg \left(y \leq 1.18 \cdot 10^{+109}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.42000000000000002e-70 or 1.17999999999999998e109 < y

    1. Initial program 82.5%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
      2. div-inv99.7%

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

        \[\leadsto x - \color{blue}{\frac{\frac{y}{a}}{\frac{1}{z - t}}} \]
    5. Applied egg-rr93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.42000000000000002e-70 < y < 1.17999999999999998e109

    1. Initial program 99.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 z around 0 87.6%

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

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

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

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

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

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

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

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

Alternative 8: 75.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.05 \cdot 10^{-70} \lor \neg \left(y \leq 1.65 \cdot 10^{+107}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.04999999999999989e-70 or 1.65000000000000016e107 < y

    1. Initial program 82.5%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
      2. div-inv99.7%

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

        \[\leadsto x - \color{blue}{\frac{\frac{y}{a}}{\frac{1}{z - t}}} \]
    5. Applied egg-rr93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.04999999999999989e-70 < y < 1.65000000000000016e107

    1. Initial program 99.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 z around 0 87.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 76.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-70} \lor \neg \left(y \leq 3.9 \cdot 10^{+107}\right):\\
\;\;\;\;\frac{y}{\frac{a}{t - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.7000000000000001e-70 or 3.8999999999999998e107 < y

    1. Initial program 82.5%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
      2. div-inv99.7%

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

        \[\leadsto x - \color{blue}{\frac{\frac{y}{a}}{\frac{1}{z - t}}} \]
    5. Applied egg-rr93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7000000000000001e-70 < y < 3.8999999999999998e107

    1. Initial program 99.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 z around 0 87.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 76.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{-70} \lor \neg \left(y \leq 5.6 \cdot 10^{+108}\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.7e-70) (not (<= y 5.6e+108)))
   (* 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.7e-70) || !(y <= 5.6e+108)) {
		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.7d-70)) .or. (.not. (y <= 5.6d+108))) 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.7e-70) || !(y <= 5.6e+108)) {
		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.7e-70) or not (y <= 5.6e+108):
		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.7e-70) || !(y <= 5.6e+108))
		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.7e-70) || ~((y <= 5.6e+108)))
		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.7e-70], N[Not[LessEqual[y, 5.6e+108]], $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.7 \cdot 10^{-70} \lor \neg \left(y \leq 5.6 \cdot 10^{+108}\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.7000000000000001e-70 or 5.5999999999999996e108 < y

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

    if -2.7000000000000001e-70 < y < 5.5999999999999996e108

    1. Initial program 99.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 z around 0 87.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 67.4% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.7000000000000002e223 or 1.52e122 < x

    1. Initial program 91.7%

      \[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 69.4%

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

    if -3.7000000000000002e223 < x < 1.52e122

    1. Initial program 90.5%

      \[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. Step-by-step derivation
      1. associate-/r/93.4%

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
      2. div-inv93.3%

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

        \[\leadsto x - \color{blue}{\frac{\frac{y}{a}}{\frac{1}{z - t}}} \]
    5. Applied egg-rr95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 51.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+59} \lor \neg \left(t \leq 1.02 \cdot 10^{-11}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.20000000000000029e59 or 1.01999999999999994e-11 < t

    1. Initial program 90.9%

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

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

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

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

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

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

    if -6.20000000000000029e59 < t < 1.01999999999999994e-11

    1. Initial program 90.7%

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

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

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

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

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

Alternative 13: 51.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 4.1 \cdot 10^{-13}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.7e60

    1. Initial program 89.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    6. Simplified74.3%

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

    if -1.7e60 < t < 4.1000000000000002e-13

    1. Initial program 90.7%

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

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

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

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

    if 4.1000000000000002e-13 < t

    1. Initial program 91.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+60}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-13}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \]

Alternative 14: 97.3% 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 90.8%

    \[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 15: 40.6% 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 90.8%

    \[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 34.9%

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

    \[\leadsto x \]

Developer target: 99.1% 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 2023310 
(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)))