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

Percentage Accurate: 93.5% → 96.9%
Time: 9.8s
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.5% 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: 96.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

Alternative 2: 76.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.4 \cdot 10^{-72} \lor \neg \left(a \leq 4.3 \cdot 10^{-70} \lor \neg \left(a \leq 4.3 \cdot 10^{+28}\right) \land a \leq 8 \cdot 10^{+81}\right):\\
\;\;\;\;x + t \cdot \frac{y}{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 < -5.4e-72 or 4.3e-70 < a < 4.29999999999999975e28 or 7.99999999999999937e81 < a

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

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

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

    if -5.4e-72 < a < 4.3e-70 or 4.29999999999999975e28 < a < 7.99999999999999937e81

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.4 \cdot 10^{-72} \lor \neg \left(a \leq 4.3 \cdot 10^{-70} \lor \neg \left(a \leq 4.3 \cdot 10^{+28}\right) \land a \leq 8 \cdot 10^{+81}\right):\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \end{array} \]

Alternative 3: 68.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -9.5 \cdot 10^{+131} \lor \neg \left(a \leq -6.4 \cdot 10^{+63}\right) \land a \leq 2.1 \cdot 10^{+106}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.60000000000000018e171 or -9.50000000000000015e131 < a < -6.40000000000000022e63 or 2.10000000000000005e106 < a

    1. Initial program 87.2%

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

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

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

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

    if -3.60000000000000018e171 < a < -9.50000000000000015e131 or -6.40000000000000022e63 < a < 2.10000000000000005e106

    1. Initial program 95.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.6 \cdot 10^{+171}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{+131} \lor \neg \left(a \leq -6.4 \cdot 10^{+63}\right) \land a \leq 2.1 \cdot 10^{+106}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 82.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y}{\frac{a}{z}}\\ \mathbf{if}\;z \leq -10500000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-29}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+130} \lor \neg \left(z \leq 1.08 \cdot 10^{+176}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ y (/ a z)))))
   (if (<= z -10500000000000.0)
     t_1
     (if (<= z 1.5e-29)
       (+ x (* t (/ y a)))
       (if (or (<= z 1.65e+130) (not (<= z 1.08e+176)))
         t_1
         (* (/ y a) (- t z)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y / (a / z));
	double tmp;
	if (z <= -10500000000000.0) {
		tmp = t_1;
	} else if (z <= 1.5e-29) {
		tmp = x + (t * (y / a));
	} else if ((z <= 1.65e+130) || !(z <= 1.08e+176)) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x - (y / (a / z))
    if (z <= (-10500000000000.0d0)) then
        tmp = t_1
    else if (z <= 1.5d-29) then
        tmp = x + (t * (y / a))
    else if ((z <= 1.65d+130) .or. (.not. (z <= 1.08d+176))) then
        tmp = t_1
    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 t_1 = x - (y / (a / z));
	double tmp;
	if (z <= -10500000000000.0) {
		tmp = t_1;
	} else if (z <= 1.5e-29) {
		tmp = x + (t * (y / a));
	} else if ((z <= 1.65e+130) || !(z <= 1.08e+176)) {
		tmp = t_1;
	} else {
		tmp = (y / a) * (t - z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y / (a / z))
	tmp = 0
	if z <= -10500000000000.0:
		tmp = t_1
	elif z <= 1.5e-29:
		tmp = x + (t * (y / a))
	elif (z <= 1.65e+130) or not (z <= 1.08e+176):
		tmp = t_1
	else:
		tmp = (y / a) * (t - z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y / Float64(a / z)))
	tmp = 0.0
	if (z <= -10500000000000.0)
		tmp = t_1;
	elseif (z <= 1.5e-29)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	elseif ((z <= 1.65e+130) || !(z <= 1.08e+176))
		tmp = t_1;
	else
		tmp = Float64(Float64(y / a) * Float64(t - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y / (a / z));
	tmp = 0.0;
	if (z <= -10500000000000.0)
		tmp = t_1;
	elseif (z <= 1.5e-29)
		tmp = x + (t * (y / a));
	elseif ((z <= 1.65e+130) || ~((z <= 1.08e+176)))
		tmp = t_1;
	else
		tmp = (y / a) * (t - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -10500000000000.0], t$95$1, If[LessEqual[z, 1.5e-29], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1.65e+130], N[Not[LessEqual[z, 1.08e+176]], $MachinePrecision]], t$95$1, N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;z \leq -10500000000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+130} \lor \neg \left(z \leq 1.08 \cdot 10^{+176}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.05e13 or 1.5000000000000001e-29 < z < 1.65e130 or 1.08e176 < z

    1. Initial program 91.1%

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

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

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

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

    if -1.05e13 < z < 1.5000000000000001e-29

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

    if 1.65e130 < z < 1.08e176

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -10500000000000:\\ \;\;\;\;x - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-29}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+130} \lor \neg \left(z \leq 1.08 \cdot 10^{+176}\right):\\ \;\;\;\;x - \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \end{array} \]

