Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, I

Percentage Accurate: 91.8% → 93.5%
Time: 7.7s
Alternatives: 10
Speedup: 0.8×

Specification

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

\\
\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}
\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: 91.8% accurate, 1.0× speedup?

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

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

Alternative 1: 93.5% accurate, 0.1× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq 4 \cdot 10^{+304}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z \cdot t, -9, x \cdot y\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (if (<= (* x y) 4e+304)
   (/ (fma (* z t) -9.0 (* x y)) (* a 2.0))
   (* 0.5 (* x (/ y a)))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x * y) <= 4e+304) {
		tmp = fma((z * t), -9.0, (x * y)) / (a * 2.0);
	} else {
		tmp = 0.5 * (x * (y / a));
	}
	return tmp;
}
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(x * y) <= 4e+304)
		tmp = Float64(fma(Float64(z * t), -9.0, Float64(x * y)) / Float64(a * 2.0));
	else
		tmp = Float64(0.5 * Float64(x * Float64(y / a)));
	end
	return tmp
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], 4e+304], N[(N[(N[(z * t), $MachinePrecision] * -9.0 + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq 4 \cdot 10^{+304}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z \cdot t, -9, x \cdot y\right)}{a \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < 3.9999999999999998e304

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(t \cdot -9\right)} + x \cdot y}{a \cdot 2} \]
      7. associate-*r*96.9%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z \cdot t, -9, x \cdot y\right)}}{a \cdot 2} \]
    5. Applied egg-rr96.9%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z \cdot t, -9, x \cdot y\right)}}{a \cdot 2} \]

    if 3.9999999999999998e304 < (*.f64 x y)

    1. Initial program 57.9%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - \left(z \cdot 9\right) \cdot t\right)} + x \cdot y}{a \cdot 2} \]
      4. associate-+l-57.9%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 2}{\left(z \cdot 9\right) \cdot t - x \cdot y}}} \]
      8. associate-/r/57.9%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-57.9%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg57.9%

        \[\leadsto \color{blue}{\left(-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      15. distribute-lft-neg-out57.9%

        \[\leadsto \color{blue}{-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2}} \]
      16. distribute-rgt-neg-in57.9%

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

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{a}{x}}} \]
      2. associate-/r/99.8%

        \[\leadsto 0.5 \cdot \color{blue}{\left(\frac{y}{a} \cdot x\right)} \]
    6. Applied egg-rr99.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq 4 \cdot 10^{+304}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z \cdot t, -9, x \cdot y\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \end{array} \]

