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

Percentage Accurate: 93.1% → 97.2%
Time: 10.6s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 93.1% 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 93.6%

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

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

    \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
  4. Step-by-step derivation
    1. *-commutative91.8%

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

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

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

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

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

Alternative 2: 50.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq 4.5 \cdot 10^{-89}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 150000000000:\\
\;\;\;\;\frac{t \cdot y}{a}\\

\mathbf{elif}\;y \leq 3.6 \cdot 10^{+134} \lor \neg \left(y \leq 7 \cdot 10^{+225}\right):\\
\;\;\;\;z \cdot \frac{-y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.5000000000000002e49

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

    if -2.5000000000000002e49 < y < 4.4999999999999999e-89

    1. Initial program 99.0%

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

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

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

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

    if 4.4999999999999999e-89 < y < 1.5e11

    1. Initial program 99.9%

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

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

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

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

    if 1.5e11 < y < 3.59999999999999988e134 or 7.0000000000000006e225 < y

    1. Initial program 89.1%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-*r/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. Taylor expanded in z around inf 51.0%

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

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

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

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

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

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

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

    if 3.59999999999999988e134 < y < 7.0000000000000006e225

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+49}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-89}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 150000000000:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+134} \lor \neg \left(y \leq 7 \cdot 10^{+225}\right):\\ \;\;\;\;z \cdot \frac{-y}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \end{array} \]

Alternative 3: 50.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq 9.2 \cdot 10^{-94}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 13500000000:\\
\;\;\;\;\frac{t \cdot y}{a}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -1.8999999999999999e49

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e49 < y < 9.1999999999999997e-94

    1. Initial program 99.0%

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

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

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

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

    if 9.1999999999999997e-94 < y < 1.35e10

    1. Initial program 99.9%

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

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

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

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

    if 1.35e10 < y < 3.70000000000000013e134

    1. Initial program 86.4%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-*r/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. Taylor expanded in z around inf 42.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.70000000000000013e134 < y < 7.0000000000000006e225

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

    if 7.0000000000000006e225 < y

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{+49}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{-94}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 13500000000:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+134}:\\ \;\;\;\;\frac{y}{\frac{-a}{z}}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+225}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{-y}{a}\\ \end{array} \]

Alternative 4: 68.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{-38} \lor \neg \left(y \leq -2 \cdot 10^{-75} \lor \neg \left(y \leq -1.6 \cdot 10^{-143}\right) \land y \leq 2.2 \cdot 10^{-161}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.40000000000000015e-38 or -1.9999999999999999e-75 < y < -1.5999999999999999e-143 or 2.20000000000000002e-161 < y

    1. Initial program 91.8%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. associate-*r/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. Step-by-step derivation
      1. *-commutative95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{z \cdot y}{a}\right)} - -1 \cdot \left(y \cdot \frac{t}{a}\right) \]
      11. rem-3cbrt-rft64.2%

        \[\leadsto \left(-\color{blue}{\sqrt[3]{\frac{z \cdot y}{a}} \cdot \left(\sqrt[3]{\frac{z \cdot y}{a}} \cdot \sqrt[3]{\frac{z \cdot y}{a}}\right)}\right) - -1 \cdot \left(y \cdot \frac{t}{a}\right) \]
      12. unpow264.2%

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

        \[\leadsto \left(-\sqrt[3]{\frac{z \cdot y}{a}} \cdot {\left(\sqrt[3]{\frac{z \cdot y}{a}}\right)}^{2}\right) - \color{blue}{\left(-y \cdot \frac{t}{a}\right)} \]
      14. distribute-lft-neg-in64.2%

        \[\leadsto \left(-\sqrt[3]{\frac{z \cdot y}{a}} \cdot {\left(\sqrt[3]{\frac{z \cdot y}{a}}\right)}^{2}\right) - \color{blue}{\left(-y\right) \cdot \frac{t}{a}} \]
      15. cancel-sign-sub64.2%

        \[\leadsto \color{blue}{\left(-\sqrt[3]{\frac{z \cdot y}{a}} \cdot {\left(\sqrt[3]{\frac{z \cdot y}{a}}\right)}^{2}\right) + y \cdot \frac{t}{a}} \]
      16. distribute-lft-neg-in64.2%

        \[\leadsto \color{blue}{\left(-\sqrt[3]{\frac{z \cdot y}{a}}\right) \cdot {\left(\sqrt[3]{\frac{z \cdot y}{a}}\right)}^{2}} + y \cdot \frac{t}{a} \]
    8. Simplified74.1%

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

    if -4.40000000000000015e-38 < y < -1.9999999999999999e-75 or -1.5999999999999999e-143 < y < 2.20000000000000002e-161

    1. Initial program 98.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{-38} \lor \neg \left(y \leq -2 \cdot 10^{-75} \lor \neg \left(y \leq -1.6 \cdot 10^{-143}\right) \land y \leq 2.2 \cdot 10^{-161}\right):\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 5: 50.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+49} \lor \neg \left(y \leq 2.4 \cdot 10^{-91} \lor \neg \left(y \leq 1.4 \cdot 10^{+87}\right) \land y \leq 3.4 \cdot 10^{+134}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.7000000000000001e49 or 2.40000000000000011e-91 < y < 1.40000000000000008e87 or 3.40000000000000018e134 < y

    1. Initial program 89.7%

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

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

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

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

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

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

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

    if -2.7000000000000001e49 < y < 2.40000000000000011e-91 or 1.40000000000000008e87 < y < 3.40000000000000018e134

    1. Initial program 98.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+49} \lor \neg \left(y \leq 2.4 \cdot 10^{-91} \lor \neg \left(y \leq 1.4 \cdot 10^{+87}\right) \land y \leq 3.4 \cdot 10^{+134}\right):\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 6: 49.3% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq 1.55 \cdot 10^{+87} \lor \neg \left(y \leq 3.4 \cdot 10^{+134}\right):\\
