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

Percentage Accurate: 93.4% → 97.1%
Time: 12.2s
Alternatives: 13
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 93.4% 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.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{t - z}{\frac{a}{y}} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (- t z) (/ a y))))
double code(double x, double y, double z, double t, double a) {
	return x + ((t - z) / (a / y));
}
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 + ((t - z) / (a / y))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((t - z) / (a / y));
}
def code(x, y, z, t, a):
	return x + ((t - z) / (a / y))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(t - z) / Float64(a / y)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((t - z) / (a / y));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{t - z}{\frac{a}{y}}
\end{array}
Derivation
  1. Initial program 92.2%

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

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

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

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

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

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

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

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

Alternative 2: 47.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z}{a} \cdot \left(-y\right)\\ \mathbf{if}\;a \leq -3.5 \cdot 10^{+73}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-274}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-159}:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \mathbf{elif}\;a \leq 1400:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.04 \cdot 10^{+142}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (/ z a) (- y))))
   (if (<= a -3.5e+73)
     x
     (if (<= a 1.25e-274)
       t_1
       (if (<= a 1.25e-159)
         (/ (* t y) a)
         (if (<= a 1400.0)
           t_1
           (if (<= a 6.5e+70)
             x
             (if (<= a 2.6e+80)
               t_1
               (if (<= a 1.04e+142) (* y (/ t a)) x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (z / a) * -y;
	double tmp;
	if (a <= -3.5e+73) {
		tmp = x;
	} else if (a <= 1.25e-274) {
		tmp = t_1;
	} else if (a <= 1.25e-159) {
		tmp = (t * y) / a;
	} else if (a <= 1400.0) {
		tmp = t_1;
	} else if (a <= 6.5e+70) {
		tmp = x;
	} else if (a <= 2.6e+80) {
		tmp = t_1;
	} else if (a <= 1.04e+142) {
		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) :: t_1
    real(8) :: tmp
    t_1 = (z / a) * -y
    if (a <= (-3.5d+73)) then
        tmp = x
    else if (a <= 1.25d-274) then
        tmp = t_1
    else if (a <= 1.25d-159) then
        tmp = (t * y) / a
    else if (a <= 1400.0d0) then
        tmp = t_1
    else if (a <= 6.5d+70) then
        tmp = x
    else if (a <= 2.6d+80) then
        tmp = t_1
    else if (a <= 1.04d+142) 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 t_1 = (z / a) * -y;
	double tmp;
	if (a <= -3.5e+73) {
		tmp = x;
	} else if (a <= 1.25e-274) {
		tmp = t_1;
	} else if (a <= 1.25e-159) {
		tmp = (t * y) / a;
	} else if (a <= 1400.0) {
		tmp = t_1;
	} else if (a <= 6.5e+70) {
		tmp = x;
	} else if (a <= 2.6e+80) {
		tmp = t_1;
	} else if (a <= 1.04e+142) {
		tmp = y * (t / a);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (z / a) * -y
	tmp = 0
	if a <= -3.5e+73:
		tmp = x
	elif a <= 1.25e-274:
		tmp = t_1
	elif a <= 1.25e-159:
		tmp = (t * y) / a
	elif a <= 1400.0:
		tmp = t_1
	elif a <= 6.5e+70:
		tmp = x
	elif a <= 2.6e+80:
		tmp = t_1
	elif a <= 1.04e+142:
		tmp = y * (t / a)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(z / a) * Float64(-y))
	tmp = 0.0
	if (a <= -3.5e+73)
		tmp = x;
	elseif (a <= 1.25e-274)
		tmp = t_1;
	elseif (a <= 1.25e-159)
		tmp = Float64(Float64(t * y) / a);
	elseif (a <= 1400.0)
		tmp = t_1;
	elseif (a <= 6.5e+70)
		tmp = x;
	elseif (a <= 2.6e+80)
		tmp = t_1;
	elseif (a <= 1.04e+142)
		tmp = Float64(y * Float64(t / a));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (z / a) * -y;
	tmp = 0.0;
	if (a <= -3.5e+73)
		tmp = x;
	elseif (a <= 1.25e-274)
		tmp = t_1;
	elseif (a <= 1.25e-159)
		tmp = (t * y) / a;
	elseif (a <= 1400.0)
		tmp = t_1;
	elseif (a <= 6.5e+70)
		tmp = x;
	elseif (a <= 2.6e+80)
		tmp = t_1;
	elseif (a <= 1.04e+142)
		tmp = y * (t / a);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / a), $MachinePrecision] * (-y)), $MachinePrecision]}, If[LessEqual[a, -3.5e+73], x, If[LessEqual[a, 1.25e-274], t$95$1, If[LessEqual[a, 1.25e-159], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, 1400.0], t$95$1, If[LessEqual[a, 6.5e+70], x, If[LessEqual[a, 2.6e+80], t$95$1, If[LessEqual[a, 1.04e+142], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], x]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-274}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-159}:\\
\;\;\;\;\frac{t \cdot y}{a}\\

\mathbf{elif}\;a \leq 1400:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 6.5 \cdot 10^{+70}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.6 \cdot 10^{+80}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.04 \cdot 10^{+142}:\\
\;\;\;\;y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.50000000000000002e73 or 1400 < a < 6.49999999999999978e70 or 1.04e142 < a

    1. Initial program 87.5%

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

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

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

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

    if -3.50000000000000002e73 < a < 1.25e-274 or 1.25000000000000008e-159 < a < 1400 or 6.49999999999999978e70 < a < 2.59999999999999982e80

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.25e-274 < a < 1.25000000000000008e-159

    1. Initial program 99.8%

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

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

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

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

    if 2.59999999999999982e80 < a < 1.04e142

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+73}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-274}:\\ \;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-159}:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \mathbf{elif}\;a \leq 1400:\\ \;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+80}:\\ \;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\ \mathbf{elif}\;a \leq 1.04 \cdot 10^{+142}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 49.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{y}{-a}\\ \mathbf{if}\;a \leq -3.8 \cdot 10^{+73}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-273}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{-159}:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-9}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+81}:\\ \;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+143}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* z (/ y (- a)))))
   (if (<= a -3.8e+73)
     x
     (if (<= a 1.15e-273)
       t_1
       (if (<= a 1.12e-159)
         (/ (* t y) a)
         (if (<= a 9.5e-9)
           t_1
           (if (<= a 8.2e+70)
             x
             (if (<= a 3.1e+81)
               (* (/ z a) (- y))
               (if (<= a 3.3e+143) (* y (/ t a)) x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z * (y / -a);
	double tmp;
	if (a <= -3.8e+73) {
		tmp = x;
	} else if (a <= 1.15e-273) {
		tmp = t_1;
	} else if (a <= 1.12e-159) {
		tmp = (t * y) / a;
	} else if (a <= 9.5e-9) {
		tmp = t_1;
	} else if (a <= 8.2e+70) {
		tmp = x;
	} else if (a <= 3.1e+81) {
		tmp = (z / a) * -y;
	} else if (a <= 3.3e+143) {
		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) :: t_1
    real(8) :: tmp
    t_1 = z * (y / -a)
    if (a <= (-3.8d+73)) then
        tmp = x
    else if (a <= 1.15d-273) then
        tmp = t_1
    else if (a <= 1.12d-159) then
        tmp = (t * y) / a
    else if (a <= 9.5d-9) then
        tmp = t_1
    else if (a <= 8.2d+70) then
        tmp = x
    else if (a <= 3.1d+81) then
        tmp = (z / a) * -y
    else if (a <= 3.3d+143) 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 t_1 = z * (y / -a);
	double tmp;
	if (a <= -3.8e+73) {
		tmp = x;
	} else if (a <= 1.15e-273) {
		tmp = t_1;
	} else if (a <= 1.12e-159) {
		tmp = (t * y) / a;
	} else if (a <= 9.5e-9) {
		tmp = t_1;
	} else if (a <= 8.2e+70) {
		tmp = x;
	} else if (a <= 3.1e+81) {
		tmp = (z / a) * -y;
	} else if (a <= 3.3e+143) {
		tmp = y * (t / a);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z * (y / -a)
	tmp = 0
	if a <= -3.8e+73:
		tmp = x
	elif a <= 1.15e-273:
		tmp = t_1
	elif a <= 1.12e-159:
		tmp = (t * y) / a
	elif a <= 9.5e-9:
		tmp = t_1
	elif a <= 8.2e+70:
		tmp = x
	elif a <= 3.1e+81:
		tmp = (z / a) * -y
	elif a <= 3.3e+143:
		tmp = y * (t / a)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z * Float64(y / Float64(-a)))
	tmp = 0.0
	if (a <= -3.8e+73)
		tmp = x;
	elseif (a <= 1.15e-273)
		tmp = t_1;
	elseif (a <= 1.12e-159)
		tmp = Float64(Float64(t * y) / a);
	elseif (a <= 9.5e-9)
		tmp = t_1;
	elseif (a <= 8.2e+70)
		tmp = x;
	elseif (a <= 3.1e+81)
		tmp = Float64(Float64(z / a) * Float64(-y));
	elseif (a <= 3.3e+143)
		tmp = Float64(y * Float64(t / a));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = z * (y / -a);
	tmp = 0.0;
	if (a <= -3.8e+73)
		tmp = x;
	elseif (a <= 1.15e-273)
		tmp = t_1;
	elseif (a <= 1.12e-159)
		tmp = (t * y) / a;
	elseif (a <= 9.5e-9)
		tmp = t_1;
	elseif (a <= 8.2e+70)
		tmp = x;
	elseif (a <= 3.1e+81)
		tmp = (z / a) * -y;
	elseif (a <= 3.3e+143)
		tmp = y * (t / a);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.8e+73], x, If[LessEqual[a, 1.15e-273], t$95$1, If[LessEqual[a, 1.12e-159], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, 9.5e-9], t$95$1, If[LessEqual[a, 8.2e+70], x, If[LessEqual[a, 3.1e+81], N[(N[(z / a), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[a, 3.3e+143], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], x]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 1.15 \cdot 10^{-273}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.12 \cdot 10^{-159}:\\
\;\;\;\;\frac{t \cdot y}{a}\\

\mathbf{elif}\;a \leq 9.5 \cdot 10^{-9}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 8.2 \cdot 10^{+70}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 3.3 \cdot 10^{+143}:\\
\;\;\;\;y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.80000000000000022e73 or 9.5000000000000007e-9 < a < 8.2000000000000004e70 or 3.3e143 < a

    1. Initial program 87.5%

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

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

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

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

    if -3.80000000000000022e73 < a < 1.1499999999999999e-273 or 1.12000000000000006e-159 < a < 9.5000000000000007e-9

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1499999999999999e-273 < a < 1.12000000000000006e-159

    1. Initial program 99.8%

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

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

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

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

    if 8.2000000000000004e70 < a < 3.1e81

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.1e81 < a < 3.3e143

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+73}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-273}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{-159}:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-9}:\\ \;\;\;\;z \cdot \frac{y}{-a}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+81}:\\ \;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+143}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 78.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + t \cdot \frac{y}{a}\\ t_2 := \frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{if}\;z \leq -1.1 \cdot 10^{+18}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+120}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+168}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+223}:\\ \;\;\;\;\frac{-z}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* t (/ y a)))) (t_2 (* (/ y a) (- t z))))
   (if (<= z -1.1e+18)
     t_2
     (if (<= z 1.05e+64)
       t_1
       (if (<= z 4.8e+120)
         t_2
         (if (<= z 3.3e+168) t_1 (if (<= z 2e+223) (/ (- z) (/ a y)) t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t * (y / a));
	double t_2 = (y / a) * (t - z);
	double tmp;
	if (z <= -1.1e+18) {
		tmp = t_2;
	} else if (z <= 1.05e+64) {
		tmp = t_1;
	} else if (z <= 4.8e+120) {
		tmp = t_2;
	} else if (z <= 3.3e+168) {
		tmp = t_1;
	} else if (z <= 2e+223) {
		tmp = -z / (a / y);
	} 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 = x + (t * (y / a))
    t_2 = (y / a) * (t - z)
    if (z <= (-1.1d+18)) then
        tmp = t_2
    else if (z <= 1.05d+64) then
        tmp = t_1
    else if (z <= 4.8d+120) then
        tmp = t_2
    else if (z <= 3.3d+168) then
        tmp = t_1
    else if (z <= 2d+223) then
        tmp = -z / (a / y)
    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 = x + (t * (y / a));
	double t_2 = (y / a) * (t - z);
	double tmp;
	if (z <= -1.1e+18) {
		tmp = t_2;
	} else if (z <= 1.05e+64) {
		tmp = t_1;
	} else if (z <= 4.8e+120) {
		tmp = t_2;
	} else if (z <= 3.3e+168) {
		tmp = t_1;
	} else if (z <= 2e+223) {
		tmp = -z / (a / y);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t * (y / a))
	t_2 = (y / a) * (t - z)
	tmp = 0
	if z <= -1.1e+18:
		tmp = t_2
	elif z <= 1.05e+64:
		tmp = t_1
	elif z <= 4.8e+120:
		tmp = t_2
	elif z <= 3.3e+168:
		tmp = t_1
	elif z <= 2e+223:
		tmp = -z / (a / y)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t * Float64(y / a)))
	t_2 = Float64(Float64(y / a) * Float64(t - z))
	tmp = 0.0
	if (z <= -1.1e+18)
		tmp = t_2;
	elseif (z <= 1.05e+64)
		tmp = t_1;
	elseif (z <= 4.8e+120)
		tmp = t_2;
	elseif (z <= 3.3e+168)
		tmp = t_1;
	elseif (z <= 2e+223)
		tmp = Float64(Float64(-z) / Float64(a / y));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t * (y / a));
	t_2 = (y / a) * (t - z);
	tmp = 0.0;
	if (z <= -1.1e+18)
		tmp = t_2;
	elseif (z <= 1.05e+64)
		tmp = t_1;
	elseif (z <= 4.8e+120)
		tmp = t_2;
	elseif (z <= 3.3e+168)
		tmp = t_1;
	elseif (z <= 2e+223)
		tmp = -z / (a / y);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+18], t$95$2, If[LessEqual[z, 1.05e+64], t$95$1, If[LessEqual[z, 4.8e+120], t$95$2, If[LessEqual[z, 3.3e+168], t$95$1, If[LessEqual[z, 2e+223], N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.05 \cdot 10^{+64}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+120}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 3.3 \cdot 10^{+168}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2 \cdot 10^{+223}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.1e18 or 1.05e64 < z < 4.80000000000000002e120 or 2.00000000000000009e223 < z

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a} - \frac{z}{a}\right)} \]
      12. distribute-rgt-out--69.2%

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

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

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

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

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

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

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

    if -1.1e18 < z < 1.05e64 or 4.80000000000000002e120 < z < 3.2999999999999999e168

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

    if 3.2999999999999999e168 < z < 2.00000000000000009e223

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+18}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+64}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+120}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+168}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+223}:\\ \;\;\;\;\frac{-z}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \end{array} \]