Alternative 2: 67.6% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -1.1 \cdot 10^{-89} \lor \neg \left(y \leq -1.75 \cdot 10^{-168}\right) \land \left(y \leq -4 \cdot 10^{-200} \lor \neg \left(y \leq 2.25 \cdot 10^{+17}\right) \land \left(y \leq 8 \cdot 10^{+87} \lor \neg \left(y \leq 3.6 \cdot 10^{+130}\right)\right)\right):\\ \;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= y -1.1e-89)
         (and (not (<= y -1.75e-168))
              (or (<= y -4e-200)
                  (and (not (<= y 2.25e+17))
                       (or (<= y 8e+87) (not (<= y 3.6e+130)))))))
   (* 0.5 (* y (/ x a)))
   (* -4.5 (/ (* z t) a))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -1.1e-89) || (!(y <= -1.75e-168) && ((y <= -4e-200) || (!(y <= 2.25e+17) && ((y <= 8e+87) || !(y <= 3.6e+130)))))) {
		tmp = 0.5 * (y * (x / a));
	} else {
		tmp = -4.5 * ((z * t) / a);
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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.1d-89)) .or. (.not. (y <= (-1.75d-168))) .and. (y <= (-4d-200)) .or. (.not. (y <= 2.25d+17)) .and. (y <= 8d+87) .or. (.not. (y <= 3.6d+130))) then
        tmp = 0.5d0 * (y * (x / a))
    else
        tmp = (-4.5d0) * ((z * t) / a)
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -1.1e-89) || (!(y <= -1.75e-168) && ((y <= -4e-200) || (!(y <= 2.25e+17) && ((y <= 8e+87) || !(y <= 3.6e+130)))))) {
		tmp = 0.5 * (y * (x / a));
	} else {
		tmp = -4.5 * ((z * t) / a);
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if (y <= -1.1e-89) or (not (y <= -1.75e-168) and ((y <= -4e-200) or (not (y <= 2.25e+17) and ((y <= 8e+87) or not (y <= 3.6e+130))))):
		tmp = 0.5 * (y * (x / a))
	else:
		tmp = -4.5 * ((z * t) / a)
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if ((y <= -1.1e-89) || (!(y <= -1.75e-168) && ((y <= -4e-200) || (!(y <= 2.25e+17) && ((y <= 8e+87) || !(y <= 3.6e+130))))))
		tmp = Float64(0.5 * Float64(y * Float64(x / a)));
	else
		tmp = Float64(-4.5 * Float64(Float64(z * t) / a));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((y <= -1.1e-89) || (~((y <= -1.75e-168)) && ((y <= -4e-200) || (~((y <= 2.25e+17)) && ((y <= 8e+87) || ~((y <= 3.6e+130)))))))
		tmp = 0.5 * (y * (x / a));
	else
		tmp = -4.5 * ((z * t) / a);
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.1e-89], And[N[Not[LessEqual[y, -1.75e-168]], $MachinePrecision], Or[LessEqual[y, -4e-200], And[N[Not[LessEqual[y, 2.25e+17]], $MachinePrecision], Or[LessEqual[y, 8e+87], N[Not[LessEqual[y, 3.6e+130]], $MachinePrecision]]]]]], N[(0.5 * N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{-89} \lor \neg \left(y \leq -1.75 \cdot 10^{-168}\right) \land \left(y \leq -4 \cdot 10^{-200} \lor \neg \left(y \leq 2.25 \cdot 10^{+17}\right) \land \left(y \leq 8 \cdot 10^{+87} \lor \neg \left(y \leq 3.6 \cdot 10^{+130}\right)\right)\right):\\
\;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.10000000000000006e-89 or -1.74999999999999991e-168 < y < -3.9999999999999999e-200 or 2.25e17 < y < 7.9999999999999997e87 or 3.6000000000000001e130 < y

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(t \cdot -9\right)} + x \cdot y}{a \cdot 2} \]
      7. associate-*r*90.6%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z \cdot t, -9, x \cdot y\right)}}{a \cdot 2} \]
    5. Applied egg-rr90.6%

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\left(y \cdot \frac{x}{a}\right)} \]
    8. Simplified68.9%

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

    if -1.10000000000000006e-89 < y < -1.74999999999999991e-168 or -3.9999999999999999e-200 < y < 2.25e17 or 7.9999999999999997e87 < y < 3.6000000000000001e130

    1. Initial program 96.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - \left(z \cdot 9\right) \cdot t\right)} + x \cdot y}{a \cdot 2} \]
      4. associate-+l-96.6%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 2}{\left(z \cdot 9\right) \cdot t - x \cdot y}}} \]
      8. associate-/r/96.4%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-96.4%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg96.4%

        \[\leadsto \color{blue}{\left(-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      15. distribute-lft-neg-out96.4%

        \[\leadsto \color{blue}{-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2}} \]
      16. distribute-rgt-neg-in96.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.1 \cdot 10^{-89} \lor \neg \left(y \leq -1.75 \cdot 10^{-168}\right) \land \left(y \leq -4 \cdot 10^{-200} \lor \neg \left(y \leq 2.25 \cdot 10^{+17}\right) \land \left(y \leq 8 \cdot 10^{+87} \lor \neg \left(y \leq 3.6 \cdot 10^{+130}\right)\right)\right):\\ \;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \end{array} \]

Alternative 3: 67.5% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := -4.5 \cdot \frac{z \cdot t}{a}\\ t_2 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{if}\;y \leq -1.05 \cdot 10^{-89}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-168}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-200}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+21} \lor \neg \left(y \leq 7.4 \cdot 10^{+87}\right) \land y \leq 3.6 \cdot 10^{+130}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -4.5 (/ (* z t) a))) (t_2 (* 0.5 (* x (/ y a)))))
   (if (<= y -1.05e-89)
     t_2
     (if (<= y -1.75e-168)
       t_1
       (if (<= y -4e-200)
         t_2
         (if (or (<= y 7e+21) (and (not (<= y 7.4e+87)) (<= y 3.6e+130)))
           t_1
           (* 0.5 (* y (/ x a)))))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = -4.5 * ((z * t) / a);
	double t_2 = 0.5 * (x * (y / a));
	double tmp;
	if (y <= -1.05e-89) {
		tmp = t_2;
	} else if (y <= -1.75e-168) {
		tmp = t_1;
	} else if (y <= -4e-200) {
		tmp = t_2;
	} else if ((y <= 7e+21) || (!(y <= 7.4e+87) && (y <= 3.6e+130))) {
		tmp = t_1;
	} else {
		tmp = 0.5 * (y * (x / a));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 = (-4.5d0) * ((z * t) / a)
    t_2 = 0.5d0 * (x * (y / a))
    if (y <= (-1.05d-89)) then
        tmp = t_2
    else if (y <= (-1.75d-168)) then
        tmp = t_1
    else if (y <= (-4d-200)) then
        tmp = t_2
    else if ((y <= 7d+21) .or. (.not. (y <= 7.4d+87)) .and. (y <= 3.6d+130)) then
        tmp = t_1
    else
        tmp = 0.5d0 * (y * (x / a))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -4.5 * ((z * t) / a);
	double t_2 = 0.5 * (x * (y / a));
	double tmp;
	if (y <= -1.05e-89) {
		tmp = t_2;
	} else if (y <= -1.75e-168) {
		tmp = t_1;
	} else if (y <= -4e-200) {
		tmp = t_2;
	} else if ((y <= 7e+21) || (!(y <= 7.4e+87) && (y <= 3.6e+130))) {
		tmp = t_1;
	} else {
		tmp = 0.5 * (y * (x / a));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = -4.5 * ((z * t) / a)
	t_2 = 0.5 * (x * (y / a))
	tmp = 0
	if y <= -1.05e-89:
		tmp = t_2
	elif y <= -1.75e-168:
		tmp = t_1
	elif y <= -4e-200:
		tmp = t_2
	elif (y <= 7e+21) or (not (y <= 7.4e+87) and (y <= 3.6e+130)):
		tmp = t_1
	else:
		tmp = 0.5 * (y * (x / a))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(-4.5 * Float64(Float64(z * t) / a))
	t_2 = Float64(0.5 * Float64(x * Float64(y / a)))
	tmp = 0.0
	if (y <= -1.05e-89)
		tmp = t_2;
	elseif (y <= -1.75e-168)
		tmp = t_1;
	elseif (y <= -4e-200)
		tmp = t_2;
	elseif ((y <= 7e+21) || (!(y <= 7.4e+87) && (y <= 3.6e+130)))
		tmp = t_1;
	else
		tmp = Float64(0.5 * Float64(y * Float64(x / a)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = -4.5 * ((z * t) / a);
	t_2 = 0.5 * (x * (y / a));
	tmp = 0.0;
	if (y <= -1.05e-89)
		tmp = t_2;
	elseif (y <= -1.75e-168)
		tmp = t_1;
	elseif (y <= -4e-200)
		tmp = t_2;
	elseif ((y <= 7e+21) || (~((y <= 7.4e+87)) && (y <= 3.6e+130)))
		tmp = t_1;
	else
		tmp = 0.5 * (y * (x / a));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.05e-89], t$95$2, If[LessEqual[y, -1.75e-168], t$95$1, If[LessEqual[y, -4e-200], t$95$2, If[Or[LessEqual[y, 7e+21], And[N[Not[LessEqual[y, 7.4e+87]], $MachinePrecision], LessEqual[y, 3.6e+130]]], t$95$1, N[(0.5 * N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := -4.5 \cdot \frac{z \cdot t}{a}\\
t_2 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{-89}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -1.75 \cdot 10^{-168}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -4 \cdot 10^{-200}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 7 \cdot 10^{+21} \lor \neg \left(y \leq 7.4 \cdot 10^{+87}\right) \land y \leq 3.6 \cdot 10^{+130}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.05e-89 or -1.74999999999999991e-168 < y < -3.9999999999999999e-200

    1. Initial program 93.4%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - \left(z \cdot 9\right) \cdot t\right)} + x \cdot y}{a \cdot 2} \]
      4. associate-+l-93.4%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 2}{\left(z \cdot 9\right) \cdot t - x \cdot y}}} \]
      8. associate-/r/93.3%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-93.3%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg93.3%

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

        \[\leadsto \color{blue}{-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2}} \]
      16. distribute-rgt-neg-in93.3%

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

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{a}{x}}} \]
      2. associate-/r/63.7%

        \[\leadsto 0.5 \cdot \color{blue}{\left(\frac{y}{a} \cdot x\right)} \]
    6. Applied egg-rr63.7%

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

    if -1.05e-89 < y < -1.74999999999999991e-168 or -3.9999999999999999e-200 < y < 7e21 or 7.40000000000000005e87 < y < 3.6000000000000001e130

    1. Initial program 96.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - \left(z \cdot 9\right) \cdot t\right)} + x \cdot y}{a \cdot 2} \]
      4. associate-+l-96.6%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 2}{\left(z \cdot 9\right) \cdot t - x \cdot y}}} \]
      8. associate-/r/96.4%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-96.4%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg96.4%

        \[\leadsto \color{blue}{\left(-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      15. distribute-lft-neg-out96.4%

        \[\leadsto \color{blue}{-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2}} \]
      16. distribute-rgt-neg-in96.4%

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

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

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

    if 7e21 < y < 7.40000000000000005e87 or 3.6000000000000001e130 < y

    1. Initial program 87.2%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(t \cdot -9\right)} + x \cdot y}{a \cdot 2} \]
      7. associate-*r*87.1%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z \cdot t, -9, x \cdot y\right)}}{a \cdot 2} \]
    5. Applied egg-rr87.1%

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\left(y \cdot \frac{x}{a}\right)} \]
    8. Simplified70.7%

      \[\leadsto \color{blue}{0.5 \cdot \left(y \cdot \frac{x}{a}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification71.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{-89}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-168}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-200}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+21} \lor \neg \left(y \leq 7.4 \cdot 10^{+87}\right) \land y \leq 3.6 \cdot 10^{+130}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\ \end{array} \]