\;\;\;\;y \cdot \frac{t}{a}\\

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


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

    1. Initial program 88.9%

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

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

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

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

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

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

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

    if -1.79999999999999998e49 < y < 1.2000000000000001e-93 or 1.55e87 < y < 3.40000000000000018e134

    1. Initial program 98.3%

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

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

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

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

    if 1.2000000000000001e-93 < y < 1.55e87 or 3.40000000000000018e134 < y

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+49}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-93}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{+87} \lor \neg \left(y \leq 3.4 \cdot 10^{+134}\right):\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 7: 49.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq 4.2 \cdot 10^{-89}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 6 \cdot 10^{+84} \lor \neg \left(y \leq 3.4 \cdot 10^{+134}\right):\\
\;\;\;\;y \cdot \frac{t}{a}\\

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


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

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

    if -2.2000000000000001e49 < y < 4.2000000000000002e-89 or 5.99999999999999992e84 < y < 3.40000000000000018e134

    1. Initial program 98.3%

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

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

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

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

    if 4.2000000000000002e-89 < y < 5.99999999999999992e84 or 3.40000000000000018e134 < y

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+49}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-89}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+84} \lor \neg \left(y \leq 3.4 \cdot 10^{+134}\right):\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8: 77.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{-11} \lor \neg \left(a \leq 8 \cdot 10^{-99}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.8999999999999999e-11 or 8.0000000000000002e-99 < a

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)} \cdot \frac{-t}{a} \]
      4. sqrt-unprod56.6%

        \[\leadsto x + \color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}} \cdot \frac{-t}{a} \]
      5. sqr-neg56.6%

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

        \[\leadsto x + \color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \cdot \frac{-t}{a} \]
      7. add-sqr-sqrt54.2%

        \[\leadsto x + \color{blue}{y} \cdot \frac{-t}{a} \]
      8. add-sqr-sqrt27.9%

        \[\leadsto x + y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{a} \]
      9. sqrt-unprod51.0%

        \[\leadsto x + y \cdot \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{a} \]
      10. sqr-neg51.0%

        \[\leadsto x + y \cdot \frac{\sqrt{\color{blue}{t \cdot t}}}{a} \]
      11. sqrt-unprod35.1%

        \[\leadsto x + y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{a} \]
      12. add-sqr-sqrt77.5%

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

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

    if -1.8999999999999999e-11 < a < 8.0000000000000002e-99

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \color{blue}{\frac{z - t}{\frac{a}{y}}} \]
      2. div-sub66.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{z \cdot y}{a}\right)} - -1 \cdot \left(y \cdot \frac{t}{a}\right) \]
      11. rem-3cbrt-rft67.1%

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

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

        \[\leadsto \left(-\sqrt[3]{\frac{z \cdot y}{a}} \cdot {\left(\sqrt[3]{\frac{z \cdot y}{a}}\right)}^{2}\right) - \color{blue}{\left(-y \cdot \frac{t}{a}\right)} \]
      14. distribute-lft-neg-in67.1%

        \[\leadsto \left(-\sqrt[3]{\frac{z \cdot y}{a}} \cdot {\left(\sqrt[3]{\frac{z \cdot y}{a}}\right)}^{2}\right) - \color{blue}{\left(-y\right) \cdot \frac{t}{a}} \]
      15. cancel-sign-sub67.1%

        \[\leadsto \color{blue}{\left(-\sqrt[3]{\frac{z \cdot y}{a}} \cdot {\left(\sqrt[3]{\frac{z \cdot y}{a}}\right)}^{2}\right) + y \cdot \frac{t}{a}} \]
      16. distribute-lft-neg-in67.1%

        \[\leadsto \color{blue}{\left(-\sqrt[3]{\frac{z \cdot y}{a}}\right) \cdot {\left(\sqrt[3]{\frac{z \cdot y}{a}}\right)}^{2}} + y \cdot \frac{t}{a} \]
    8. Simplified81.6%

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

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

