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

Percentage Accurate: 98.2% → 98.5%
Time: 22.8s
Alternatives: 7
Speedup: 1.0×

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 7 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: 98.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: 98.5% accurate, 0.1× speedup?

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

\\
\frac{\mathsf{fma}\left(y, x, t \cdot \left(-z\right)\right)}{a}
\end{array}
Derivation
  1. Initial program 97.9%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot x}{a} + -1 \cdot \frac{t \cdot z}{a}} \]
    2. mul-1-neg94.0%

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

      \[\leadsto \color{blue}{\frac{y \cdot x}{a} - \frac{t \cdot z}{a}} \]
    4. div-sub97.9%

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

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

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

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

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

Alternative 2: 66.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \left(-z\right) \cdot \frac{t}{a}\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{-101}:\\
\;\;\;\;y \cdot \frac{x}{a}\\

\mathbf{elif}\;y \leq 1.45 \cdot 10^{+44}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 2.05 \cdot 10^{+87}:\\
\;\;\;\;\frac{y \cdot x}{a}\\

\mathbf{elif}\;y \leq 9.6 \cdot 10^{+101}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.3500000000000001e-101

    1. Initial program 97.6%

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

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

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

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

    if -1.3500000000000001e-101 < y < 1.4500000000000001e44 or 2.05e87 < y < 9.59999999999999953e101

    1. Initial program 97.1%

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

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{a} + -1 \cdot \frac{t \cdot z}{a}} \]
      2. mul-1-neg94.4%

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

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

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

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

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

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

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

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

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

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

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

    if 1.4500000000000001e44 < y < 2.05e87

    1. Initial program 100.0%

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

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

    if 9.59999999999999953e101 < y

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{-101}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{+44}:\\ \;\;\;\;\left(-z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{+87}:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \mathbf{elif}\;y \leq 9.6 \cdot 10^{+101}:\\ \;\;\;\;\left(-z\right) \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{a}{x}}\\ \end{array} \]

Alternative 3: 66.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-101}:\\
\;\;\;\;y \cdot \frac{x}{a}\\

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

\mathbf{elif}\;y \leq 1.95 \cdot 10^{+87}:\\
\;\;\;\;\frac{y \cdot x}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.39999999999999995e-101

    1. Initial program 97.6%

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

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

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

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

    if -1.39999999999999995e-101 < y < 1.9500000000000001e44

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9500000000000001e44 < y < 1.9500000000000001e87

    1. Initial program 100.0%

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

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

    if 1.9500000000000001e87 < y < 1.8999999999999999e101

    1. Initial program 99.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-z}{\frac{a}{t}}} \]
      6. associate-/r/75.4%

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

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

    if 1.8999999999999999e101 < y

    1. Initial program 99.8%

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

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

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

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

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

Alternative 4: 66.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-109}:\\
\;\;\;\;y \cdot \frac{x}{a}\\

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

\mathbf{elif}\;y \leq 2.05 \cdot 10^{+87}:\\
\;\;\;\;\frac{y \cdot x}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -4.79999999999999977e-109

    1. Initial program 97.7%

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

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

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

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

    if -4.79999999999999977e-109 < y < 1.9000000000000001e44

    1. Initial program 97.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-z}{\frac{a}{t}}} \]
      6. associate-/r/66.9%

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

      \[\leadsto \color{blue}{\frac{-z}{a} \cdot t} \]
    5. Step-by-step derivation
      1. add-sqr-sqrt32.2%

        \[\leadsto \frac{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}{a} \cdot t \]
      2. sqrt-unprod26.8%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{a} \cdot t \]
      5. add-sqr-sqrt3.2%

        \[\leadsto \frac{\color{blue}{z}}{a} \cdot t \]
      6. associate-/r/4.1%

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{t}}} \]
      7. frac-2neg4.1%

        \[\leadsto \color{blue}{\frac{-z}{-\frac{a}{t}}} \]
      8. add-sqr-sqrt2.4%

        \[\leadsto \frac{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}{-\frac{a}{t}} \]
      9. sqrt-unprod30.1%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\frac{a}{t}} \]
      10. sqr-neg30.1%

        \[\leadsto \frac{\sqrt{\color{blue}{z \cdot z}}}{-\frac{a}{t}} \]
      11. sqrt-unprod35.5%

        \[\leadsto \frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{-\frac{a}{t}} \]
      12. add-sqr-sqrt71.4%

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

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

    if 1.9000000000000001e44 < y < 2.05e87

    1. Initial program 100.0%

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

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

    if 2.05e87 < y < 3.09999999999999999e101

    1. Initial program 99.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-z}{\frac{a}{t}}} \]
      6. associate-/r/75.4%

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

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

    if 3.09999999999999999e101 < y

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{-109}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+44}:\\ \;\;\;\;\frac{z}{-\frac{a}{t}}\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{+87}:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+101}:\\ \;\;\;\;t \cdot \frac{-z}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{a}{x}}\\ \end{array} \]

Alternative 5: 67.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-102}:\\
\;\;\;\;y \cdot \frac{x}{a}\\

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

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


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

    1. Initial program 97.6%

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

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

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

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

    if -5.00000000000000026e-102 < y < 1.02000000000000002e101

    1. Initial program 97.3%

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

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

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

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

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

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

    if 1.02000000000000002e101 < y

    1. Initial program 99.8%

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

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

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

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

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

Alternative 6: 98.2% accurate, 1.0× speedup?

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

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

    \[\frac{x \cdot y - z \cdot t}{a} \]
  2. Final simplification97.9%

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

Alternative 7: 50.0% accurate, 1.8× speedup?

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

\\
y \cdot \frac{x}{a}
\end{array}
Derivation
  1. Initial program 97.9%

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

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

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

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

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

Developer target: 92.8% 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 2023278 
(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))