Alternative 4: 67.5% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := -4.5 \cdot \frac{z \cdot t}{a}\\ t_2 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{if}\;y \leq -1.1 \cdot 10^{-89}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-168}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-200}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+18}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+88}:\\ \;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+130}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -4.5 (/ (* z t) a))) (t_2 (* 0.5 (* x (/ y a)))))
   (if (<= y -1.1e-89)
     t_2
     (if (<= y -1.8e-168)
       t_1
       (if (<= y -4e-200)
         t_2
         (if (<= y 1.65e+18)
           t_1
           (if (<= y 1.15e+88)
             (* 0.5 (/ y (/ a x)))
             (if (<= y 3.6e+130) t_1 (* 0.5 (* y (/ x a)))))))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = -4.5 * ((z * t) / a);
	double t_2 = 0.5 * (x * (y / a));
	double tmp;
	if (y <= -1.1e-89) {
		tmp = t_2;
	} else if (y <= -1.8e-168) {
		tmp = t_1;
	} else if (y <= -4e-200) {
		tmp = t_2;
	} else if (y <= 1.65e+18) {
		tmp = t_1;
	} else if (y <= 1.15e+88) {
		tmp = 0.5 * (y / (a / x));
	} else if (y <= 3.6e+130) {
		tmp = t_1;
	} else {
		tmp = 0.5 * (y * (x / a));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 = (-4.5d0) * ((z * t) / a)
    t_2 = 0.5d0 * (x * (y / a))
    if (y <= (-1.1d-89)) then
        tmp = t_2
    else if (y <= (-1.8d-168)) then
        tmp = t_1
    else if (y <= (-4d-200)) then
        tmp = t_2
    else if (y <= 1.65d+18) then
        tmp = t_1
    else if (y <= 1.15d+88) then
        tmp = 0.5d0 * (y / (a / x))
    else if (y <= 3.6d+130) then
        tmp = t_1
    else
        tmp = 0.5d0 * (y * (x / a))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -4.5 * ((z * t) / a);
	double t_2 = 0.5 * (x * (y / a));
	double tmp;
	if (y <= -1.1e-89) {
		tmp = t_2;
	} else if (y <= -1.8e-168) {
		tmp = t_1;
	} else if (y <= -4e-200) {
		tmp = t_2;
	} else if (y <= 1.65e+18) {
		tmp = t_1;
	} else if (y <= 1.15e+88) {
		tmp = 0.5 * (y / (a / x));
	} else if (y <= 3.6e+130) {
		tmp = t_1;
	} else {
		tmp = 0.5 * (y * (x / a));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = -4.5 * ((z * t) / a)
	t_2 = 0.5 * (x * (y / a))
	tmp = 0
	if y <= -1.1e-89:
		tmp = t_2
	elif y <= -1.8e-168:
		tmp = t_1
	elif y <= -4e-200:
		tmp = t_2
	elif y <= 1.65e+18:
		tmp = t_1
	elif y <= 1.15e+88:
		tmp = 0.5 * (y / (a / x))
	elif y <= 3.6e+130:
		tmp = t_1
	else:
		tmp = 0.5 * (y * (x / a))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(-4.5 * Float64(Float64(z * t) / a))
	t_2 = Float64(0.5 * Float64(x * Float64(y / a)))
	tmp = 0.0
	if (y <= -1.1e-89)
		tmp = t_2;
	elseif (y <= -1.8e-168)
		tmp = t_1;
	elseif (y <= -4e-200)
		tmp = t_2;
	elseif (y <= 1.65e+18)
		tmp = t_1;
	elseif (y <= 1.15e+88)
		tmp = Float64(0.5 * Float64(y / Float64(a / x)));
	elseif (y <= 3.6e+130)
		tmp = t_1;
	else
		tmp = Float64(0.5 * Float64(y * Float64(x / a)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = -4.5 * ((z * t) / a);
	t_2 = 0.5 * (x * (y / a));
	tmp = 0.0;
	if (y <= -1.1e-89)
		tmp = t_2;
	elseif (y <= -1.8e-168)
		tmp = t_1;
	elseif (y <= -4e-200)
		tmp = t_2;
	elseif (y <= 1.65e+18)
		tmp = t_1;
	elseif (y <= 1.15e+88)
		tmp = 0.5 * (y / (a / x));
	elseif (y <= 3.6e+130)
		tmp = t_1;
	else
		tmp = 0.5 * (y * (x / a));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.1e-89], t$95$2, If[LessEqual[y, -1.8e-168], t$95$1, If[LessEqual[y, -4e-200], t$95$2, If[LessEqual[y, 1.65e+18], t$95$1, If[LessEqual[y, 1.15e+88], N[(0.5 * N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+130], t$95$1, N[(0.5 * N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := -4.5 \cdot \frac{z \cdot t}{a}\\
t_2 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{-89}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -1.8 \cdot 10^{-168}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -4 \cdot 10^{-200}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 1.65 \cdot 10^{+18}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.15 \cdot 10^{+88}:\\
\;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\

\mathbf{elif}\;y \leq 3.6 \cdot 10^{+130}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.10000000000000006e-89 or -1.7999999999999999e-168 < y < -3.9999999999999999e-200

    1. Initial program 93.4%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - \left(z \cdot 9\right) \cdot t\right)} + x \cdot y}{a \cdot 2} \]
      4. associate-+l-93.4%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 2}{\left(z \cdot 9\right) \cdot t - x \cdot y}}} \]
      8. associate-/r/93.3%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-93.3%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg93.3%

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

        \[\leadsto \color{blue}{-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2}} \]
      16. distribute-rgt-neg-in93.3%

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

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{a}{x}}} \]
      2. associate-/r/63.7%

        \[\leadsto 0.5 \cdot \color{blue}{\left(\frac{y}{a} \cdot x\right)} \]
    6. Applied egg-rr63.7%

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

    if -1.10000000000000006e-89 < y < -1.7999999999999999e-168 or -3.9999999999999999e-200 < y < 1.65e18 or 1.1500000000000001e88 < y < 3.6000000000000001e130

    1. Initial program 96.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - \left(z \cdot 9\right) \cdot t\right)} + x \cdot y}{a \cdot 2} \]
      4. associate-+l-96.6%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 2}{\left(z \cdot 9\right) \cdot t - x \cdot y}}} \]
      8. associate-/r/96.4%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-96.4%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg96.4%

        \[\leadsto \color{blue}{\left(-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      15. distribute-lft-neg-out96.4%

        \[\leadsto \color{blue}{-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2}} \]
      16. distribute-rgt-neg-in96.4%

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

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

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

    if 1.65e18 < y < 1.1500000000000001e88

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-99.7%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg99.7%

        \[\leadsto \color{blue}{\left(-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      15. distribute-lft-neg-out99.7%

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

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

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{a}{x}}} \]
      2. frac-2neg68.1%

        \[\leadsto 0.5 \cdot \color{blue}{\frac{-y}{-\frac{a}{x}}} \]
      3. div-inv68.1%

        \[\leadsto 0.5 \cdot \color{blue}{\left(\left(-y\right) \cdot \frac{1}{-\frac{a}{x}}\right)} \]
    6. Applied egg-rr68.1%

      \[\leadsto 0.5 \cdot \color{blue}{\left(\left(-y\right) \cdot \frac{1}{-\frac{a}{x}}\right)} \]
    7. Step-by-step derivation
      1. un-div-inv68.1%

        \[\leadsto 0.5 \cdot \color{blue}{\frac{-y}{-\frac{a}{x}}} \]
      2. add-sqr-sqrt0.0%

        \[\leadsto 0.5 \cdot \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{-\frac{a}{x}} \]
      3. sqrt-unprod3.0%

        \[\leadsto 0.5 \cdot \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{-\frac{a}{x}} \]
      4. sqr-neg3.0%

        \[\leadsto 0.5 \cdot \frac{\sqrt{\color{blue}{y \cdot y}}}{-\frac{a}{x}} \]
      5. sqrt-unprod3.0%

        \[\leadsto 0.5 \cdot \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{-\frac{a}{x}} \]
      6. add-sqr-sqrt3.0%

        \[\leadsto 0.5 \cdot \frac{\color{blue}{y}}{-\frac{a}{x}} \]
      7. add-sqr-sqrt10.9%

        \[\leadsto 0.5 \cdot \frac{y}{\color{blue}{\sqrt{-\frac{a}{x}} \cdot \sqrt{-\frac{a}{x}}}} \]
      8. sqrt-unprod27.6%

        \[\leadsto 0.5 \cdot \frac{y}{\color{blue}{\sqrt{\left(-\frac{a}{x}\right) \cdot \left(-\frac{a}{x}\right)}}} \]
      9. sqr-neg27.6%

        \[\leadsto 0.5 \cdot \frac{y}{\sqrt{\color{blue}{\frac{a}{x} \cdot \frac{a}{x}}}} \]
      10. sqrt-unprod25.0%

        \[\leadsto 0.5 \cdot \frac{y}{\color{blue}{\sqrt{\frac{a}{x}} \cdot \sqrt{\frac{a}{x}}}} \]
      11. add-sqr-sqrt68.1%

        \[\leadsto 0.5 \cdot \frac{y}{\color{blue}{\frac{a}{x}}} \]
    8. Applied egg-rr68.1%

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

    if 3.6000000000000001e130 < y

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(t \cdot -9\right)} + x \cdot y}{a \cdot 2} \]
      7. associate-*r*84.0%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z \cdot t, -9, x \cdot y\right)}}{a \cdot 2} \]
    5. Applied egg-rr84.0%

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\left(y \cdot \frac{x}{a}\right)} \]
    8. Simplified71.4%

      \[\leadsto \color{blue}{0.5 \cdot \left(y \cdot \frac{x}{a}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification71.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.1 \cdot 10^{-89}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-168}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-200}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+18}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+88}:\\ \;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+130}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\ \end{array} \]