Alternative 9: 83.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.85 \cdot 10^{+57} \lor \neg \left(z \leq 3.05 \cdot 10^{-22}\right):\\
\;\;\;\;x - y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8499999999999999e57 or 3.04999999999999978e-22 < z

    1. Initial program 91.0%

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

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

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

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

    if -2.8499999999999999e57 < z < 3.04999999999999978e-22

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 77.4% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 83.6%

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Step-by-step derivation
      1. *-commutative87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{z \cdot y}{a}\right)} - -1 \cdot \left(y \cdot \frac{t}{a}\right) \]
      11. rem-3cbrt-rft69.6%

        \[\leadsto \left(-\color{blue}{\sqrt[3]{\frac{z \cdot y}{a}} \cdot \left(\sqrt[3]{\frac{z \cdot y}{a}} \cdot \sqrt[3]{\frac{z \cdot y}{a}}\right)}\right) - -1 \cdot \left(y \cdot \frac{t}{a}\right) \]
      12. unpow269.6%

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

        \[\leadsto \left(-\sqrt[3]{\frac{z \cdot y}{a}} \cdot {\left(\sqrt[3]{\frac{z \cdot y}{a}}\right)}^{2}\right) - \color{blue}{\left(-y \cdot \frac{t}{a}\right)} \]
      14. distribute-lft-neg-in69.6%

        \[\leadsto \left(-\sqrt[3]{\frac{z \cdot y}{a}} \cdot {\left(\sqrt[3]{\frac{z \cdot y}{a}}\right)}^{2}\right) - \color{blue}{\left(-y\right) \cdot \frac{t}{a}} \]
      15. cancel-sign-sub69.6%

        \[\leadsto \color{blue}{\left(-\sqrt[3]{\frac{z \cdot y}{a}} \cdot {\left(\sqrt[3]{\frac{z \cdot y}{a}}\right)}^{2}\right) + y \cdot \frac{t}{a}} \]
      16. distribute-lft-neg-in69.6%

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

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

    if -5.4999999999999999e194 < z < 1.9000000000000001e171

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

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

    if 1.9000000000000001e171 < z

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-z}{-\frac{a}{y}}} \]
      11. distribute-neg-frac0.8%

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

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

        \[\leadsto \frac{-z}{\frac{-a}{\color{blue}{\sqrt{y \cdot y}}}} \]
      14. sqr-neg34.0%

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

        \[\leadsto \frac{-z}{\frac{-a}{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}} \]
      16. add-sqr-sqrt87.1%

        \[\leadsto \frac{-z}{\frac{-a}{\color{blue}{-y}}} \]
      17. frac-2neg87.1%

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

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

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

Alternative 11: 83.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+55}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\

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

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


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

    1. Initial program 88.6%

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

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

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

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

    if -2.1000000000000001e55 < z < 1.3799999999999999e-15

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

    if 1.3799999999999999e-15 < z

    1. Initial program 92.8%

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

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

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

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

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

Alternative 12: 83.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+57}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\

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

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


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

    1. Initial program 88.6%

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

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

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

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

    if -2.0000000000000001e57 < z < 1.4000000000000001e-20

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

    if 1.4000000000000001e-20 < z

    1. Initial program 92.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+57}:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-20}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z \cdot y}{a}\\ \end{array} \]

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

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

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

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

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

Alternative 14: 97.3% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 15: 39.2% 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 93.6%

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

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

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

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

    \[\leadsto x \]

Developer target: 99.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x - \frac{1}{\frac{t_1}{y}}\\

\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x - \frac{y \cdot \left(z - t\right)}{a}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023208 
(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)))