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

Percentage Accurate: 93.3% → 95.9%
Time: 14.6s
Alternatives: 11
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 11 alternatives:

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

Initial Program: 93.3% accurate, 1.0× speedup?

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

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

Alternative 1: 95.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.8 \cdot 10^{-103}:\\ \;\;\;\;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
 (if (<= y 1.8e-103) (+ x (/ (* y (- t z)) a)) (- x (/ y (/ a (- z t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= 1.8e-103) {
		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) :: tmp
    if (y <= 1.8d-103) 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 tmp;
	if (y <= 1.8e-103) {
		tmp = x + ((y * (t - z)) / a);
	} else {
		tmp = x - (y / (a / (z - t)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= 1.8e-103:
		tmp = x + ((y * (t - z)) / a)
	else:
		tmp = x - (y / (a / (z - t)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= 1.8e-103)
		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)
	tmp = 0.0;
	if (y <= 1.8e-103)
		tmp = x + ((y * (t - z)) / a);
	else
		tmp = x - (y / (a / (z - t)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1.8e-103], 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}
\mathbf{if}\;y \leq 1.8 \cdot 10^{-103}:\\
\;\;\;\;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 2 regimes
  2. if y < 1.7999999999999999e-103

    1. Initial program 98.7%

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

    if 1.7999999999999999e-103 < y

    1. Initial program 86.2%

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

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

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

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

Alternative 2: 49.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -1.9 \cdot 10^{-154}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 2.8 \cdot 10^{-111}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 4.6 \cdot 10^{+77}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.2 \cdot 10^{+96}:\\
\;\;\;\;x\\

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


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

    1. Initial program 91.5%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      2. un-div-inv56.3%

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

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    9. Step-by-step derivation
      1. associate-/r/70.5%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot t} \]
    10. Applied egg-rr70.5%

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

    if -1.0500000000000001e117 < t < -1.90000000000000005e-154 or -1.90000000000000006e-300 < t < 2.79999999999999995e-111 or 4.5999999999999999e77 < t < 1.19999999999999996e96

    1. Initial program 95.1%

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

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

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

    if -1.90000000000000005e-154 < t < -1.90000000000000006e-300 or 2.79999999999999995e-111 < t < 4.5999999999999999e77

    1. Initial program 98.0%

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

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

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

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

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

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

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

    if 1.19999999999999996e96 < t

    1. Initial program 88.0%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} \]
      2. *-commutative71.0%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      2. un-div-inv70.8%

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

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    9. Step-by-step derivation
      1. associate-/r/72.9%

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

      \[\leadsto \color{blue}{\frac{y}{a} \cdot t} \]
    11. Step-by-step derivation
      1. clear-num73.0%

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

        \[\leadsto \color{blue}{\frac{1 \cdot t}{\frac{a}{y}}} \]
      3. *-un-lft-identity73.0%

        \[\leadsto \frac{\color{blue}{t}}{\frac{a}{y}} \]
    12. Applied egg-rr73.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+117}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-154}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-300}:\\ \;\;\;\;z \cdot \frac{-y}{a}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-111}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+77}:\\ \;\;\;\;z \cdot \frac{-y}{a}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+96}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \end{array} \]

Alternative 3: 49.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -1.25 \cdot 10^{-155}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.2 \cdot 10^{-267}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{-113}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.2 \cdot 10^{-15}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 4.8 \cdot 10^{+17}:\\
\;\;\;\;x\\

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


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

    1. Initial program 91.5%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      2. un-div-inv56.3%

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

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    9. Step-by-step derivation
      1. associate-/r/70.5%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot t} \]
    10. Applied egg-rr70.5%

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

    if -1.14999999999999994e117 < t < -1.25e-155 or 1.1999999999999999e-267 < t < 1.89999999999999992e-113 or 1.19999999999999997e-15 < t < 4.8e17

    1. Initial program 94.7%

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

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

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

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

    if -1.25e-155 < t < 1.1999999999999999e-267 or 1.89999999999999992e-113 < t < 1.19999999999999997e-15

    1. Initial program 97.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}{\frac{a}{z - t}}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{y}{\frac{a}{z - t}}} \]
    4. Step-by-step derivation
      1. associate-/r/97.0%

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot \left(z - t\right)} \]
    5. Applied egg-rr97.0%

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

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

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

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

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

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

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

    if 4.8e17 < t

    1. Initial program 90.8%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      2. un-div-inv60.6%

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

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    9. Step-by-step derivation
      1. associate-/r/62.2%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot t} \]
    10. Applied egg-rr62.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{+117}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-155}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-267}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-113}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-15}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+17}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \end{array} \]

