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

Percentage Accurate: 93.0% → 97.2%
Time: 9.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.0% 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.2% 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 91.8%

    \[x - \frac{y \cdot \left(z - t\right)}{a} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. *-commutative91.8%

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

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

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

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

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

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

    \[\leadsto x + \frac{t - z}{\frac{a}{y}} \]
  8. Add Preprocessing

Alternative 2: 50.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\frac{a}{y}}\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{+79}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq -9.4 \cdot 10^{-67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-184}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-196}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-108}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-53}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-11}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+31}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\frac{a}{-y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ t (/ a y))))
   (if (<= z -3.1e+79)
     (* (/ y a) (- z))
     (if (<= z -9.4e-67)
       t_1
       (if (<= z -1.75e-184)
         x
         (if (<= z -3e-196)
           (* y (/ t a))
           (if (<= z 1.3e-108)
             x
             (if (<= z 5.2e-55)
               t_1
               (if (<= z 1.65e-53)
                 x
                 (if (<= z 9e-11)
                   (/ y (/ a t))
                   (if (<= z 7e+31) x (/ z (/ a (- y))))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t / (a / y);
	double tmp;
	if (z <= -3.1e+79) {
		tmp = (y / a) * -z;
	} else if (z <= -9.4e-67) {
		tmp = t_1;
	} else if (z <= -1.75e-184) {
		tmp = x;
	} else if (z <= -3e-196) {
		tmp = y * (t / a);
	} else if (z <= 1.3e-108) {
		tmp = x;
	} else if (z <= 5.2e-55) {
		tmp = t_1;
	} else if (z <= 1.65e-53) {
		tmp = x;
	} else if (z <= 9e-11) {
		tmp = y / (a / t);
	} else if (z <= 7e+31) {
		tmp = x;
	} else {
		tmp = z / (a / -y);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t / (a / y)
    if (z <= (-3.1d+79)) then
        tmp = (y / a) * -z
    else if (z <= (-9.4d-67)) then
        tmp = t_1
    else if (z <= (-1.75d-184)) then
        tmp = x
    else if (z <= (-3d-196)) then
        tmp = y * (t / a)
    else if (z <= 1.3d-108) then
        tmp = x
    else if (z <= 5.2d-55) then
        tmp = t_1
    else if (z <= 1.65d-53) then
        tmp = x
    else if (z <= 9d-11) then
        tmp = y / (a / t)
    else if (z <= 7d+31) then
        tmp = x
    else
        tmp = z / (a / -y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t / (a / y);
	double tmp;
	if (z <= -3.1e+79) {
		tmp = (y / a) * -z;
	} else if (z <= -9.4e-67) {
		tmp = t_1;
	} else if (z <= -1.75e-184) {
		tmp = x;
	} else if (z <= -3e-196) {
		tmp = y * (t / a);
	} else if (z <= 1.3e-108) {
		tmp = x;
	} else if (z <= 5.2e-55) {
		tmp = t_1;
	} else if (z <= 1.65e-53) {
		tmp = x;
	} else if (z <= 9e-11) {
		tmp = y / (a / t);
	} else if (z <= 7e+31) {
		tmp = x;
	} else {
		tmp = z / (a / -y);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t / (a / y)
	tmp = 0
	if z <= -3.1e+79:
		tmp = (y / a) * -z
	elif z <= -9.4e-67:
		tmp = t_1
	elif z <= -1.75e-184:
		tmp = x
	elif z <= -3e-196:
		tmp = y * (t / a)
	elif z <= 1.3e-108:
		tmp = x
	elif z <= 5.2e-55:
		tmp = t_1
	elif z <= 1.65e-53:
		tmp = x
	elif z <= 9e-11:
		tmp = y / (a / t)
	elif z <= 7e+31:
		tmp = x
	else:
		tmp = z / (a / -y)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t / Float64(a / y))
	tmp = 0.0
	if (z <= -3.1e+79)
		tmp = Float64(Float64(y / a) * Float64(-z));
	elseif (z <= -9.4e-67)
		tmp = t_1;
	elseif (z <= -1.75e-184)
		tmp = x;
	elseif (z <= -3e-196)
		tmp = Float64(y * Float64(t / a));
	elseif (z <= 1.3e-108)
		tmp = x;
	elseif (z <= 5.2e-55)
		tmp = t_1;
	elseif (z <= 1.65e-53)
		tmp = x;
	elseif (z <= 9e-11)
		tmp = Float64(y / Float64(a / t));
	elseif (z <= 7e+31)
		tmp = x;
	else
		tmp = Float64(z / Float64(a / Float64(-y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t / (a / y);
	tmp = 0.0;
	if (z <= -3.1e+79)
		tmp = (y / a) * -z;
	elseif (z <= -9.4e-67)
		tmp = t_1;
	elseif (z <= -1.75e-184)
		tmp = x;
	elseif (z <= -3e-196)
		tmp = y * (t / a);
	elseif (z <= 1.3e-108)
		tmp = x;
	elseif (z <= 5.2e-55)
		tmp = t_1;
	elseif (z <= 1.65e-53)
		tmp = x;
	elseif (z <= 9e-11)
		tmp = y / (a / t);
	elseif (z <= 7e+31)
		tmp = x;
	else
		tmp = z / (a / -y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+79], N[(N[(y / a), $MachinePrecision] * (-z)), $MachinePrecision], If[LessEqual[z, -9.4e-67], t$95$1, If[LessEqual[z, -1.75e-184], x, If[LessEqual[z, -3e-196], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e-108], x, If[LessEqual[z, 5.2e-55], t$95$1, If[LessEqual[z, 1.65e-53], x, If[LessEqual[z, 9e-11], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+31], x, N[(z / N[(a / (-y)), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -9.4 \cdot 10^{-67}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.75 \cdot 10^{-184}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 1.3 \cdot 10^{-108}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.2 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.65 \cdot 10^{-53}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 7 \cdot 10^{+31}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -3.0999999999999999e79

    1. Initial program 89.0%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative89.0%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a}} \]
      2. distribute-neg-frac263.0%

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

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

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

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

    if -3.0999999999999999e79 < z < -9.40000000000000009e-67 or 1.29999999999999992e-108 < z < 5.1999999999999998e-55

    1. Initial program 88.0%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 42.6%

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

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

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

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

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

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

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

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

    if -9.40000000000000009e-67 < z < -1.74999999999999991e-184 or -3e-196 < z < 1.29999999999999992e-108 or 5.1999999999999998e-55 < z < 1.65000000000000002e-53 or 8.9999999999999999e-11 < z < 7e31

    1. Initial program 96.2%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 60.8%

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

    if -1.74999999999999991e-184 < z < -3e-196

    1. Initial program 81.0%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 61.6%

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

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

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

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

    if 1.65000000000000002e-53 < z < 8.9999999999999999e-11

    1. Initial program 89.7%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 44.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{a} \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative54.5%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    11. Applied egg-rr54.7%

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

    if 7e31 < z

    1. Initial program 89.8%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-z\right) \cdot \frac{y}{a}} \]
    10. Step-by-step derivation
      1. clear-num68.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{z}}{-\frac{a}{y}} \]
      14. distribute-neg-frac268.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+79}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq -9.4 \cdot 10^{-67}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-184}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-196}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-108}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-55}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-53}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-11}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+31}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\frac{a}{-y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 50.0% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\frac{a}{y}}\\ t_2 := \frac{y}{a} \cdot \left(-z\right)\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{+79}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-185}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -5.9 \cdot 10^{-198}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-108}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-53}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-8}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+20}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ t (/ a y))) (t_2 (* (/ y a) (- z))))
   (if (<= z -3.1e+79)
     t_2
     (if (<= z -4.7e-67)
       t_1
       (if (<= z -1.8e-185)
         x
         (if (<= z -5.9e-198)
           (* y (/ t a))
           (if (<= z 4.3e-108)
             x
             (if (<= z 5.4e-55)
               t_1
               (if (<= z 5e-53)
                 x
                 (if (<= z 1.45e-8)
                   (/ y (/ a t))
                   (if (<= z 5.5e+20) x t_2)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t / (a / y);
	double t_2 = (y / a) * -z;
	double tmp;
	if (z <= -3.1e+79) {
		tmp = t_2;
	} else if (z <= -4.7e-67) {
		tmp = t_1;
	} else if (z <= -1.8e-185) {
		tmp = x;
	} else if (z <= -5.9e-198) {
		tmp = y * (t / a);
	} else if (z <= 4.3e-108) {
		tmp = x;
	} else if (z <= 5.4e-55) {
		tmp = t_1;
	} else if (z <= 5e-53) {
		tmp = x;
	} else if (z <= 1.45e-8) {
		tmp = y / (a / t);
	} else if (z <= 5.5e+20) {
		tmp = x;
	} 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 = t / (a / y)
    t_2 = (y / a) * -z
    if (z <= (-3.1d+79)) then
        tmp = t_2
    else if (z <= (-4.7d-67)) then
        tmp = t_1
    else if (z <= (-1.8d-185)) then
        tmp = x
    else if (z <= (-5.9d-198)) then
        tmp = y * (t / a)
    else if (z <= 4.3d-108) then
        tmp = x
    else if (z <= 5.4d-55) then
        tmp = t_1
    else if (z <= 5d-53) then
        tmp = x
    else if (z <= 1.45d-8) then
        tmp = y / (a / t)
    else if (z <= 5.5d+20) then
        tmp = x
    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 = t / (a / y);
	double t_2 = (y / a) * -z;
	double tmp;
	if (z <= -3.1e+79) {
		tmp = t_2;
	} else if (z <= -4.7e-67) {
		tmp = t_1;
	} else if (z <= -1.8e-185) {
		tmp = x;
	} else if (z <= -5.9e-198) {
		tmp = y * (t / a);
	} else if (z <= 4.3e-108) {
		tmp = x;
	} else if (z <= 5.4e-55) {
		tmp = t_1;
	} else if (z <= 5e-53) {
		tmp = x;
	} else if (z <= 1.45e-8) {
		tmp = y / (a / t);
	} else if (z <= 5.5e+20) {
		tmp = x;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t / (a / y)
	t_2 = (y / a) * -z
	tmp = 0
	if z <= -3.1e+79:
		tmp = t_2
	elif z <= -4.7e-67:
		tmp = t_1
	elif z <= -1.8e-185:
		tmp = x
	elif z <= -5.9e-198:
		tmp = y * (t / a)
	elif z <= 4.3e-108:
		tmp = x
	elif z <= 5.4e-55:
		tmp = t_1
	elif z <= 5e-53:
		tmp = x
	elif z <= 1.45e-8:
		tmp = y / (a / t)
	elif z <= 5.5e+20:
		tmp = x
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t / Float64(a / y))
	t_2 = Float64(Float64(y / a) * Float64(-z))
	tmp = 0.0
	if (z <= -3.1e+79)
		tmp = t_2;
	elseif (z <= -4.7e-67)
		tmp = t_1;
	elseif (z <= -1.8e-185)
		tmp = x;
	elseif (z <= -5.9e-198)
		tmp = Float64(y * Float64(t / a));
	elseif (z <= 4.3e-108)
		tmp = x;
	elseif (z <= 5.4e-55)
		tmp = t_1;
	elseif (z <= 5e-53)
		tmp = x;
	elseif (z <= 1.45e-8)
		tmp = Float64(y / Float64(a / t));
	elseif (z <= 5.5e+20)
		tmp = x;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t / (a / y);
	t_2 = (y / a) * -z;
	tmp = 0.0;
	if (z <= -3.1e+79)
		tmp = t_2;
	elseif (z <= -4.7e-67)
		tmp = t_1;
	elseif (z <= -1.8e-185)
		tmp = x;
	elseif (z <= -5.9e-198)
		tmp = y * (t / a);
	elseif (z <= 4.3e-108)
		tmp = x;
	elseif (z <= 5.4e-55)
		tmp = t_1;
	elseif (z <= 5e-53)
		tmp = x;
	elseif (z <= 1.45e-8)
		tmp = y / (a / t);
	elseif (z <= 5.5e+20)
		tmp = x;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / a), $MachinePrecision] * (-z)), $MachinePrecision]}, If[LessEqual[z, -3.1e+79], t$95$2, If[LessEqual[z, -4.7e-67], t$95$1, If[LessEqual[z, -1.8e-185], x, If[LessEqual[z, -5.9e-198], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.3e-108], x, If[LessEqual[z, 5.4e-55], t$95$1, If[LessEqual[z, 5e-53], x, If[LessEqual[z, 1.45e-8], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+20], x, t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.7 \cdot 10^{-67}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.8 \cdot 10^{-185}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 4.3 \cdot 10^{-108}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.4 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 5 \cdot 10^{-53}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 5.5 \cdot 10^{+20}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.0999999999999999e79 or 5.5e20 < z

    1. Initial program 89.4%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative89.4%

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

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

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

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

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

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

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

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

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

    if -3.0999999999999999e79 < z < -4.70000000000000004e-67 or 4.3e-108 < z < 5.40000000000000008e-55

    1. Initial program 88.0%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 42.6%

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

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

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

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

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

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

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

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

    if -4.70000000000000004e-67 < z < -1.7999999999999999e-185 or -5.89999999999999974e-198 < z < 4.3e-108 or 5.40000000000000008e-55 < z < 5e-53 or 1.4500000000000001e-8 < z < 5.5e20

    1. Initial program 96.2%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 60.8%

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

    if -1.7999999999999999e-185 < z < -5.89999999999999974e-198

    1. Initial program 81.0%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 61.6%

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

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

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

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

    if 5e-53 < z < 1.4500000000000001e-8

    1. Initial program 89.7%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 44.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{a} \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative54.5%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    11. Applied egg-rr54.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+79}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-67}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-185}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -5.9 \cdot 10^{-198}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-108}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-55}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-53}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-8}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+20}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 50.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a}\\ t_2 := y \cdot \frac{z}{-a}\\ \mathbf{if}\;y \leq -4.75 \cdot 10^{+58}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-21}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 380:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+49}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+161}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+191}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+191}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+226}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y a))) (t_2 (* y (/ z (- a)))))
   (if (<= y -4.75e+58)
     t_2
     (if (<= y -4.5e-21)
       t_1
       (if (<= y 380.0)
         x
         (if (<= y 2.8e+49)
           (* y (/ t a))
           (if (<= y 3.2e+161)
             t_2
             (if (<= y 7.8e+191)
               (/ t (/ a y))
               (if (<= y 8e+191) x (if (<= y 5.8e+226) t_2 t_1))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double t_2 = y * (z / -a);
	double tmp;
	if (y <= -4.75e+58) {
		tmp = t_2;
	} else if (y <= -4.5e-21) {
		tmp = t_1;
	} else if (y <= 380.0) {
		tmp = x;
	} else if (y <= 2.8e+49) {
		tmp = y * (t / a);
	} else if (y <= 3.2e+161) {
		tmp = t_2;
	} else if (y <= 7.8e+191) {
		tmp = t / (a / y);
	} else if (y <= 8e+191) {
		tmp = x;
	} else if (y <= 5.8e+226) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = t * (y / a)
    t_2 = y * (z / -a)
    if (y <= (-4.75d+58)) then
        tmp = t_2
    else if (y <= (-4.5d-21)) then
        tmp = t_1
    else if (y <= 380.0d0) then
        tmp = x
    else if (y <= 2.8d+49) then
        tmp = y * (t / a)
    else if (y <= 3.2d+161) then
        tmp = t_2
    else if (y <= 7.8d+191) then
        tmp = t / (a / y)
    else if (y <= 8d+191) then
        tmp = x
    else if (y <= 5.8d+226) then
        tmp = t_2
    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 = t * (y / a);
	double t_2 = y * (z / -a);
	double tmp;
	if (y <= -4.75e+58) {
		tmp = t_2;
	} else if (y <= -4.5e-21) {
		tmp = t_1;
	} else if (y <= 380.0) {
		tmp = x;
	} else if (y <= 2.8e+49) {
		tmp = y * (t / a);
	} else if (y <= 3.2e+161) {
		tmp = t_2;
	} else if (y <= 7.8e+191) {
		tmp = t / (a / y);
	} else if (y <= 8e+191) {
		tmp = x;
	} else if (y <= 5.8e+226) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / a)
	t_2 = y * (z / -a)
	tmp = 0
	if y <= -4.75e+58:
		tmp = t_2
	elif y <= -4.5e-21:
		tmp = t_1
	elif y <= 380.0:
		tmp = x
	elif y <= 2.8e+49:
		tmp = y * (t / a)
	elif y <= 3.2e+161:
		tmp = t_2
	elif y <= 7.8e+191:
		tmp = t / (a / y)
	elif y <= 8e+191:
		tmp = x
	elif y <= 5.8e+226:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / a))
	t_2 = Float64(y * Float64(z / Float64(-a)))
	tmp = 0.0
	if (y <= -4.75e+58)
		tmp = t_2;
	elseif (y <= -4.5e-21)
		tmp = t_1;
	elseif (y <= 380.0)
		tmp = x;
	elseif (y <= 2.8e+49)
		tmp = Float64(y * Float64(t / a));
	elseif (y <= 3.2e+161)
		tmp = t_2;
	elseif (y <= 7.8e+191)
		tmp = Float64(t / Float64(a / y));
	elseif (y <= 8e+191)
		tmp = x;
	elseif (y <= 5.8e+226)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / a);
	t_2 = y * (z / -a);
	tmp = 0.0;
	if (y <= -4.75e+58)
		tmp = t_2;
	elseif (y <= -4.5e-21)
		tmp = t_1;
	elseif (y <= 380.0)
		tmp = x;
	elseif (y <= 2.8e+49)
		tmp = y * (t / a);
	elseif (y <= 3.2e+161)
		tmp = t_2;
	elseif (y <= 7.8e+191)
		tmp = t / (a / y);
	elseif (y <= 8e+191)
		tmp = x;
	elseif (y <= 5.8e+226)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.75e+58], t$95$2, If[LessEqual[y, -4.5e-21], t$95$1, If[LessEqual[y, 380.0], x, If[LessEqual[y, 2.8e+49], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+161], t$95$2, If[LessEqual[y, 7.8e+191], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+191], x, If[LessEqual[y, 5.8e+226], t$95$2, t$95$1]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -4.5 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 380:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq 3.2 \cdot 10^{+161}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 8 \cdot 10^{+191}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{+226}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -4.7500000000000001e58 or 2.7999999999999998e49 < y < 3.20000000000000002e161 or 8.00000000000000058e191 < y < 5.79999999999999949e226

    1. Initial program 85.7%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 52.7%

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

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

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

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

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

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

    if -4.7500000000000001e58 < y < -4.49999999999999968e-21 or 5.79999999999999949e226 < y

    1. Initial program 90.3%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 47.5%

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

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

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

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

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

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

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

    if -4.49999999999999968e-21 < y < 380 or 7.8000000000000001e191 < y < 8.00000000000000058e191

    1. Initial program 99.9%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 61.2%

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

    if 380 < y < 2.7999999999999998e49

    1. Initial program 82.3%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 46.4%

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

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

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

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

    if 3.20000000000000002e161 < y < 7.8000000000000001e191

    1. Initial program 47.1%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 46.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.75 \cdot 10^{+58}:\\ \;\;\;\;y \cdot \frac{z}{-a}\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-21}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 380:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+49}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+161}:\\ \;\;\;\;y \cdot \frac{z}{-a}\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+191}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+191}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+226}:\\ \;\;\;\;y \cdot \frac{z}{-a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 80.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+173} \lor \neg \left(t \leq 1.45 \cdot 10^{-35}\right):\\
