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

Percentage Accurate: 92.6% → 97.5%
Time: 10.5s
Alternatives: 12
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 12 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 92.6% accurate, 1.0× speedup?

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

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

Alternative 1: 97.5% 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 95.2%

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

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

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

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

Alternative 2: 51.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq -6.6 \cdot 10^{-31}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.02 \cdot 10^{-76}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.1 \cdot 10^{+39}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.59999999999999998e37 or 2.0999999999999999e39 < t

    1. Initial program 92.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    7. Step-by-step derivation
      1. clear-num61.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a}{y}}{t}}} \]
      2. associate-/r/61.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{y}} \cdot t} \]
      3. clear-num61.4%

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

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

    if -3.59999999999999998e37 < t < -6.5999999999999998e-31 or 1.02000000000000006e-76 < t < 2.0999999999999999e39

    1. Initial program 97.5%

      \[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)} \]
    4. Taylor expanded in z around inf 61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.5999999999999998e-31 < t < 1.02000000000000006e-76

    1. Initial program 97.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{+37}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \mathbf{elif}\;t \leq -6.6 \cdot 10^{-31}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-76}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+39}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \end{array} \]

Alternative 3: 51.5% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.4 \cdot 10^{-76}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.99999999999999982e37 or 3.3999999999999999e39 < t

    1. Initial program 92.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    7. Step-by-step derivation
      1. clear-num61.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a}{y}}{t}}} \]
      2. associate-/r/61.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{y}} \cdot t} \]
      3. clear-num61.4%

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

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

    if -3.99999999999999982e37 < t < -1.25999999999999999e-28

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

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

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

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

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

    if -1.25999999999999999e-28 < t < 1.40000000000000005e-76

    1. Initial program 97.0%

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

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

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

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

    if 1.40000000000000005e-76 < t < 3.3999999999999999e39

    1. Initial program 96.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)} \]
    4. Taylor expanded in z around inf 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{+37}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \mathbf{elif}\;t \leq -1.26 \cdot 10^{-28}:\\ \;\;\;\;\frac{-y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-76}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+39}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \end{array} \]

Alternative 4: 51.9% accurate, 0.6× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.80000000000000035e38 or 1.1999999999999999e42 < t

    1. Initial program 92.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    7. Step-by-step derivation
      1. clear-num61.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a}{y}}{t}}} \]
      2. associate-/r/61.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{y}} \cdot t} \]
      3. clear-num61.4%

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

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

    if -4.80000000000000035e38 < t < -2.5999999999999997e-32

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

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

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

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

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

    if -2.5999999999999997e-32 < t < 1.15000000000000003e-76

    1. Initial program 97.0%

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

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

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

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

    if 1.15000000000000003e-76 < t < 1.1999999999999999e42

    1. Initial program 96.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)} \]
    4. Taylor expanded in z around inf 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{-z}{-a}} \cdot y \]
      3. add-sqr-sqrt30.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\color{blue}{z}}{\frac{a}{y}} \]
    10. Applied egg-rr64.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{+38}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-32}:\\ \;\;\;\;\frac{-y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-76}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+42}:\\ \;\;\;\;\frac{-z}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \end{array} \]

Alternative 5: 51.9% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;t \leq 2 \cdot 10^{-76}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 9.6 \cdot 10^{+45}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.5000000000000001e38 or 9.59999999999999958e45 < t

    1. Initial program 92.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    7. Step-by-step derivation
      1. clear-num61.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a}{y}}{t}}} \]
      2. associate-/r/61.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{y}} \cdot t} \]
      3. clear-num61.4%

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

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

    if -1.5000000000000001e38 < t < -1.76000000000000004e-32

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

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

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

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

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

    if -1.76000000000000004e-32 < t < 1.99999999999999985e-76

    1. Initial program 97.0%

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

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

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

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

    if 1.99999999999999985e-76 < t < 9.59999999999999958e45

    1. Initial program 96.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)} \]
    4. Taylor expanded in z around inf 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+38}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \mathbf{elif}\;t \leq -1.76 \cdot 10^{-32}:\\ \;\;\;\;\frac{-y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-76}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{+45}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \end{array} \]

Alternative 6: 82.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{+77} \lor \neg \left(z \leq 2.3 \cdot 10^{+36}\right):\\
\;\;\;\;x - \frac{y \cdot z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.59999999999999983e77 or 2.29999999999999996e36 < z

    1. Initial program 95.1%

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

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

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

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

    if -8.59999999999999983e77 < z < 2.29999999999999996e36

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

Alternative 7: 82.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+70} \lor \neg \left(z \leq 2.9 \cdot 10^{+36}\right):\\
\;\;\;\;x - y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.2500000000000001e70 or 2.9e36 < z

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

    if -1.2500000000000001e70 < z < 2.9e36

    1. Initial program 95.2%

      \[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 z around 0 89.3%

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

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

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

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

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

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

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

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

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

Alternative 8: 82.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.32 \cdot 10^{+73} \lor \neg \left(z \leq 1.65 \cdot 10^{+38}\right):\\
\;\;\;\;x - \frac{y \cdot z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.32e73 or 1.65e38 < z

    1. Initial program 95.1%

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

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

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

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

    if -1.32e73 < z < 1.65e38

    1. Initial program 95.2%

      \[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 z around 0 89.3%

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

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

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

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

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

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

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

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

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

Alternative 9: 74.5% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.75e171 < z < 6.1999999999999998e79

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

    if 6.1999999999999998e79 < z

    1. Initial program 89.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. Taylor expanded in z around inf 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 49.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.04 \cdot 10^{+64} \lor \neg \left(t \leq 2.7 \cdot 10^{-60}\right):\\
\;\;\;\;y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.04e64 or 2.7e-60 < t

    1. Initial program 93.8%

      \[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 t around inf 55.4%

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

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

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

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

    if -1.04e64 < t < 2.7e-60

    1. Initial program 96.7%

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

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

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

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

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

Alternative 11: 51.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{+61} \lor \neg \left(t \leq 6.8 \cdot 10^{-60}\right):\\
\;\;\;\;\frac{y}{a} \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.55e61 or 6.80000000000000013e-60 < t

    1. Initial program 93.8%

      \[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 t around inf 55.4%

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    7. Step-by-step derivation
      1. clear-num59.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a}{y}}{t}}} \]
      2. associate-/r/59.1%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{y}} \cdot t} \]
      3. clear-num59.3%

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

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

    if -1.55e61 < t < 6.80000000000000013e-60

    1. Initial program 96.7%

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

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

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

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

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

Alternative 12: 39.9% 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 95.2%

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification39.4%

    \[\leadsto x \]

Developer target: 99.2% 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 2023322 
(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)))