Data.Colour.Matrix:inverse from colour-2.3.3, B

Percentage Accurate: 91.2% → 95.0%
Time: 6.3s
Alternatives: 8
Speedup: 0.5×

Specification

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

\\
\frac{x \cdot y - z \cdot t}{a}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 8 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.2% accurate, 1.0× speedup?

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

\\
\frac{x \cdot y - z \cdot t}{a}
\end{array}

Alternative 1: 95.0% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 z t) < -5e307

    1. Initial program 69.7%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Taylor expanded in x around 0 80.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a}} \]
    3. Step-by-step derivation
      1. *-commutative80.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-z}{\frac{a}{t}}} \]
      3. distribute-neg-frac99.9%

        \[\leadsto \color{blue}{-\frac{z}{\frac{a}{t}}} \]
      4. frac-2neg99.9%

        \[\leadsto -\color{blue}{\frac{-z}{-\frac{a}{t}}} \]
      5. distribute-neg-frac99.9%

        \[\leadsto \color{blue}{\frac{-\left(-z\right)}{-\frac{a}{t}}} \]
      6. remove-double-neg99.9%

        \[\leadsto \frac{\color{blue}{z}}{-\frac{a}{t}} \]
      7. distribute-neg-frac99.9%

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

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

    if -5e307 < (*.f64 z t) < 1.00000000000000003e257

    1. Initial program 95.2%

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

    if 1.00000000000000003e257 < (*.f64 z t)

    1. Initial program 59.9%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Taylor expanded in x around 0 59.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a}} \]
    3. Step-by-step derivation
      1. *-commutative59.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-z}{a}} \cdot t \]
    4. Simplified94.7%

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

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

Alternative 2: 93.1% accurate, 0.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z t) < 1.00000000000000003e257

    1. Initial program 93.1%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Step-by-step derivation
      1. div-sub91.0%

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} - \frac{z \cdot t}{a}} \]
      2. *-commutative91.0%

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

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

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

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

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

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

    if 1.00000000000000003e257 < (*.f64 z t)

    1. Initial program 59.9%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Taylor expanded in x around 0 59.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a}} \]
    3. Step-by-step derivation
      1. *-commutative59.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-z}{a}} \cdot t \]
    4. Simplified94.7%

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

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

Alternative 3: 73.1% accurate, 0.5× speedup?

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

\mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-190}:\\
\;\;\;\;\frac{x \cdot y}{a}\\

\mathbf{elif}\;z \cdot t \leq 40000:\\
\;\;\;\;x \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 z t) < -0.20000000000000001

    1. Initial program 89.5%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Taylor expanded in x around 0 73.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a}} \]
    3. Step-by-step derivation
      1. *-commutative73.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-z}{a}} \cdot t \]
    4. Simplified74.9%

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

    if -0.20000000000000001 < (*.f64 z t) < 5.00000000000000034e-190

    1. Initial program 96.4%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Taylor expanded in x around inf 86.8%

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

    if 5.00000000000000034e-190 < (*.f64 z t) < 4e4

    1. Initial program 84.0%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Taylor expanded in x around inf 59.5%

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

        \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
    4. Simplified68.3%

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{x \cdot y}}} \]
    6. Applied egg-rr59.5%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{a}{x}}{y}}} \]
      2. clear-num67.4%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{x}}} \]
      3. associate-/r/69.2%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot x} \]
    8. Applied egg-rr69.2%

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

    if 4e4 < (*.f64 z t)

    1. Initial program 86.2%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Taylor expanded in x around 0 67.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a}} \]
    3. Step-by-step derivation
      1. mul-1-neg67.9%

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a}{z}}} \]
    4. Simplified77.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot t \leq -0.2:\\ \;\;\;\;t \cdot \frac{-z}{a}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-190}:\\ \;\;\;\;\frac{x \cdot y}{a}\\ \mathbf{elif}\;z \cdot t \leq 40000:\\ \;\;\;\;x \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{a}{z}}\\ \end{array} \]

Alternative 4: 72.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -8.00000000000000038e-4

    1. Initial program 89.3%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Taylor expanded in x around inf 76.1%

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

    if -8.00000000000000038e-4 < (*.f64 x y) < 5e45

    1. Initial program 92.0%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Taylor expanded in x around 0 71.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a}} \]
    3. Step-by-step derivation
      1. mul-1-neg71.5%

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a}{z}}} \]
    4. Simplified72.7%

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

    if 5e45 < (*.f64 x y)

    1. Initial program 88.7%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Taylor expanded in x around inf 77.7%

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

        \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
    4. Simplified81.3%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{a}{y}}} \]
    6. Applied egg-rr78.1%

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

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

Alternative 5: 50.4% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -1.99999999999999998e-159

    1. Initial program 92.4%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Taylor expanded in x around inf 66.6%

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

    if -1.99999999999999998e-159 < (*.f64 x y)

    1. Initial program 89.7%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Taylor expanded in x around inf 46.5%

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

        \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
    4. Simplified46.3%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{a}{y}}} \]
    6. Applied egg-rr47.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -2 \cdot 10^{-159}:\\ \;\;\;\;\frac{x \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{a}{y}}\\ \end{array} \]

Alternative 6: 50.9% accurate, 1.8× speedup?

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

    \[\frac{x \cdot y - z \cdot t}{a} \]
  2. Taylor expanded in x around inf 53.7%

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

      \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
  4. Simplified51.1%

    \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
  5. Final simplification51.1%

    \[\leadsto y \cdot \frac{x}{a} \]

Alternative 7: 50.7% accurate, 1.8× speedup?

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

    \[\frac{x \cdot y - z \cdot t}{a} \]
  2. Taylor expanded in x around inf 53.7%

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

      \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
  4. Simplified51.1%

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

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

      \[\leadsto \color{blue}{\frac{1}{\frac{a}{x \cdot y}}} \]
  6. Applied egg-rr53.5%

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

      \[\leadsto \frac{1}{\color{blue}{\frac{\frac{a}{x}}{y}}} \]
    2. clear-num50.8%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{x}}} \]
    3. associate-/r/52.9%

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

    \[\leadsto \color{blue}{\frac{y}{a} \cdot x} \]
  9. Final simplification52.9%

    \[\leadsto x \cdot \frac{y}{a} \]

Alternative 8: 50.7% accurate, 1.8× speedup?

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

    \[\frac{x \cdot y - z \cdot t}{a} \]
  2. Taylor expanded in x around inf 53.7%

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

      \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
  4. Simplified51.1%

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

      \[\leadsto \color{blue}{\frac{x}{\frac{a}{y}}} \]
  6. Applied egg-rr52.4%

    \[\leadsto \color{blue}{\frac{x}{\frac{a}{y}}} \]
  7. Final simplification52.4%

    \[\leadsto \frac{x}{\frac{a}{y}} \]

Developer target: 91.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z < 6.309831121978371 \cdot 10^{-71}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023332 
(FPCore (x y z t a)
  :name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
  :precision binary64

  :herbie-target
  (if (< z -2.468684968699548e+170) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z))))

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