\;\;\;\;x + \frac{t \cdot y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1e173 or 1.4500000000000001e-35 < t

    1. Initial program 87.4%

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{-a}} + x \]
      5. fma-define94.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{-a}, x\right)} \]
      6. distribute-frac-neg294.7%

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

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

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

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

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

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

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

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

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

    if -1e173 < t < 1.4500000000000001e-35

    1. Initial program 94.2%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 84.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+173} \lor \neg \left(t \leq 1.45 \cdot 10^{-35}\right):\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z \cdot y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 73.9% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 84.1%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative84.1%

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

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

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

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

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

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

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

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

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

    if -1.13999999999999999e163 < z < 1.7000000000000001e35

    1. Initial program 93.9%

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{-a}} + x \]
      5. fma-define97.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{-a}, x\right)} \]
      6. distribute-frac-neg297.7%

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

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

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

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

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

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

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

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

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

    if 1.7000000000000001e35 < z

    1. Initial program 89.8%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-z\right) \cdot \frac{y}{a}} \]
    10. Step-by-step derivation
      1. clear-num68.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{z}}{-\frac{a}{y}} \]
      14. distribute-neg-frac268.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.14 \cdot 10^{+163}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+35}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\frac{a}{-y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 50.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -175000000000 \lor \neg \left(y \leq 88000\right):\\
\;\;\;\;y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.75e11 or 88000 < y

    1. Initial program 83.0%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 38.5%

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

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

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

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

    if -1.75e11 < y < 88000

    1. Initial program 99.9%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 59.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -175000000000 \lor \neg \left(y \leq 88000\right):\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 50.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq 39:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.4499999999999999e24

    1. Initial program 85.9%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 36.6%

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

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

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

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

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

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

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

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

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

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

    if -1.4499999999999999e24 < y < 39

    1. Initial program 99.9%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 58.2%

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

    if 39 < y

    1. Initial program 79.1%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 40.6%

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

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

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

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

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

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

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

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

Alternative 9: 50.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -340000000000:\\
\;\;\;\;y \cdot \frac{t}{a}\\

\mathbf{elif}\;y \leq 68:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.4e11

    1. Initial program 86.6%

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

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

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

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

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

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

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

    if -3.4e11 < y < 68

    1. Initial program 99.9%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 59.4%

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

    if 68 < y

    1. Initial program 79.1%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 40.6%

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

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

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

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

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

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

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

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

Alternative 10: 50.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq 240000:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.4e14

    1. Initial program 86.6%

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

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

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

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

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

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

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

    if -4.4e14 < y < 2.4e5

    1. Initial program 99.9%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 59.4%

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

    if 2.4e5 < y

    1. Initial program 79.1%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 40.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+14}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 240000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 97.1% accurate, 1.0× speedup?

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

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

    \[x - \frac{y \cdot \left(z - t\right)}{a} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. *-commutative91.8%

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

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

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

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

Alternative 12: 93.4% accurate, 1.0× speedup?

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

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

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

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

    \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
  4. Add Preprocessing
  5. Final simplification95.8%

    \[\leadsto x + y \cdot \frac{t - z}{a} \]
  6. Add Preprocessing

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 91.8%

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

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

    \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
  4. Add Preprocessing
  5. Taylor expanded in x around inf 38.8%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer target: 99.3% accurate, 0.5× 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 2024107 
(FPCore (x y z t a)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
  :precision binary64

  :alt
  (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)))