Alternative 5: 67.4% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := -4.5 \cdot \frac{z \cdot t}{a}\\ t_2 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{if}\;y \leq -1 \cdot 10^{-89}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-168}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-200}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+88}:\\ \;\;\;\;0.5 \cdot \frac{x \cdot y}{a}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+130}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -4.5 (/ (* z t) a))) (t_2 (* 0.5 (* x (/ y a)))))
   (if (<= y -1e-89)
     t_2
     (if (<= y -1.75e-168)
       t_1
       (if (<= y -4e-200)
         t_2
         (if (<= y 7.6e+22)
           t_1
           (if (<= y 1.1e+88)
             (* 0.5 (/ (* x y) a))
             (if (<= y 3.1e+130) t_1 (* 0.5 (* y (/ x a)))))))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = -4.5 * ((z * t) / a);
	double t_2 = 0.5 * (x * (y / a));
	double tmp;
	if (y <= -1e-89) {
		tmp = t_2;
	} else if (y <= -1.75e-168) {
		tmp = t_1;
	} else if (y <= -4e-200) {
		tmp = t_2;
	} else if (y <= 7.6e+22) {
		tmp = t_1;
	} else if (y <= 1.1e+88) {
		tmp = 0.5 * ((x * y) / a);
	} else if (y <= 3.1e+130) {
		tmp = t_1;
	} else {
		tmp = 0.5 * (y * (x / a));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 = (-4.5d0) * ((z * t) / a)
    t_2 = 0.5d0 * (x * (y / a))
    if (y <= (-1d-89)) then
        tmp = t_2
    else if (y <= (-1.75d-168)) then
        tmp = t_1
    else if (y <= (-4d-200)) then
        tmp = t_2
    else if (y <= 7.6d+22) then
        tmp = t_1
    else if (y <= 1.1d+88) then
        tmp = 0.5d0 * ((x * y) / a)
    else if (y <= 3.1d+130) then
        tmp = t_1
    else
        tmp = 0.5d0 * (y * (x / a))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -4.5 * ((z * t) / a);
	double t_2 = 0.5 * (x * (y / a));
	double tmp;
	if (y <= -1e-89) {
		tmp = t_2;
	} else if (y <= -1.75e-168) {
		tmp = t_1;
	} else if (y <= -4e-200) {
		tmp = t_2;
	} else if (y <= 7.6e+22) {
		tmp = t_1;
	} else if (y <= 1.1e+88) {
		tmp = 0.5 * ((x * y) / a);
	} else if (y <= 3.1e+130) {
		tmp = t_1;
	} else {
		tmp = 0.5 * (y * (x / a));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = -4.5 * ((z * t) / a)
	t_2 = 0.5 * (x * (y / a))
	tmp = 0
	if y <= -1e-89:
		tmp = t_2
	elif y <= -1.75e-168:
		tmp = t_1
	elif y <= -4e-200:
		tmp = t_2
	elif y <= 7.6e+22:
		tmp = t_1
	elif y <= 1.1e+88:
		tmp = 0.5 * ((x * y) / a)
	elif y <= 3.1e+130:
		tmp = t_1
	else:
		tmp = 0.5 * (y * (x / a))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(-4.5 * Float64(Float64(z * t) / a))
	t_2 = Float64(0.5 * Float64(x * Float64(y / a)))
	tmp = 0.0
	if (y <= -1e-89)
		tmp = t_2;
	elseif (y <= -1.75e-168)
		tmp = t_1;
	elseif (y <= -4e-200)
		tmp = t_2;
	elseif (y <= 7.6e+22)
		tmp = t_1;
	elseif (y <= 1.1e+88)
		tmp = Float64(0.5 * Float64(Float64(x * y) / a));
	elseif (y <= 3.1e+130)
		tmp = t_1;
	else
		tmp = Float64(0.5 * Float64(y * Float64(x / a)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = -4.5 * ((z * t) / a);
	t_2 = 0.5 * (x * (y / a));
	tmp = 0.0;
	if (y <= -1e-89)
		tmp = t_2;
	elseif (y <= -1.75e-168)
		tmp = t_1;
	elseif (y <= -4e-200)
		tmp = t_2;
	elseif (y <= 7.6e+22)
		tmp = t_1;
	elseif (y <= 1.1e+88)
		tmp = 0.5 * ((x * y) / a);
	elseif (y <= 3.1e+130)
		tmp = t_1;
	else
		tmp = 0.5 * (y * (x / a));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e-89], t$95$2, If[LessEqual[y, -1.75e-168], t$95$1, If[LessEqual[y, -4e-200], t$95$2, If[LessEqual[y, 7.6e+22], t$95$1, If[LessEqual[y, 1.1e+88], N[(0.5 * N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+130], t$95$1, N[(0.5 * N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := -4.5 \cdot \frac{z \cdot t}{a}\\
t_2 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{if}\;y \leq -1 \cdot 10^{-89}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -1.75 \cdot 10^{-168}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -4 \cdot 10^{-200}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 7.6 \cdot 10^{+22}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.1 \cdot 10^{+88}:\\
\;\;\;\;0.5 \cdot \frac{x \cdot y}{a}\\

\mathbf{elif}\;y \leq 3.1 \cdot 10^{+130}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.00000000000000004e-89 or -1.74999999999999991e-168 < y < -3.9999999999999999e-200

    1. Initial program 93.4%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - \left(z \cdot 9\right) \cdot t\right)} + x \cdot y}{a \cdot 2} \]
      4. associate-+l-93.4%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 2}{\left(z \cdot 9\right) \cdot t - x \cdot y}}} \]
      8. associate-/r/93.3%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-93.3%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg93.3%

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

        \[\leadsto \color{blue}{-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2}} \]
      16. distribute-rgt-neg-in93.3%

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

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{a}{x}}} \]
      2. associate-/r/63.7%

        \[\leadsto 0.5 \cdot \color{blue}{\left(\frac{y}{a} \cdot x\right)} \]
    6. Applied egg-rr63.7%

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

    if -1.00000000000000004e-89 < y < -1.74999999999999991e-168 or -3.9999999999999999e-200 < y < 7.6000000000000008e22 or 1.10000000000000004e88 < y < 3.1e130

    1. Initial program 96.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - \left(z \cdot 9\right) \cdot t\right)} + x \cdot y}{a \cdot 2} \]
      4. associate-+l-96.6%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 2}{\left(z \cdot 9\right) \cdot t - x \cdot y}}} \]
      8. associate-/r/96.4%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-96.4%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg96.4%

        \[\leadsto \color{blue}{\left(-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      15. distribute-lft-neg-out96.4%

        \[\leadsto \color{blue}{-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2}} \]
      16. distribute-rgt-neg-in96.4%

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

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

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

    if 7.6000000000000008e22 < y < 1.10000000000000004e88

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-99.7%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg99.7%

        \[\leadsto \color{blue}{\left(-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      15. distribute-lft-neg-out99.7%

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

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

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

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

    if 3.1e130 < y

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(t \cdot -9\right)} + x \cdot y}{a \cdot 2} \]
      7. associate-*r*84.0%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z \cdot t, -9, x \cdot y\right)}}{a \cdot 2} \]
    5. Applied egg-rr84.0%

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\left(y \cdot \frac{x}{a}\right)} \]
    8. Simplified71.4%

      \[\leadsto \color{blue}{0.5 \cdot \left(y \cdot \frac{x}{a}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification71.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{-89}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-168}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-200}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+22}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+88}:\\ \;\;\;\;0.5 \cdot \frac{x \cdot y}{a}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+130}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\ \end{array} \]

