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

Percentage Accurate: 93.2% → 97.0%
Time: 8.3s
Alternatives: 10
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 10 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.2% 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.0% accurate, 1.0× speedup?

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

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

    \[x - \frac{y \cdot \left(z - t\right)}{a} \]
  2. Add Preprocessing
  3. Taylor expanded in z around 0 85.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 47.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t}{a}\\ t_2 := y \cdot \frac{-z}{a}\\ \mathbf{if}\;y \leq -6.6 \cdot 10^{+157}:\\ \;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{+53}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \mathbf{elif}\;y \leq -5 \cdot 10^{-42}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-44}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+65}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+130}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+273}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ t a))) (t_2 (* y (/ (- z) a))))
   (if (<= y -6.6e+157)
     (/ (* y (- z)) a)
     (if (<= y -2.7e+53)
       (* (/ y a) t)
       (if (<= y -5e-42)
         t_2
         (if (<= y 1.45e-44)
           x
           (if (<= y 6.8e+65)
             t_1
             (if (<= y 1.65e+130)
               t_2
               (if (<= y 6.4e+273) t_1 (* (/ y a) (- z)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (t / a);
	double t_2 = y * (-z / a);
	double tmp;
	if (y <= -6.6e+157) {
		tmp = (y * -z) / a;
	} else if (y <= -2.7e+53) {
		tmp = (y / a) * t;
	} else if (y <= -5e-42) {
		tmp = t_2;
	} else if (y <= 1.45e-44) {
		tmp = x;
	} else if (y <= 6.8e+65) {
		tmp = t_1;
	} else if (y <= 1.65e+130) {
		tmp = t_2;
	} else if (y <= 6.4e+273) {
		tmp = t_1;
	} else {
		tmp = (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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * (t / a)
    t_2 = y * (-z / a)
    if (y <= (-6.6d+157)) then
        tmp = (y * -z) / a
    else if (y <= (-2.7d+53)) then
        tmp = (y / a) * t
    else if (y <= (-5d-42)) then
        tmp = t_2
    else if (y <= 1.45d-44) then
        tmp = x
    else if (y <= 6.8d+65) then
        tmp = t_1
    else if (y <= 1.65d+130) then
        tmp = t_2
    else if (y <= 6.4d+273) then
        tmp = t_1
    else
        tmp = (y / a) * -z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (t / a);
	double t_2 = y * (-z / a);
	double tmp;
	if (y <= -6.6e+157) {
		tmp = (y * -z) / a;
	} else if (y <= -2.7e+53) {
		tmp = (y / a) * t;
	} else if (y <= -5e-42) {
		tmp = t_2;
	} else if (y <= 1.45e-44) {
		tmp = x;
	} else if (y <= 6.8e+65) {
		tmp = t_1;
	} else if (y <= 1.65e+130) {
		tmp = t_2;
	} else if (y <= 6.4e+273) {
		tmp = t_1;
	} else {
		tmp = (y / a) * -z;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (t / a)
	t_2 = y * (-z / a)
	tmp = 0
	if y <= -6.6e+157:
		tmp = (y * -z) / a
	elif y <= -2.7e+53:
		tmp = (y / a) * t
	elif y <= -5e-42:
		tmp = t_2
	elif y <= 1.45e-44:
		tmp = x
	elif y <= 6.8e+65:
		tmp = t_1
	elif y <= 1.65e+130:
		tmp = t_2
	elif y <= 6.4e+273:
		tmp = t_1
	else:
		tmp = (y / a) * -z
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(t / a))
	t_2 = Float64(y * Float64(Float64(-z) / a))
	tmp = 0.0
	if (y <= -6.6e+157)
		tmp = Float64(Float64(y * Float64(-z)) / a);
	elseif (y <= -2.7e+53)
		tmp = Float64(Float64(y / a) * t);
	elseif (y <= -5e-42)
		tmp = t_2;
	elseif (y <= 1.45e-44)
		tmp = x;
	elseif (y <= 6.8e+65)
		tmp = t_1;
	elseif (y <= 1.65e+130)
		tmp = t_2;
	elseif (y <= 6.4e+273)
		tmp = t_1;
	else
		tmp = Float64(Float64(y / a) * Float64(-z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (t / a);
	t_2 = y * (-z / a);
	tmp = 0.0;
	if (y <= -6.6e+157)
		tmp = (y * -z) / a;
	elseif (y <= -2.7e+53)
		tmp = (y / a) * t;
	elseif (y <= -5e-42)
		tmp = t_2;
	elseif (y <= 1.45e-44)
		tmp = x;
	elseif (y <= 6.8e+65)
		tmp = t_1;
	elseif (y <= 1.65e+130)
		tmp = t_2;
	elseif (y <= 6.4e+273)
		tmp = t_1;
	else
		tmp = (y / a) * -z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[((-z) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.6e+157], N[(N[(y * (-z)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -2.7e+53], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, -5e-42], t$95$2, If[LessEqual[y, 1.45e-44], x, If[LessEqual[y, 6.8e+65], t$95$1, If[LessEqual[y, 1.65e+130], t$95$2, If[LessEqual[y, 6.4e+273], t$95$1, N[(N[(y / a), $MachinePrecision] * (-z)), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2.7 \cdot 10^{+53}:\\
\;\;\;\;\frac{y}{a} \cdot t\\

\mathbf{elif}\;y \leq -5 \cdot 10^{-42}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-44}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 6.8 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.65 \cdot 10^{+130}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 6.4 \cdot 10^{+273}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.6000000000000003e157 < y < -2.70000000000000019e53

    1. Initial program 85.5%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 62.7%

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

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

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

    if -2.70000000000000019e53 < y < -5.00000000000000003e-42 or 6.7999999999999999e65 < y < 1.65e130

    1. Initial program 89.5%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 63.3%

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

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

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

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

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

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

    if -5.00000000000000003e-42 < y < 1.4500000000000001e-44

    1. Initial program 99.9%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 67.7%

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

    if 1.4500000000000001e-44 < y < 6.7999999999999999e65 or 1.65e130 < y < 6.4000000000000004e273

    1. Initial program 92.5%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.4000000000000004e273 < y

    1. Initial program 68.6%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 46.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{a} \cdot z} \]
      5. distribute-lft-neg-in77.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.6 \cdot 10^{+157}:\\ \;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{+53}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \mathbf{elif}\;y \leq -5 \cdot 10^{-42}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-44}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+65}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+130}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+273}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 48.6% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{-z}{a}\\ \mathbf{if}\;y \leq -2.2 \cdot 10^{+160}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{+51}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-37}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-45}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+65} \lor \neg \left(y \leq 1.85 \cdot 10^{+130}\right):\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z) a))))
   (if (<= y -2.2e+160)
     t_1
     (if (<= y -9.2e+51)
       (* (/ y a) t)
       (if (<= y -7e-37)
         t_1
         (if (<= y 2.6e-45)
           x
           (if (or (<= y 7.5e+65) (not (<= y 1.85e+130)))
             (* y (/ t a))
             t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (-z / a);
	double tmp;
	if (y <= -2.2e+160) {
		tmp = t_1;
	} else if (y <= -9.2e+51) {
		tmp = (y / a) * t;
	} else if (y <= -7e-37) {
		tmp = t_1;
	} else if (y <= 2.6e-45) {
		tmp = x;
	} else if ((y <= 7.5e+65) || !(y <= 1.85e+130)) {
		tmp = y * (t / a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (-z / a)
    if (y <= (-2.2d+160)) then
        tmp = t_1
    else if (y <= (-9.2d+51)) then
        tmp = (y / a) * t
    else if (y <= (-7d-37)) then
        tmp = t_1
    else if (y <= 2.6d-45) then
        tmp = x
    else if ((y <= 7.5d+65) .or. (.not. (y <= 1.85d+130))) then
        tmp = y * (t / a)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (-z / a);
	double tmp;
	if (y <= -2.2e+160) {
		tmp = t_1;
	} else if (y <= -9.2e+51) {
		tmp = (y / a) * t;
	} else if (y <= -7e-37) {
		tmp = t_1;
	} else if (y <= 2.6e-45) {
		tmp = x;
	} else if ((y <= 7.5e+65) || !(y <= 1.85e+130)) {
		tmp = y * (t / a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (-z / a)
	tmp = 0
	if y <= -2.2e+160:
		tmp = t_1
	elif y <= -9.2e+51:
		tmp = (y / a) * t
	elif y <= -7e-37:
		tmp = t_1
	elif y <= 2.6e-45:
		tmp = x
	elif (y <= 7.5e+65) or not (y <= 1.85e+130):
		tmp = y * (t / a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(-z) / a))
	tmp = 0.0
	if (y <= -2.2e+160)
		tmp = t_1;
	elseif (y <= -9.2e+51)
		tmp = Float64(Float64(y / a) * t);
	elseif (y <= -7e-37)
		tmp = t_1;
	elseif (y <= 2.6e-45)
		tmp = x;
	elseif ((y <= 7.5e+65) || !(y <= 1.85e+130))
		tmp = Float64(y * Float64(t / a));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (-z / a);
	tmp = 0.0;
	if (y <= -2.2e+160)
		tmp = t_1;
	elseif (y <= -9.2e+51)
		tmp = (y / a) * t;
	elseif (y <= -7e-37)
		tmp = t_1;
	elseif (y <= 2.6e-45)
		tmp = x;
	elseif ((y <= 7.5e+65) || ~((y <= 1.85e+130)))
		tmp = y * (t / a);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[((-z) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.2e+160], t$95$1, If[LessEqual[y, -9.2e+51], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, -7e-37], t$95$1, If[LessEqual[y, 2.6e-45], x, If[Or[LessEqual[y, 7.5e+65], N[Not[LessEqual[y, 1.85e+130]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -9.2 \cdot 10^{+51}:\\
\;\;\;\;\frac{y}{a} \cdot t\\

\mathbf{elif}\;y \leq -7 \cdot 10^{-37}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 2.6 \cdot 10^{-45}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 7.5 \cdot 10^{+65} \lor \neg \left(y \leq 1.85 \cdot 10^{+130}\right):\\
\;\;\;\;y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.19999999999999992e160 or -9.2000000000000002e51 < y < -7.0000000000000003e-37 or 7.50000000000000006e65 < y < 1.8500000000000001e130

    1. Initial program 88.7%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 67.5%

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

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

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

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

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

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

    if -2.19999999999999992e160 < y < -9.2000000000000002e51

    1. Initial program 85.5%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 62.7%

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

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

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

    if -7.0000000000000003e-37 < y < 2.59999999999999987e-45

    1. Initial program 99.9%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 67.7%

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

    if 2.59999999999999987e-45 < y < 7.50000000000000006e65 or 1.8500000000000001e130 < y

    1. Initial program 89.5%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 74.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+160}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{+51}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-37}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-45}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+65} \lor \neg \left(y \leq 1.85 \cdot 10^{+130}\right):\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 49.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;y \leq -4.5 \cdot 10^{+53}:\\
\;\;\;\;\frac{y}{a} \cdot t\\

\mathbf{elif}\;y \leq -4 \cdot 10^{-38}:\\
\;\;\;\;y \cdot \frac{-z}{a}\\

\mathbf{elif}\;y \leq 9 \cdot 10^{-45}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.30000000000000017e158 or 4.49999999999999973e64 < y

    1. Initial program 85.1%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.30000000000000017e158 < y < -4.5000000000000002e53

    1. Initial program 85.5%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 62.7%

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

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

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

    if -4.5000000000000002e53 < y < -3.9999999999999998e-38

    1. Initial program 95.1%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 70.8%

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

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

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

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

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

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

    if -3.9999999999999998e-38 < y < 8.9999999999999997e-45

    1. Initial program 99.9%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 67.7%

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

    if 8.9999999999999997e-45 < y < 4.49999999999999973e64

    1. Initial program 99.8%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.3 \cdot 10^{+158}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{+53}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-38}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-45}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{+64}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 68.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-45} \lor \neg \left(y \leq 1.65 \cdot 10^{-142}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.99999999999999987e-45 or 1.6499999999999998e-142 < y

    1. Initial program 90.0%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 73.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.99999999999999987e-45 < y < 1.6499999999999998e-142

    1. Initial program 99.9%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 74.2%

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

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

Alternative 6: 79.2% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.80000000000000065e137 < t < 2.05e114

    1. Initial program 95.0%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 83.6%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z}{a}} \]
    5. Simplified83.1%

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

        \[\leadsto x - y \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      2. un-div-inv83.2%

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z}}} \]
    7. Applied egg-rr83.2%

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

    if 2.05e114 < t

    1. Initial program 85.1%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 76.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 77.0% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.74999999999999992e-36

    1. Initial program 89.5%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 81.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - z}{a}} \]
    5. Simplified86.5%

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

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

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

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

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

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

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

    if -2.74999999999999992e-36 < y < 1.35e29

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.35e29 < y

    1. Initial program 85.5%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 72.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a} - \frac{z}{a}\right)} \]
      10. div-sub85.2%

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

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

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