Alternative 5: 82.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y}{\frac{a}{z}}\\ \mathbf{if}\;z \leq -31000000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-31}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+72}:\\ \;\;\;\;x - \frac{z \cdot y}{a}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+91}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ y (/ a z)))))
   (if (<= z -31000000000000.0)
     t_1
     (if (<= z 6.5e-31)
       (+ x (* t (/ y a)))
       (if (<= z 7.8e+72)
         (- x (/ (* z y) a))
         (if (<= z 6.8e+91) (* (/ y a) (- t z)) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y / (a / z));
	double tmp;
	if (z <= -31000000000000.0) {
		tmp = t_1;
	} else if (z <= 6.5e-31) {
		tmp = x + (t * (y / a));
	} else if (z <= 7.8e+72) {
		tmp = x - ((z * y) / a);
	} else if (z <= 6.8e+91) {
		tmp = (y / a) * (t - z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - (y / (a / z))
    if (z <= (-31000000000000.0d0)) then
        tmp = t_1
    else if (z <= 6.5d-31) then
        tmp = x + (t * (y / a))
    else if (z <= 7.8d+72) then
        tmp = x - ((z * y) / a)
    else if (z <= 6.8d+91) then
        tmp = (y / a) * (t - z)
    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 = x - (y / (a / z));
	double tmp;
	if (z <= -31000000000000.0) {
		tmp = t_1;
	} else if (z <= 6.5e-31) {
		tmp = x + (t * (y / a));
	} else if (z <= 7.8e+72) {
		tmp = x - ((z * y) / a);
	} else if (z <= 6.8e+91) {
		tmp = (y / a) * (t - z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y / (a / z))
	tmp = 0
	if z <= -31000000000000.0:
		tmp = t_1
	elif z <= 6.5e-31:
		tmp = x + (t * (y / a))
	elif z <= 7.8e+72:
		tmp = x - ((z * y) / a)
	elif z <= 6.8e+91:
		tmp = (y / a) * (t - z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y / Float64(a / z)))
	tmp = 0.0
	if (z <= -31000000000000.0)
		tmp = t_1;
	elseif (z <= 6.5e-31)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	elseif (z <= 7.8e+72)
		tmp = Float64(x - Float64(Float64(z * y) / a));
	elseif (z <= 6.8e+91)
		tmp = Float64(Float64(y / a) * Float64(t - z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y / (a / z));
	tmp = 0.0;
	if (z <= -31000000000000.0)
		tmp = t_1;
	elseif (z <= 6.5e-31)
		tmp = x + (t * (y / a));
	elseif (z <= 7.8e+72)
		tmp = x - ((z * y) / a);
	elseif (z <= 6.8e+91)
		tmp = (y / a) * (t - z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -31000000000000.0], t$95$1, If[LessEqual[z, 6.5e-31], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+72], N[(x - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+91], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;z \leq -31000000000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 7.8 \cdot 10^{+72}:\\
\;\;\;\;x - \frac{z \cdot y}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.1e13 or 6.8000000000000002e91 < z

    1. Initial program 89.6%

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

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

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

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

    if -3.1e13 < z < 6.49999999999999967e-31

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

    if 6.49999999999999967e-31 < z < 7.79999999999999984e72

    1. Initial program 99.9%

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

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

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

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

    if 7.79999999999999984e72 < z < 6.8000000000000002e91

    1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -31000000000000:\\ \;\;\;\;x - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-31}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+72}:\\ \;\;\;\;x - \frac{z \cdot y}{a}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+91}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z}}\\ \end{array} \]

Alternative 6: 49.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq 6.5 \cdot 10^{-60}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.42 \cdot 10^{+54}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.0500000000000001e51 or 6.49999999999999995e-60 < y < 1.41999999999999995e54

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

    if -1.0500000000000001e51 < y < 6.49999999999999995e-60

    1. Initial program 98.4%

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

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

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

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

    if 1.41999999999999995e54 < y

    1. Initial program 80.2%

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

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

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

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

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

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

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

Alternative 7: 49.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq 1.5 \cdot 10^{-59}:\\
\;\;\;\;x\\

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

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


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

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

    if -1.0500000000000001e51 < y < 1.5e-59

    1. Initial program 98.4%

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

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

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

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

    if 1.5e-59 < y < 2.59999999999999988e58

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

    if 2.59999999999999988e58 < y

    1. Initial program 80.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{+51}:\\ \;\;\;\;z \cdot \frac{-y}{a}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-59}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{+58}:\\ \;\;\;\;\frac{-z}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \end{array} \]

Alternative 8: 77.6% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.10000000000000032e-77

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

    if -5.10000000000000032e-77 < a < 5.8e52

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

    if 5.8e52 < a

    1. Initial program 89.2%

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

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

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

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

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

Alternative 9: 77.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.6 \cdot 10^{-70}:\\
\;\;\;\;x - \frac{y}{\frac{-a}{t}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.60000000000000033e-70

    1. Initial program 86.9%

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

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

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

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

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

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

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

    if -6.60000000000000033e-70 < a < 7.50000000000000042e54

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

    if 7.50000000000000042e54 < a

    1. Initial program 89.2%

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

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

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

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

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

Alternative 10: 50.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{+52} \lor \neg \left(y \leq 1.15\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.12000000000000002e52 or 1.1499999999999999 < y

    1. Initial program 86.8%

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

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

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

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

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

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

    if -1.12000000000000002e52 < y < 1.1499999999999999

    1. Initial program 98.5%

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

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

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

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

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

Alternative 11: 50.4% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 91.5%

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

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

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

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

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

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

    if -7.4999999999999999e51 < y < 14000

    1. Initial program 98.5%

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

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

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

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

    if 14000 < y

    1. Initial program 84.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+51}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 14000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \end{array} \]

Alternative 12: 96.9% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 13: 39.8% accurate, 9.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 92.9%

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

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

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

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

    \[\leadsto x \]

Developer target: 99.2% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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