Alternative 6: 67.3% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := -4.5 \cdot \frac{z \cdot t}{a}\\ t_2 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{if}\;y \leq -4.7 \cdot 10^{-90}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-168}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-200}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 4.9 \cdot 10^{+20}:\\ \;\;\;\;\left(z \cdot t\right) \cdot \frac{-4.5}{a}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+88}:\\ \;\;\;\;0.5 \cdot \frac{x \cdot y}{a}\\ \mathbf{elif}\;y \leq 2.25 \cdot 10^{+130}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -4.5 (/ (* z t) a))) (t_2 (* 0.5 (* x (/ y a)))))
   (if (<= y -4.7e-90)
     t_2
     (if (<= y -1.75e-168)
       t_1
       (if (<= y -4e-200)
         t_2
         (if (<= y 4.9e+20)
           (* (* z t) (/ -4.5 a))
           (if (<= y 1.15e+88)
             (* 0.5 (/ (* x y) a))
             (if (<= y 2.25e+130) t_1 (* 0.5 (* y (/ x a)))))))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = -4.5 * ((z * t) / a);
	double t_2 = 0.5 * (x * (y / a));
	double tmp;
	if (y <= -4.7e-90) {
		tmp = t_2;
	} else if (y <= -1.75e-168) {
		tmp = t_1;
	} else if (y <= -4e-200) {
		tmp = t_2;
	} else if (y <= 4.9e+20) {
		tmp = (z * t) * (-4.5 / a);
	} else if (y <= 1.15e+88) {
		tmp = 0.5 * ((x * y) / a);
	} else if (y <= 2.25e+130) {
		tmp = t_1;
	} else {
		tmp = 0.5 * (y * (x / a));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 = (-4.5d0) * ((z * t) / a)
    t_2 = 0.5d0 * (x * (y / a))
    if (y <= (-4.7d-90)) then
        tmp = t_2
    else if (y <= (-1.75d-168)) then
        tmp = t_1
    else if (y <= (-4d-200)) then
        tmp = t_2
    else if (y <= 4.9d+20) then
        tmp = (z * t) * ((-4.5d0) / a)
    else if (y <= 1.15d+88) then
        tmp = 0.5d0 * ((x * y) / a)
    else if (y <= 2.25d+130) then
        tmp = t_1
    else
        tmp = 0.5d0 * (y * (x / a))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -4.5 * ((z * t) / a);
	double t_2 = 0.5 * (x * (y / a));
	double tmp;
	if (y <= -4.7e-90) {
		tmp = t_2;
	} else if (y <= -1.75e-168) {
		tmp = t_1;
	} else if (y <= -4e-200) {
		tmp = t_2;
	} else if (y <= 4.9e+20) {
		tmp = (z * t) * (-4.5 / a);
	} else if (y <= 1.15e+88) {
		tmp = 0.5 * ((x * y) / a);
	} else if (y <= 2.25e+130) {
		tmp = t_1;
	} else {
		tmp = 0.5 * (y * (x / a));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = -4.5 * ((z * t) / a)
	t_2 = 0.5 * (x * (y / a))
	tmp = 0
	if y <= -4.7e-90:
		tmp = t_2
	elif y <= -1.75e-168:
		tmp = t_1
	elif y <= -4e-200:
		tmp = t_2
	elif y <= 4.9e+20:
		tmp = (z * t) * (-4.5 / a)
	elif y <= 1.15e+88:
		tmp = 0.5 * ((x * y) / a)
	elif y <= 2.25e+130:
		tmp = t_1
	else:
		tmp = 0.5 * (y * (x / a))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(-4.5 * Float64(Float64(z * t) / a))
	t_2 = Float64(0.5 * Float64(x * Float64(y / a)))
	tmp = 0.0
	if (y <= -4.7e-90)
		tmp = t_2;
	elseif (y <= -1.75e-168)
		tmp = t_1;
	elseif (y <= -4e-200)
		tmp = t_2;
	elseif (y <= 4.9e+20)
		tmp = Float64(Float64(z * t) * Float64(-4.5 / a));
	elseif (y <= 1.15e+88)
		tmp = Float64(0.5 * Float64(Float64(x * y) / a));
	elseif (y <= 2.25e+130)
		tmp = t_1;
	else
		tmp = Float64(0.5 * Float64(y * Float64(x / a)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = -4.5 * ((z * t) / a);
	t_2 = 0.5 * (x * (y / a));
	tmp = 0.0;
	if (y <= -4.7e-90)
		tmp = t_2;
	elseif (y <= -1.75e-168)
		tmp = t_1;
	elseif (y <= -4e-200)
		tmp = t_2;
	elseif (y <= 4.9e+20)
		tmp = (z * t) * (-4.5 / a);
	elseif (y <= 1.15e+88)
		tmp = 0.5 * ((x * y) / a);
	elseif (y <= 2.25e+130)
		tmp = t_1;
	else
		tmp = 0.5 * (y * (x / a));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.7e-90], t$95$2, If[LessEqual[y, -1.75e-168], t$95$1, If[LessEqual[y, -4e-200], t$95$2, If[LessEqual[y, 4.9e+20], N[(N[(z * t), $MachinePrecision] * N[(-4.5 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+88], N[(0.5 * N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e+130], t$95$1, N[(0.5 * N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := -4.5 \cdot \frac{z \cdot t}{a}\\
t_2 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{if}\;y \leq -4.7 \cdot 10^{-90}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -1.75 \cdot 10^{-168}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -4 \cdot 10^{-200}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;y \leq 1.15 \cdot 10^{+88}:\\
\;\;\;\;0.5 \cdot \frac{x \cdot y}{a}\\

\mathbf{elif}\;y \leq 2.25 \cdot 10^{+130}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -4.7e-90 or -1.74999999999999991e-168 < y < -3.9999999999999999e-200

    1. Initial program 93.4%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - \left(z \cdot 9\right) \cdot t\right)} + x \cdot y}{a \cdot 2} \]
      4. associate-+l-93.4%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 2}{\left(z \cdot 9\right) \cdot t - x \cdot y}}} \]
      8. associate-/r/93.3%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-93.3%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg93.3%

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

        \[\leadsto \color{blue}{-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2}} \]
      16. distribute-rgt-neg-in93.3%

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

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{a}{x}}} \]
      2. associate-/r/63.7%

        \[\leadsto 0.5 \cdot \color{blue}{\left(\frac{y}{a} \cdot x\right)} \]
    6. Applied egg-rr63.7%

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

    if -4.7e-90 < y < -1.74999999999999991e-168 or 1.1500000000000001e88 < y < 2.2500000000000002e130

    1. Initial program 93.4%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - \left(z \cdot 9\right) \cdot t\right)} + x \cdot y}{a \cdot 2} \]
      4. associate-+l-93.4%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 2}{\left(z \cdot 9\right) \cdot t - x \cdot y}}} \]
      8. associate-/r/93.2%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-93.2%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg93.2%

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

        \[\leadsto \color{blue}{-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2}} \]
      16. distribute-rgt-neg-in93.2%

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

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

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

    if -3.9999999999999999e-200 < y < 4.9e20

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(t \cdot -9\right)} + x \cdot y}{a \cdot 2} \]
      7. associate-*r*97.6%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z \cdot t, -9, x \cdot y\right)}}{a \cdot 2} \]
    5. Applied egg-rr97.7%

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

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

        \[\leadsto \color{blue}{\frac{-4.5 \cdot \left(t \cdot z\right)}{a}} \]
      2. *-commutative79.3%

        \[\leadsto \frac{-4.5 \cdot \color{blue}{\left(z \cdot t\right)}}{a} \]
      3. *-rgt-identity79.3%

        \[\leadsto \frac{-4.5 \cdot \left(z \cdot t\right)}{\color{blue}{a \cdot 1}} \]
      4. times-frac79.3%

        \[\leadsto \color{blue}{\frac{-4.5}{a} \cdot \frac{z \cdot t}{1}} \]
      5. /-rgt-identity79.3%

        \[\leadsto \frac{-4.5}{a} \cdot \color{blue}{\left(z \cdot t\right)} \]
      6. *-commutative79.3%

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

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

    if 4.9e20 < y < 1.1500000000000001e88

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-99.7%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg99.7%

        \[\leadsto \color{blue}{\left(-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      15. distribute-lft-neg-out99.7%

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

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

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

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

    if 2.2500000000000002e130 < y

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(t \cdot -9\right)} + x \cdot y}{a \cdot 2} \]
      7. associate-*r*84.0%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z \cdot t, -9, x \cdot y\right)}}{a \cdot 2} \]
    5. Applied egg-rr84.0%

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\left(y \cdot \frac{x}{a}\right)} \]
    8. Simplified71.4%

      \[\leadsto \color{blue}{0.5 \cdot \left(y \cdot \frac{x}{a}\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification71.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.7 \cdot 10^{-90}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-168}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-200}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;y \leq 4.9 \cdot 10^{+20}:\\ \;\;\;\;\left(z \cdot t\right) \cdot \frac{-4.5}{a}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+88}:\\ \;\;\;\;0.5 \cdot \frac{x \cdot y}{a}\\ \mathbf{elif}\;y \leq 2.25 \cdot 10^{+130}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\ \end{array} \]