Alternative 5: 78.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{if}\;z \leq -6.2 \cdot 10^{+22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{+63}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+120}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+167}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+229}:\\ \;\;\;\;\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 z))))
   (if (<= z -6.2e+22)
     t_1
     (if (<= z 6.4e+63)
       (+ x (/ t (/ a y)))
       (if (<= z 4.4e+120)
         t_1
         (if (<= z 4.6e+167)
           (+ x (* t (/ y a)))
           (if (<= z 7.2e+229) (/ (- z) (/ a y)) t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y / a) * (t - z);
	double tmp;
	if (z <= -6.2e+22) {
		tmp = t_1;
	} else if (z <= 6.4e+63) {
		tmp = x + (t / (a / y));
	} else if (z <= 4.4e+120) {
		tmp = t_1;
	} else if (z <= 4.6e+167) {
		tmp = x + (t * (y / a));
	} else if (z <= 7.2e+229) {
		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 - z)
    if (z <= (-6.2d+22)) then
        tmp = t_1
    else if (z <= 6.4d+63) then
        tmp = x + (t / (a / y))
    else if (z <= 4.4d+120) then
        tmp = t_1
    else if (z <= 4.6d+167) then
        tmp = x + (t * (y / a))
    else if (z <= 7.2d+229) 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 - z);
	double tmp;
	if (z <= -6.2e+22) {
		tmp = t_1;
	} else if (z <= 6.4e+63) {
		tmp = x + (t / (a / y));
	} else if (z <= 4.4e+120) {
		tmp = t_1;
	} else if (z <= 4.6e+167) {
		tmp = x + (t * (y / a));
	} else if (z <= 7.2e+229) {
		tmp = -z / (a / y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y / a) * (t - z)
	tmp = 0
	if z <= -6.2e+22:
		tmp = t_1
	elif z <= 6.4e+63:
		tmp = x + (t / (a / y))
	elif z <= 4.4e+120:
		tmp = t_1
	elif z <= 4.6e+167:
		tmp = x + (t * (y / a))
	elif z <= 7.2e+229:
		tmp = -z / (a / y)
	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 (z <= -6.2e+22)
		tmp = t_1;
	elseif (z <= 6.4e+63)
		tmp = Float64(x + Float64(t / Float64(a / y)));
	elseif (z <= 4.4e+120)
		tmp = t_1;
	elseif (z <= 4.6e+167)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	elseif (z <= 7.2e+229)
		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 - z);
	tmp = 0.0;
	if (z <= -6.2e+22)
		tmp = t_1;
	elseif (z <= 6.4e+63)
		tmp = x + (t / (a / y));
	elseif (z <= 4.4e+120)
		tmp = t_1;
	elseif (z <= 4.6e+167)
		tmp = x + (t * (y / a));
	elseif (z <= 7.2e+229)
		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] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e+22], t$95$1, If[LessEqual[z, 6.4e+63], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+120], t$95$1, If[LessEqual[z, 4.6e+167], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+229], N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+120}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 7.2 \cdot 10^{+229}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.2000000000000004e22 or 6.40000000000000022e63 < z < 4.4000000000000003e120 or 7.19999999999999973e229 < z

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a} - \frac{z}{a}\right)} \]
      12. distribute-rgt-out--69.2%

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

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

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

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

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

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

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

    if -6.2000000000000004e22 < z < 6.40000000000000022e63

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} + x \]
      2. div-inv87.7%

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

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

    if 4.4000000000000003e120 < z < 4.59999999999999976e167

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

    if 4.59999999999999976e167 < z < 7.19999999999999973e229

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{+22}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{+63}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+120}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+167}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+229}:\\ \;\;\;\;\frac{-z}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \end{array} \]