Alternative 8: 67.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-139}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.70000000000000002e-45

    1. Initial program 89.9%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 79.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - z}{a}} \]
    5. Simplified85.1%

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

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

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

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

        \[\leadsto \left(t - z\right) \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      5. clear-num86.7%

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

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

    if -1.70000000000000002e-45 < y < 1.4499999999999999e-139

    1. Initial program 99.9%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 74.2%

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

    if 1.4499999999999999e-139 < y

    1. Initial program 90.1%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 69.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 50.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{-36} \lor \neg \left(y \leq 9.5 \cdot 10^{-45}\right):\\
\;\;\;\;\frac{y}{a} \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.60000000000000011e-36 or 9.5000000000000002e-45 < y

    1. Initial program 88.8%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 38.8%

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

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

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

    if -1.60000000000000011e-36 < y < 9.5000000000000002e-45

    1. Initial program 99.9%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 67.7%

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

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

Alternative 10: 38.5% 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.3%

    \[x - \frac{y \cdot \left(z - t\right)}{a} \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf 36.5%

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

Developer target: 98.9% accurate, 0.5× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;x - \frac{y}{t\_1}\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024096 
(FPCore (x y z t a)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
  :precision binary64

  :alt
  (if (< y -1.0761266216389975e-10) (- x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t))))))

  (- x (/ (* y (- z t)) a)))