Alternative 4: 66.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -0.0045:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{-14} \lor \neg \left(x \leq 13500\right) \land x \leq 2.6 \cdot 10^{+177}:\\ \;\;\;\;\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 -0.0045)
   x
   (if (or (<= x 2.9e-14) (and (not (<= x 13500.0)) (<= x 2.6e+177)))
     (* (/ y a) (- t z))
     x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -0.0045) {
		tmp = x;
	} else if ((x <= 2.9e-14) || (!(x <= 13500.0) && (x <= 2.6e+177))) {
		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 <= (-0.0045d0)) then
        tmp = x
    else if ((x <= 2.9d-14) .or. (.not. (x <= 13500.0d0)) .and. (x <= 2.6d+177)) 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 <= -0.0045) {
		tmp = x;
	} else if ((x <= 2.9e-14) || (!(x <= 13500.0) && (x <= 2.6e+177))) {
		tmp = (y / a) * (t - z);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -0.0045:
		tmp = x
	elif (x <= 2.9e-14) or (not (x <= 13500.0) and (x <= 2.6e+177)):
		tmp = (y / a) * (t - z)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -0.0045)
		tmp = x;
	elseif ((x <= 2.9e-14) || (!(x <= 13500.0) && (x <= 2.6e+177)))
		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 <= -0.0045)
		tmp = x;
	elseif ((x <= 2.9e-14) || (~((x <= 13500.0)) && (x <= 2.6e+177)))
		tmp = (y / a) * (t - z);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -0.0045], x, If[Or[LessEqual[x, 2.9e-14], And[N[Not[LessEqual[x, 13500.0]], $MachinePrecision], LessEqual[x, 2.6e+177]]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.0045:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 2.9 \cdot 10^{-14} \lor \neg \left(x \leq 13500\right) \land x \leq 2.6 \cdot 10^{+177}:\\
\;\;\;\;\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 < -0.00449999999999999966 or 2.9000000000000003e-14 < x < 13500 or 2.59999999999999979e177 < x

    1. Initial program 92.3%

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

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

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

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

    if -0.00449999999999999966 < x < 2.9000000000000003e-14 or 13500 < x < 2.59999999999999979e177

    1. Initial program 95.1%

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

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

      \[\leadsto \color{blue}{x - \frac{y}{\frac{a}{z - t}}} \]
    4. Step-by-step derivation
      1. associate-/r/95.4%

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a} - \frac{z}{a}\right)} \]
    7. Step-by-step derivation
      1. distribute-lft-out--66.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.0045:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{-14} \lor \neg \left(x \leq 13500\right) \land x \leq 2.6 \cdot 10^{+177}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 5: 78.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{if}\;t \leq -1.35 \cdot 10^{+118}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-44}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+17}:\\ \;\;\;\;x - 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 z))))
   (if (<= t -1.35e+118)
     t_1
     (if (<= t -1.8e-44)
       (+ x (* y (/ t a)))
       (if (<= t 1.95e+17) (- x (* y (/ z a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y / a) * (t - z);
	double tmp;
	if (t <= -1.35e+118) {
		tmp = t_1;
	} else if (t <= -1.8e-44) {
		tmp = x + (y * (t / a));
	} else if (t <= 1.95e+17) {
		tmp = x - (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 - z)
    if (t <= (-1.35d+118)) then
        tmp = t_1
    else if (t <= (-1.8d-44)) then
        tmp = x + (y * (t / a))
    else if (t <= 1.95d+17) then
        tmp = x - (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 - z);
	double tmp;
	if (t <= -1.35e+118) {
		tmp = t_1;
	} else if (t <= -1.8e-44) {
		tmp = x + (y * (t / a));
	} else if (t <= 1.95e+17) {
		tmp = x - (y * (z / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y / a) * (t - z)
	tmp = 0
	if t <= -1.35e+118:
		tmp = t_1
	elif t <= -1.8e-44:
		tmp = x + (y * (t / a))
	elif t <= 1.95e+17:
		tmp = x - (y * (z / a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y / a) * Float64(t - z))
	tmp = 0.0
	if (t <= -1.35e+118)
		tmp = t_1;
	elseif (t <= -1.8e-44)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	elseif (t <= 1.95e+17)
		tmp = Float64(x - Float64(y * 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 - z);
	tmp = 0.0;
	if (t <= -1.35e+118)
		tmp = t_1;
	elseif (t <= -1.8e-44)
		tmp = x + (y * (t / a));
	elseif (t <= 1.95e+17)
		tmp = x - (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] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.35e+118], t$95$1, If[LessEqual[t, -1.8e-44], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+17], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.35e118 or 1.95e17 < t

    1. Initial program 91.1%

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

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

      \[\leadsto \color{blue}{x - \frac{y}{\frac{a}{z - t}}} \]
    4. Step-by-step derivation
      1. associate-/r/95.7%

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot \left(z - t\right)} \]
    5. Applied egg-rr95.7%

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a} - \frac{z}{a}\right)} \]
    7. Step-by-step derivation
      1. distribute-lft-out--63.6%

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

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

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

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

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

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

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

    if -1.35e118 < t < -1.7999999999999999e-44

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7999999999999999e-44 < t < 1.95e17

    1. Initial program 95.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{+118}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-44}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+17}:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \end{array} \]