Alternative 6: 67.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.4 \cdot 10^{-194} \lor \neg \left(y \leq 5.2 \cdot 10^{-91}\right) \land \left(y \leq 1.2 \cdot 10^{-27} \lor \neg \left(y \leq 8.5 \cdot 10^{-20}\right)\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.4000000000000005e-194 or 5.20000000000000028e-91 < y < 1.20000000000000001e-27 or 8.5000000000000005e-20 < y

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.4000000000000005e-194 < y < 5.20000000000000028e-91 or 1.20000000000000001e-27 < y < 8.5000000000000005e-20

    1. Initial program 98.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.4 \cdot 10^{-194} \lor \neg \left(y \leq 5.2 \cdot 10^{-91}\right) \land \left(y \leq 1.2 \cdot 10^{-27} \lor \neg \left(y \leq 8.5 \cdot 10^{-20}\right)\right):\\ \;\;\;\;y \cdot \frac{t - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 7: 67.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{if}\;y \leq -9 \cdot 10^{-194}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-93}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-28}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - z}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (/ y a) (- t z))))
   (if (<= y -9e-194)
     t_1
     (if (<= y 3.4e-93)
       x
       (if (<= y 9.5e-28) t_1 (if (<= y 5.8e-20) x (* y (/ (- t z) a))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y / a) * (t - z);
	double tmp;
	if (y <= -9e-194) {
		tmp = t_1;
	} else if (y <= 3.4e-93) {
		tmp = x;
	} else if (y <= 9.5e-28) {
		tmp = t_1;
	} else if (y <= 5.8e-20) {
		tmp = x;
	} else {
		tmp = y * ((t - z) / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y / a) * (t - z)
    if (y <= (-9d-194)) then
        tmp = t_1
    else if (y <= 3.4d-93) then
        tmp = x
    else if (y <= 9.5d-28) then
        tmp = t_1
    else if (y <= 5.8d-20) then
        tmp = x
    else
        tmp = y * ((t - z) / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y / a) * (t - z);
	double tmp;
	if (y <= -9e-194) {
		tmp = t_1;
	} else if (y <= 3.4e-93) {
		tmp = x;
	} else if (y <= 9.5e-28) {
		tmp = t_1;
	} else if (y <= 5.8e-20) {
		tmp = x;
	} else {
		tmp = y * ((t - z) / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y / a) * (t - z)
	tmp = 0
	if y <= -9e-194:
		tmp = t_1
	elif y <= 3.4e-93:
		tmp = x
	elif y <= 9.5e-28:
		tmp = t_1
	elif y <= 5.8e-20:
		tmp = x
	else:
		tmp = y * ((t - z) / a)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y / a) * Float64(t - z))
	tmp = 0.0
	if (y <= -9e-194)
		tmp = t_1;
	elseif (y <= 3.4e-93)
		tmp = x;
	elseif (y <= 9.5e-28)
		tmp = t_1;
	elseif (y <= 5.8e-20)
		tmp = x;
	else
		tmp = Float64(y * Float64(Float64(t - z) / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y / a) * (t - z);
	tmp = 0.0;
	if (y <= -9e-194)
		tmp = t_1;
	elseif (y <= 3.4e-93)
		tmp = x;
	elseif (y <= 9.5e-28)
		tmp = t_1;
	elseif (y <= 5.8e-20)
		tmp = x;
	else
		tmp = y * ((t - z) / a);
	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[y, -9e-194], t$95$1, If[LessEqual[y, 3.4e-93], x, If[LessEqual[y, 9.5e-28], t$95$1, If[LessEqual[y, 5.8e-20], x, N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 3.4 \cdot 10^{-93}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 9.5 \cdot 10^{-28}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{-20}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.9999999999999997e-194 or 3.40000000000000001e-93 < y < 9.50000000000000001e-28

    1. Initial program 94.3%

      \[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. Step-by-step derivation
      1. *-commutative97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a} - \frac{z}{a}\right)} \]
      12. distribute-rgt-out--59.2%

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

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

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

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

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

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

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

    if -8.9999999999999997e-194 < y < 3.40000000000000001e-93 or 9.50000000000000001e-28 < y < 5.8e-20

    1. Initial program 98.4%

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

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

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

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

    if 5.8e-20 < y

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{-194}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-93}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-28}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - z}{a}\\ \end{array} \]

Alternative 8: 76.4% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.0000000000000001e-84 or 6.2000000000000001e63 < z

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a} - \frac{z}{a}\right)} \]
      12. distribute-rgt-out--61.9%

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

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

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

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

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

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

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

    if -2.0000000000000001e-84 < z < 6.2000000000000001e63

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 84.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-84} \lor \neg \left(z \leq 3.6 \cdot 10^{-36}\right):\\
\;\;\;\;x - z \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.0000000000000001e-84 or 3.60000000000000032e-36 < z

    1. Initial program 90.9%

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

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

      \[\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. associate-*l/84.9%

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

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

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

    if -2.0000000000000001e-84 < z < 3.60000000000000032e-36

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 51.1% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.6e54 or 1.8e-55 < a

    1. Initial program 87.0%

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

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

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

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

    if -6.6e54 < a < 1.8e-55

    1. Initial program 98.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.6 \cdot 10^{+54}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-55}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 51.0% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.42e56 or 4.3999999999999999e-54 < a

    1. Initial program 87.0%

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

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

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

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

    if -1.42e56 < a < 4.3999999999999999e-54

    1. Initial program 98.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.42 \cdot 10^{+56}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-54}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 12: 97.0% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 13: 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 92.2%

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

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

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

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

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