Alternative 7: 93.5% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq 4 \cdot 10^{+304}:\\ \;\;\;\;\frac{x \cdot y - z \cdot \left(t \cdot 9\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (if (<= (* x y) 4e+304)
   (/ (- (* x y) (* z (* t 9.0))) (* a 2.0))
   (* 0.5 (* x (/ y a)))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x * y) <= 4e+304) {
		tmp = ((x * y) - (z * (t * 9.0))) / (a * 2.0);
	} else {
		tmp = 0.5 * (x * (y / a));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 ((x * y) <= 4d+304) then
        tmp = ((x * y) - (z * (t * 9.0d0))) / (a * 2.0d0)
    else
        tmp = 0.5d0 * (x * (y / a))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x * y) <= 4e+304) {
		tmp = ((x * y) - (z * (t * 9.0))) / (a * 2.0);
	} else {
		tmp = 0.5 * (x * (y / a));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if (x * y) <= 4e+304:
		tmp = ((x * y) - (z * (t * 9.0))) / (a * 2.0)
	else:
		tmp = 0.5 * (x * (y / a))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(x * y) <= 4e+304)
		tmp = Float64(Float64(Float64(x * y) - Float64(z * Float64(t * 9.0))) / Float64(a * 2.0));
	else
		tmp = Float64(0.5 * Float64(x * Float64(y / a)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((x * y) <= 4e+304)
		tmp = ((x * y) - (z * (t * 9.0))) / (a * 2.0);
	else
		tmp = 0.5 * (x * (y / a));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], 4e+304], N[(N[(N[(x * y), $MachinePrecision] - N[(z * N[(t * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq 4 \cdot 10^{+304}:\\
\;\;\;\;\frac{x \cdot y - z \cdot \left(t \cdot 9\right)}{a \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < 3.9999999999999998e304

    1. Initial program 96.5%

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

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

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

    if 3.9999999999999998e304 < (*.f64 x y)

    1. Initial program 57.9%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - \left(z \cdot 9\right) \cdot t\right)} + x \cdot y}{a \cdot 2} \]
      4. associate-+l-57.9%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 2}{\left(z \cdot 9\right) \cdot t - x \cdot y}}} \]
      8. associate-/r/57.9%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-57.9%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg57.9%

        \[\leadsto \color{blue}{\left(-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      15. distribute-lft-neg-out57.9%

        \[\leadsto \color{blue}{-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2}} \]
      16. distribute-rgt-neg-in57.9%

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

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{a}{x}}} \]
      2. associate-/r/99.8%

        \[\leadsto 0.5 \cdot \color{blue}{\left(\frac{y}{a} \cdot x\right)} \]
    6. Applied egg-rr99.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq 4 \cdot 10^{+304}:\\ \;\;\;\;\frac{x \cdot y - z \cdot \left(t \cdot 9\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \end{array} \]

Alternative 8: 93.5% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq 4 \cdot 10^{+304}:\\ \;\;\;\;\frac{x \cdot y - t \cdot \left(z \cdot 9\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (if (<= (* x y) 4e+304)
   (/ (- (* x y) (* t (* z 9.0))) (* a 2.0))
   (* 0.5 (* x (/ y a)))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x * y) <= 4e+304) {
		tmp = ((x * y) - (t * (z * 9.0))) / (a * 2.0);
	} else {
		tmp = 0.5 * (x * (y / a));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 ((x * y) <= 4d+304) then
        tmp = ((x * y) - (t * (z * 9.0d0))) / (a * 2.0d0)
    else
        tmp = 0.5d0 * (x * (y / a))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x * y) <= 4e+304) {
		tmp = ((x * y) - (t * (z * 9.0))) / (a * 2.0);
	} else {
		tmp = 0.5 * (x * (y / a));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if (x * y) <= 4e+304:
		tmp = ((x * y) - (t * (z * 9.0))) / (a * 2.0)
	else:
		tmp = 0.5 * (x * (y / a))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(x * y) <= 4e+304)
		tmp = Float64(Float64(Float64(x * y) - Float64(t * Float64(z * 9.0))) / Float64(a * 2.0));
	else
		tmp = Float64(0.5 * Float64(x * Float64(y / a)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((x * y) <= 4e+304)
		tmp = ((x * y) - (t * (z * 9.0))) / (a * 2.0);
	else
		tmp = 0.5 * (x * (y / a));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], 4e+304], N[(N[(N[(x * y), $MachinePrecision] - N[(t * N[(z * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq 4 \cdot 10^{+304}:\\
\;\;\;\;\frac{x \cdot y - t \cdot \left(z \cdot 9\right)}{a \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < 3.9999999999999998e304

    1. Initial program 96.5%

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

    if 3.9999999999999998e304 < (*.f64 x y)

    1. Initial program 57.9%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - \left(z \cdot 9\right) \cdot t\right)} + x \cdot y}{a \cdot 2} \]
      4. associate-+l-57.9%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 2}{\left(z \cdot 9\right) \cdot t - x \cdot y}}} \]
      8. associate-/r/57.9%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-57.9%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg57.9%

        \[\leadsto \color{blue}{\left(-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      15. distribute-lft-neg-out57.9%

        \[\leadsto \color{blue}{-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2}} \]
      16. distribute-rgt-neg-in57.9%

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

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{a}{x}}} \]
      2. associate-/r/99.8%

        \[\leadsto 0.5 \cdot \color{blue}{\left(\frac{y}{a} \cdot x\right)} \]
    6. Applied egg-rr99.8%

      \[\leadsto 0.5 \cdot \color{blue}{\left(\frac{y}{a} \cdot x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq 4 \cdot 10^{+304}:\\ \;\;\;\;\frac{x \cdot y - t \cdot \left(z \cdot 9\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \end{array} \]

Alternative 9: 52.3% accurate, 1.4× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 7.5 \cdot 10^{+124}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (if (<= y 7.5e+124) (* -4.5 (/ (* z t) a)) (* -4.5 (/ z (/ a t)))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= 7.5e+124) {
		tmp = -4.5 * ((z * t) / a);
	} else {
		tmp = -4.5 * (z / (a / t));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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+124) then
        tmp = (-4.5d0) * ((z * t) / a)
    else
        tmp = (-4.5d0) * (z / (a / t))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= 7.5e+124) {
		tmp = -4.5 * ((z * t) / a);
	} else {
		tmp = -4.5 * (z / (a / t));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if y <= 7.5e+124:
		tmp = -4.5 * ((z * t) / a)
	else:
		tmp = -4.5 * (z / (a / t))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= 7.5e+124)
		tmp = Float64(-4.5 * Float64(Float64(z * t) / a));
	else
		tmp = Float64(-4.5 * Float64(z / Float64(a / t)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= 7.5e+124)
		tmp = -4.5 * ((z * t) / a);
	else
		tmp = -4.5 * (z / (a / t));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 7.5e+124], N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(-4.5 * N[(z / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.5 \cdot 10^{+124}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 7.50000000000000038e124

    1. Initial program 95.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - \left(z \cdot 9\right) \cdot t\right)} + x \cdot y}{a \cdot 2} \]
      4. associate-+l-95.6%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 2}{\left(z \cdot 9\right) \cdot t - x \cdot y}}} \]
      8. associate-/r/95.5%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-95.5%

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

        \[\leadsto \color{blue}{\left(-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      15. distribute-lft-neg-out95.5%

        \[\leadsto \color{blue}{-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2}} \]
      16. distribute-rgt-neg-in95.5%

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

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

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

    if 7.50000000000000038e124 < y

    1. Initial program 84.3%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - \left(z \cdot 9\right) \cdot t\right)} + x \cdot y}{a \cdot 2} \]
      4. associate-+l-84.3%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 2}{\left(z \cdot 9\right) \cdot t - x \cdot y}}} \]
      8. associate-/r/84.2%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
      13. associate-+l-84.2%

        \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      14. sub0-neg84.2%

        \[\leadsto \color{blue}{\left(-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
      15. distribute-lft-neg-out84.2%

        \[\leadsto \color{blue}{-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2}} \]
      16. distribute-rgt-neg-in84.2%

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

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

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

        \[\leadsto -4.5 \cdot \color{blue}{\frac{t}{\frac{a}{z}}} \]
      2. associate-/r/36.2%

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

      \[\leadsto \color{blue}{-4.5 \cdot \left(\frac{t}{a} \cdot z\right)} \]
    7. Step-by-step derivation
      1. *-commutative36.2%

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

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

        \[\leadsto -4.5 \cdot \color{blue}{\frac{z}{\frac{a}{t}}} \]
    8. Applied egg-rr36.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 7.5 \cdot 10^{+124}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \end{array} \]

Alternative 10: 51.6% accurate, 1.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ -4.5 \cdot \left(z \cdot \frac{t}{a}\right) \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a) :precision binary64 (* -4.5 (* z (/ t a))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	return -4.5 * (z * (t / a));
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 = (-4.5d0) * (z * (t / a))
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
	return -4.5 * (z * (t / a));
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	return -4.5 * (z * (t / a))
x, y = sort([x, y])
function code(x, y, z, t, a)
	return Float64(-4.5 * Float64(z * Float64(t / a)))
end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y, z, t, a)
	tmp = -4.5 * (z * (t / a));
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := N[(-4.5 * N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
-4.5 \cdot \left(z \cdot \frac{t}{a}\right)
\end{array}
Derivation
  1. Initial program 93.5%

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

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

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

      \[\leadsto \frac{\color{blue}{\left(0 - \left(z \cdot 9\right) \cdot t\right)} + x \cdot y}{a \cdot 2} \]
    4. associate-+l-93.5%

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

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

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

      \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 2}{\left(z \cdot 9\right) \cdot t - x \cdot y}}} \]
    8. associate-/r/93.4%

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

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

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

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

      \[\leadsto \left(\color{blue}{\left(0 - x \cdot y\right)} + \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2} \]
    13. associate-+l-93.4%

      \[\leadsto \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
    14. sub0-neg93.4%

      \[\leadsto \color{blue}{\left(-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]
    15. distribute-lft-neg-out93.4%

      \[\leadsto \color{blue}{-\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \frac{-1}{a \cdot 2}} \]
    16. distribute-rgt-neg-in93.4%

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

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

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

      \[\leadsto -4.5 \cdot \color{blue}{\frac{t}{\frac{a}{z}}} \]
    2. associate-/r/53.6%

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

    \[\leadsto \color{blue}{-4.5 \cdot \left(\frac{t}{a} \cdot z\right)} \]
  7. Final simplification53.6%

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

Developer target: 93.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a < -2.090464557976709 \cdot 10^{+86}:\\ \;\;\;\;0.5 \cdot \frac{y \cdot x}{a} - 4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;a < 2.144030707833976 \cdot 10^{+99}:\\ \;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(x \cdot 0.5\right) - \frac{t}{a} \cdot \left(z \cdot 4.5\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (< a -2.090464557976709e+86)
   (- (* 0.5 (/ (* y x) a)) (* 4.5 (/ t (/ a z))))
   (if (< a 2.144030707833976e+99)
     (/ (- (* x y) (* z (* 9.0 t))) (* a 2.0))
     (- (* (/ y a) (* x 0.5)) (* (/ t a) (* z 4.5))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a < -2.090464557976709e+86) {
		tmp = (0.5 * ((y * x) / a)) - (4.5 * (t / (a / z)));
	} else if (a < 2.144030707833976e+99) {
		tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
	} else {
		tmp = ((y / a) * (x * 0.5)) - ((t / a) * (z * 4.5));
	}
	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 < (-2.090464557976709d+86)) then
        tmp = (0.5d0 * ((y * x) / a)) - (4.5d0 * (t / (a / z)))
    else if (a < 2.144030707833976d+99) then
        tmp = ((x * y) - (z * (9.0d0 * t))) / (a * 2.0d0)
    else
        tmp = ((y / a) * (x * 0.5d0)) - ((t / a) * (z * 4.5d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a < -2.090464557976709e+86) {
		tmp = (0.5 * ((y * x) / a)) - (4.5 * (t / (a / z)));
	} else if (a < 2.144030707833976e+99) {
		tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
	} else {
		tmp = ((y / a) * (x * 0.5)) - ((t / a) * (z * 4.5));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a < -2.090464557976709e+86:
		tmp = (0.5 * ((y * x) / a)) - (4.5 * (t / (a / z)))
	elif a < 2.144030707833976e+99:
		tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0)
	else:
		tmp = ((y / a) * (x * 0.5)) - ((t / a) * (z * 4.5))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a < -2.090464557976709e+86)
		tmp = Float64(Float64(0.5 * Float64(Float64(y * x) / a)) - Float64(4.5 * Float64(t / Float64(a / z))));
	elseif (a < 2.144030707833976e+99)
		tmp = Float64(Float64(Float64(x * y) - Float64(z * Float64(9.0 * t))) / Float64(a * 2.0));
	else
		tmp = Float64(Float64(Float64(y / a) * Float64(x * 0.5)) - Float64(Float64(t / a) * Float64(z * 4.5)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a < -2.090464557976709e+86)
		tmp = (0.5 * ((y * x) / a)) - (4.5 * (t / (a / z)));
	elseif (a < 2.144030707833976e+99)
		tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
	else
		tmp = ((y / a) * (x * 0.5)) - ((t / a) * (z * 4.5));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Less[a, -2.090464557976709e+86], N[(N[(0.5 * N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] - N[(4.5 * N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[a, 2.144030707833976e+99], N[(N[(N[(x * y), $MachinePrecision] - N[(z * N[(9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / a), $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision] - N[(N[(t / a), $MachinePrecision] * N[(z * 4.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a < -2.090464557976709 \cdot 10^{+86}:\\
\;\;\;\;0.5 \cdot \frac{y \cdot x}{a} - 4.5 \cdot \frac{t}{\frac{a}{z}}\\

\mathbf{elif}\;a < 2.144030707833976 \cdot 10^{+99}:\\
\;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023224 
(FPCore (x y z t a)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, I"
  :precision binary64

  :herbie-target
  (if (< a -2.090464557976709e+86) (- (* 0.5 (/ (* y x) a)) (* 4.5 (/ t (/ a z)))) (if (< a 2.144030707833976e+99) (/ (- (* x y) (* z (* 9.0 t))) (* a 2.0)) (- (* (/ y a) (* x 0.5)) (* (/ t a) (* z 4.5)))))

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