Alternative 6: 78.2% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.84999999999999986e107 or 5.1000000000000001e84 < z

    1. Initial program 91.4%

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

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

      \[\leadsto \color{blue}{x - \frac{y}{\frac{a}{z - t}}} \]
    4. Step-by-step derivation
      1. associate-/r/95.6%

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a} - \frac{z}{a}\right)} \]
    7. Step-by-step derivation
      1. distribute-lft-out--58.3%

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

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

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

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

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

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

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

    if -2.84999999999999986e107 < z < 5.1000000000000001e84

    1. Initial program 95.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 50.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{+117} \lor \neg \left(t \leq 1.4 \cdot 10^{+16}\right):\\
\;\;\;\;y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.2000000000000002e117 or 1.4e16 < t

    1. Initial program 91.1%

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

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

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

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

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

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

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

    if -4.2000000000000002e117 < t < 1.4e16

    1. Initial program 96.0%

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

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

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

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

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

Alternative 8: 51.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+117} \lor \neg \left(t \leq 4.8 \cdot 10^{+17}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.3999999999999999e117 or 4.8e17 < t

    1. Initial program 91.1%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      2. un-div-inv59.1%

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

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    9. Step-by-step derivation
      1. associate-/r/65.1%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot t} \]
    10. Applied egg-rr65.1%

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

    if -2.3999999999999999e117 < t < 4.8e17

    1. Initial program 96.0%

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

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

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

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

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

Alternative 9: 51.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 1.6 \cdot 10^{+17}:\\
\;\;\;\;x\\

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


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

    1. Initial program 91.5%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      2. un-div-inv56.3%

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

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    9. Step-by-step derivation
      1. associate-/r/70.5%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot t} \]
    10. Applied egg-rr70.5%

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

    if -1.12000000000000002e117 < t < 1.6e17

    1. Initial program 96.0%

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

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

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

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

    if 1.6e17 < t

    1. Initial program 90.8%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      2. un-div-inv60.6%

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

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    9. Step-by-step derivation
      1. associate-/r/62.2%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot t} \]
    10. Applied egg-rr62.2%

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

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

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

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

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

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

Alternative 10: 97.1% 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 94.1%

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

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

    \[\leadsto \color{blue}{x - \frac{y}{\frac{a}{z - t}}} \]
  4. Step-by-step derivation
    1. associate-/r/96.5%

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

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

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

Alternative 11: 40.7% 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 94.1%

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

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

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

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

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