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

Percentage Accurate: 91.6% → 97.5%
Time: 9.6s
Alternatives: 10
Speedup: 0.7×

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 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.6% 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: 97.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-z}{a} \cdot t\\ t_2 := y \cdot x - t \cdot z\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, x, t\_1\right)\\ \mathbf{elif}\;t\_2 \leq 10^{+280}:\\ \;\;\;\;\frac{t\_2}{a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-1}{\frac{a}{x}}, -y, t\_1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (/ (- z) a) t)) (t_2 (- (* y x) (* t z))))
   (if (<= t_2 (- INFINITY))
     (fma (/ y a) x t_1)
     (if (<= t_2 1e+280) (/ t_2 a) (fma (/ -1.0 (/ a x)) (- y) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (-z / a) * t;
	double t_2 = (y * x) - (t * z);
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = fma((y / a), x, t_1);
	} else if (t_2 <= 1e+280) {
		tmp = t_2 / a;
	} else {
		tmp = fma((-1.0 / (a / x)), -y, t_1);
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(Float64(-z) / a) * t)
	t_2 = Float64(Float64(y * x) - Float64(t * z))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = fma(Float64(y / a), x, t_1);
	elseif (t_2 <= 1e+280)
		tmp = Float64(t_2 / a);
	else
		tmp = fma(Float64(-1.0 / Float64(a / x)), Float64(-y), t_1);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[((-z) / a), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y / a), $MachinePrecision] * x + t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 1e+280], N[(t$95$2 / a), $MachinePrecision], N[(N[(-1.0 / N[(a / x), $MachinePrecision]), $MachinePrecision] * (-y) + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{-z}{a} \cdot t\\
t_2 := y \cdot x - t \cdot z\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, x, t\_1\right)\\

\mathbf{elif}\;t\_2 \leq 10^{+280}:\\
\;\;\;\;\frac{t\_2}{a}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-1}{\frac{a}{x}}, -y, t\_1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (*.f64 x y) (*.f64 z t)) < -inf.0

    1. Initial program 58.2%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot t}{a}} \]
      2. lift--.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y - z \cdot t}}{a} \]
      3. div-subN/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} - \frac{z \cdot t}{a}} \]
      4. sub-negN/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} + \left(\mathsf{neg}\left(\frac{z \cdot t}{a}\right)\right)} \]
      5. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{a} + \left(\mathsf{neg}\left(\frac{z \cdot t}{a}\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \color{blue}{x \cdot \frac{y}{a}} + \left(\mathsf{neg}\left(\frac{z \cdot t}{a}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{y}{a} \cdot x} + \left(\mathsf{neg}\left(\frac{z \cdot t}{a}\right)\right) \]
      8. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, x, \mathsf{neg}\left(\frac{z \cdot t}{a}\right)\right)} \]
      9. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a}}, x, \mathsf{neg}\left(\frac{z \cdot t}{a}\right)\right) \]
      10. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \mathsf{neg}\left(\frac{\color{blue}{z \cdot t}}{a}\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \mathsf{neg}\left(\frac{\color{blue}{t \cdot z}}{a}\right)\right) \]
      12. associate-/l*N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \mathsf{neg}\left(\color{blue}{t \cdot \frac{z}{a}}\right)\right) \]
      13. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}}\right) \]
      15. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(-t\right)} \cdot \frac{z}{a}\right) \]
      16. lower-/.f6496.3

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

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

    if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1e280

    1. Initial program 99.0%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing

    if 1e280 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 77.8%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot t}{a}} \]
      2. lift--.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y - z \cdot t}}{a} \]
      3. div-subN/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} - \frac{z \cdot t}{a}} \]
      4. sub-negN/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} + \left(\mathsf{neg}\left(\frac{z \cdot t}{a}\right)\right)} \]
      5. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot t}{a}\right)\right) + \frac{x \cdot y}{a}} \]
      6. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{z \cdot t}}{a}\right)\right) + \frac{x \cdot y}{a} \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{z \cdot \frac{t}{a}}\right)\right) + \frac{x \cdot y}{a} \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \frac{t}{a}} + \frac{x \cdot y}{a} \]
      9. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(z\right), \frac{t}{a}, \frac{x \cdot y}{a}\right)} \]
      10. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-z}, \frac{t}{a}, \frac{x \cdot y}{a}\right) \]
      11. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-z, \color{blue}{\frac{t}{a}}, \frac{x \cdot y}{a}\right) \]
      12. lower-/.f6480.4

        \[\leadsto \mathsf{fma}\left(-z, \frac{t}{a}, \color{blue}{\frac{x \cdot y}{a}}\right) \]
      13. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-z, \frac{t}{a}, \frac{\color{blue}{x \cdot y}}{a}\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-z, \frac{t}{a}, \frac{\color{blue}{y \cdot x}}{a}\right) \]
      15. lower-*.f6480.4

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(-z, \frac{t}{a}, \frac{y \cdot x}{a}\right)} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

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

        \[\leadsto \mathsf{fma}\left(-z, \color{blue}{\frac{1}{\frac{a}{t}}}, \frac{y \cdot x}{a}\right) \]
      3. lower-/.f64N/A

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

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

      \[\leadsto \mathsf{fma}\left(-z, \color{blue}{\frac{1}{\frac{a}{t}}}, \frac{y \cdot x}{a}\right) \]
    7. Step-by-step derivation
      1. lift-fma.f64N/A

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{a} + \left(-z\right) \cdot \frac{1}{\frac{a}{t}}} \]
      3. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot x}{a}} + \left(-z\right) \cdot \frac{1}{\frac{a}{t}} \]
      4. clear-numN/A

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{y \cdot x}}} + \left(-z\right) \cdot \frac{1}{\frac{a}{t}} \]
      5. lift-*.f64N/A

        \[\leadsto \frac{1}{\frac{a}{\color{blue}{y \cdot x}}} + \left(-z\right) \cdot \frac{1}{\frac{a}{t}} \]
      6. associate-/l/N/A

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{a}{x}}{y}}} + \left(-z\right) \cdot \frac{1}{\frac{a}{t}} \]
      7. lift-/.f64N/A

        \[\leadsto \frac{1}{\frac{\color{blue}{\frac{a}{x}}}{y}} + \left(-z\right) \cdot \frac{1}{\frac{a}{t}} \]
      8. frac-2negN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{\mathsf{neg}\left(\frac{a}{x}\right)}{\mathsf{neg}\left(y\right)}}} + \left(-z\right) \cdot \frac{1}{\frac{a}{t}} \]
      9. lift-neg.f64N/A

        \[\leadsto \frac{1}{\frac{\mathsf{neg}\left(\frac{a}{x}\right)}{\color{blue}{-y}}} + \left(-z\right) \cdot \frac{1}{\frac{a}{t}} \]
      10. associate-/r/N/A

        \[\leadsto \color{blue}{\frac{1}{\mathsf{neg}\left(\frac{a}{x}\right)} \cdot \left(-y\right)} + \left(-z\right) \cdot \frac{1}{\frac{a}{t}} \]
      11. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\mathsf{neg}\left(\frac{a}{x}\right)}, -y, \left(-z\right) \cdot \frac{1}{\frac{a}{t}}\right)} \]
      12. frac-2negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{a}{x}\right)\right)\right)}}, -y, \left(-z\right) \cdot \frac{1}{\frac{a}{t}}\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-1}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{a}{x}\right)\right)\right)}, -y, \left(-z\right) \cdot \frac{1}{\frac{a}{t}}\right) \]
      14. lift-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\frac{a}{x}}\right)\right)\right)}, -y, \left(-z\right) \cdot \frac{1}{\frac{a}{t}}\right) \]
      15. distribute-neg-frac2N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1}{\mathsf{neg}\left(\color{blue}{\frac{a}{\mathsf{neg}\left(x\right)}}\right)}, -y, \left(-z\right) \cdot \frac{1}{\frac{a}{t}}\right) \]
      16. distribute-frac-negN/A

        \[\leadsto \mathsf{fma}\left(\frac{-1}{\color{blue}{\frac{\mathsf{neg}\left(a\right)}{\mathsf{neg}\left(x\right)}}}, -y, \left(-z\right) \cdot \frac{1}{\frac{a}{t}}\right) \]
      17. frac-2negN/A

        \[\leadsto \mathsf{fma}\left(\frac{-1}{\color{blue}{\frac{a}{x}}}, -y, \left(-z\right) \cdot \frac{1}{\frac{a}{t}}\right) \]
      18. lift-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1}{\color{blue}{\frac{a}{x}}}, -y, \left(-z\right) \cdot \frac{1}{\frac{a}{t}}\right) \]
      19. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{\frac{a}{x}}}, -y, \left(-z\right) \cdot \frac{1}{\frac{a}{t}}\right) \]
      20. lift-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{-1}{\frac{a}{x}}, -y, \left(-z\right) \cdot \color{blue}{\frac{1}{\frac{a}{t}}}\right) \]
      21. un-div-invN/A

        \[\leadsto \mathsf{fma}\left(\frac{-1}{\frac{a}{x}}, -y, \color{blue}{\frac{-z}{\frac{a}{t}}}\right) \]
      22. lift-/.f64N/A

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{\frac{a}{x}}, -y, \frac{-z}{a} \cdot t\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification98.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot x - t \cdot z \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, x, \frac{-z}{a} \cdot t\right)\\ \mathbf{elif}\;y \cdot x - t \cdot z \leq 10^{+280}:\\ \;\;\;\;\frac{y \cdot x - t \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-1}{\frac{a}{x}}, -y, \frac{-z}{a} \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 55.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{a} \cdot x\\ t_2 := \frac{y \cdot x - t \cdot z}{a}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+261}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+301}:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (/ y a) x)) (t_2 (/ (- (* y x) (* t z)) a)))
   (if (<= t_2 -5e+261) t_1 (if (<= t_2 4e+301) (/ (* y x) a) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y / a) * x;
	double t_2 = ((y * x) - (t * z)) / a;
	double tmp;
	if (t_2 <= -5e+261) {
		tmp = t_1;
	} else if (t_2 <= 4e+301) {
		tmp = (y * x) / 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) :: t_2
    real(8) :: tmp
    t_1 = (y / a) * x
    t_2 = ((y * x) - (t * z)) / a
    if (t_2 <= (-5d+261)) then
        tmp = t_1
    else if (t_2 <= 4d+301) then
        tmp = (y * x) / 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;
	double t_2 = ((y * x) - (t * z)) / a;
	double tmp;
	if (t_2 <= -5e+261) {
		tmp = t_1;
	} else if (t_2 <= 4e+301) {
		tmp = (y * x) / a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y / a) * x
	t_2 = ((y * x) - (t * z)) / a
	tmp = 0
	if t_2 <= -5e+261:
		tmp = t_1
	elif t_2 <= 4e+301:
		tmp = (y * x) / a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y / a) * x)
	t_2 = Float64(Float64(Float64(y * x) - Float64(t * z)) / a)
	tmp = 0.0
	if (t_2 <= -5e+261)
		tmp = t_1;
	elseif (t_2 <= 4e+301)
		tmp = Float64(Float64(y * x) / a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y / a) * x;
	t_2 = ((y * x) - (t * z)) / a;
	tmp = 0.0;
	if (t_2 <= -5e+261)
		tmp = t_1;
	elseif (t_2 <= 4e+301)
		tmp = (y * x) / a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+261], t$95$1, If[LessEqual[t$95$2, 4e+301], N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot x\\
t_2 := \frac{y \cdot x - t \cdot z}{a}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+261}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+301}:\\
\;\;\;\;\frac{y \cdot x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a) < -5.0000000000000001e261 or 4.00000000000000021e301 < (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a)

    1. Initial program 79.8%

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

      \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
      2. lower-*.f6446.8

        \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
    5. Applied rewrites46.8%

      \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
    6. Taylor expanded in t around inf

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{t}{a}\right) \cdot z} \]
      3. lower-*.f64N/A

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

        \[\leadsto \color{blue}{\frac{-1 \cdot t}{a}} \cdot z \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1 \cdot t}{a}} \cdot z \]
      6. mul-1-negN/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(t\right)}}{a} \cdot z \]
      7. lower-neg.f6451.5

        \[\leadsto \frac{\color{blue}{-t}}{a} \cdot z \]
    8. Applied rewrites51.5%

      \[\leadsto \color{blue}{\frac{-t}{a} \cdot z} \]
    9. Taylor expanded in t around 0

      \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
      2. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{y}{a} \cdot x} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{y}{a} \cdot x} \]
      4. lower-/.f6457.8

        \[\leadsto \color{blue}{\frac{y}{a}} \cdot x \]
    11. Applied rewrites57.8%

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

    if -5.0000000000000001e261 < (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a) < 4.00000000000000021e301

    1. Initial program 98.8%

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

      \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
      2. lower-*.f6452.8

        \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
    5. Applied rewrites52.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y \cdot x - t \cdot z}{a} \leq -5 \cdot 10^{+261}:\\ \;\;\;\;\frac{y}{a} \cdot x\\ \mathbf{elif}\;\frac{y \cdot x - t \cdot z}{a} \leq 4 \cdot 10^{+301}:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 97.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{y}{a}, x, \frac{-z}{a} \cdot t\right)\\ t_2 := y \cdot x - t \cdot z\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{+249}:\\ \;\;\;\;\frac{t\_2}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (/ y a) x (* (/ (- z) a) t))) (t_2 (- (* y x) (* t z))))
   (if (<= t_2 (- INFINITY)) t_1 (if (<= t_2 1e+249) (/ t_2 a) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((y / a), x, ((-z / a) * t));
	double t_2 = (y * x) - (t * z);
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= 1e+249) {
		tmp = t_2 / a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(y / a), x, Float64(Float64(Float64(-z) / a) * t))
	t_2 = Float64(Float64(y * x) - Float64(t * z))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= 1e+249)
		tmp = Float64(t_2 / a);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * x + N[(N[((-z) / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 1e+249], N[(t$95$2 / a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{a}, x, \frac{-z}{a} \cdot t\right)\\
t_2 := y \cdot x - t \cdot z\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 10^{+249}:\\
\;\;\;\;\frac{t\_2}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (*.f64 x y) (*.f64 z t)) < -inf.0 or 9.9999999999999992e248 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 72.3%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot t}{a}} \]
      2. lift--.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y - z \cdot t}}{a} \]
      3. div-subN/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} - \frac{z \cdot t}{a}} \]
      4. sub-negN/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} + \left(\mathsf{neg}\left(\frac{z \cdot t}{a}\right)\right)} \]
      5. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y}}{a} + \left(\mathsf{neg}\left(\frac{z \cdot t}{a}\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \color{blue}{x \cdot \frac{y}{a}} + \left(\mathsf{neg}\left(\frac{z \cdot t}{a}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{y}{a} \cdot x} + \left(\mathsf{neg}\left(\frac{z \cdot t}{a}\right)\right) \]
      8. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, x, \mathsf{neg}\left(\frac{z \cdot t}{a}\right)\right)} \]
      9. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a}}, x, \mathsf{neg}\left(\frac{z \cdot t}{a}\right)\right) \]
      10. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \mathsf{neg}\left(\frac{\color{blue}{z \cdot t}}{a}\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \mathsf{neg}\left(\frac{\color{blue}{t \cdot z}}{a}\right)\right) \]
      12. associate-/l*N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \mathsf{neg}\left(\color{blue}{t \cdot \frac{z}{a}}\right)\right) \]
      13. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}}\right) \]
      15. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(-t\right)} \cdot \frac{z}{a}\right) \]
      16. lower-/.f6498.4

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

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

    if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 9.9999999999999992e248

    1. Initial program 98.9%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification98.8%

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

Alternative 4: 94.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \cdot x - t \cdot z \leq -\infty:\\ \;\;\;\;\frac{\frac{x}{z} \cdot y - t}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, x, \left(-z\right) \cdot t\right)}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= (- (* y x) (* t z)) (- INFINITY))
   (* (/ (- (* (/ x z) y) t) a) z)
   (/ (fma y x (* (- z) t)) a)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (((y * x) - (t * z)) <= -((double) INFINITY)) {
		tmp = ((((x / z) * y) - t) / a) * z;
	} else {
		tmp = fma(y, x, (-z * t)) / a;
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(Float64(y * x) - Float64(t * z)) <= Float64(-Inf))
		tmp = Float64(Float64(Float64(Float64(Float64(x / z) * y) - t) / a) * z);
	else
		tmp = Float64(fma(y, x, Float64(Float64(-z) * t)) / a);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(N[(N[(N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision] - t), $MachinePrecision] / a), $MachinePrecision] * z), $MachinePrecision], N[(N[(y * x + N[((-z) * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \cdot x - t \cdot z \leq -\infty:\\
\;\;\;\;\frac{\frac{x}{z} \cdot y - t}{a} \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (*.f64 x y) (*.f64 z t)) < -inf.0

    1. Initial program 58.2%

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot \frac{z}{a}} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot \frac{z}{a}} \]
      4. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot \frac{z}{a} \]
      5. lower-neg.f64N/A

        \[\leadsto \color{blue}{\left(-t\right)} \cdot \frac{z}{a} \]
      6. lower-/.f6452.6

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{t}{a} + \frac{x \cdot y}{a \cdot z}\right) \cdot z} \]
      2. lower-*.f64N/A

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

        \[\leadsto \color{blue}{\left(\frac{x \cdot y}{a \cdot z} + -1 \cdot \frac{t}{a}\right)} \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(\frac{x \cdot y}{\color{blue}{z \cdot a}} + -1 \cdot \frac{t}{a}\right) \cdot z \]
      5. times-fracN/A

        \[\leadsto \left(\color{blue}{\frac{x}{z} \cdot \frac{y}{a}} + -1 \cdot \frac{t}{a}\right) \cdot z \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x}{z}, \frac{y}{a}, -1 \cdot \frac{t}{a}\right)} \cdot z \]
      7. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{x}{z}}, \frac{y}{a}, -1 \cdot \frac{t}{a}\right) \cdot z \]
      8. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{x}{z}, \color{blue}{\frac{y}{a}}, -1 \cdot \frac{t}{a}\right) \cdot z \]
      9. associate-*r/N/A

        \[\leadsto \mathsf{fma}\left(\frac{x}{z}, \frac{y}{a}, \color{blue}{\frac{-1 \cdot t}{a}}\right) \cdot z \]
      10. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{x}{z}, \frac{y}{a}, \color{blue}{\frac{-1 \cdot t}{a}}\right) \cdot z \]
      11. mul-1-negN/A

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x}{z}, \frac{y}{a}, \frac{-t}{a}\right) \cdot z} \]
    9. Step-by-step derivation
      1. Applied rewrites82.5%

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

      if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t))

      1. Initial program 95.8%

        \[\frac{x \cdot y - z \cdot t}{a} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift--.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y - z \cdot t}}{a} \]
        2. sub-negN/A

          \[\leadsto \frac{\color{blue}{x \cdot y + \left(\mathsf{neg}\left(z \cdot t\right)\right)}}{a} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y} + \left(\mathsf{neg}\left(z \cdot t\right)\right)}{a} \]
        4. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot x} + \left(\mathsf{neg}\left(z \cdot t\right)\right)}{a} \]
        5. lower-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, x, \mathsf{neg}\left(z \cdot t\right)\right)}}{a} \]
        6. lift-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(y, x, \mathsf{neg}\left(\color{blue}{z \cdot t}\right)\right)}{a} \]
        7. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(y, x, \mathsf{neg}\left(\color{blue}{t \cdot z}\right)\right)}{a} \]
        8. distribute-lft-neg-inN/A

          \[\leadsto \frac{\mathsf{fma}\left(y, x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot z}\right)}{a} \]
        9. lower-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(y, x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot z}\right)}{a} \]
        10. lower-neg.f6496.3

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, x, \left(-t\right) \cdot z\right)}}{a} \]
    10. Recombined 2 regimes into one program.
    11. Final simplification94.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot x - t \cdot z \leq -\infty:\\ \;\;\;\;\frac{\frac{x}{z} \cdot y - t}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, x, \left(-z\right) \cdot t\right)}{a}\\ \end{array} \]
    12. Add Preprocessing

    Alternative 5: 74.2% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{+19}:\\ \;\;\;\;\frac{-1}{a} \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;t \cdot z \leq 400000:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-z}{\frac{a}{t}}\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (if (<= (* t z) -2e+19)
       (* (/ -1.0 a) (* t z))
       (if (<= (* t z) 400000.0) (/ (* y x) a) (/ (- z) (/ a t)))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if ((t * z) <= -2e+19) {
    		tmp = (-1.0 / a) * (t * z);
    	} else if ((t * z) <= 400000.0) {
    		tmp = (y * x) / a;
    	} else {
    		tmp = -z / (a / t);
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8) :: tmp
        if ((t * z) <= (-2d+19)) then
            tmp = ((-1.0d0) / a) * (t * z)
        else if ((t * z) <= 400000.0d0) then
            tmp = (y * x) / a
        else
            tmp = -z / (a / t)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if ((t * z) <= -2e+19) {
    		tmp = (-1.0 / a) * (t * z);
    	} else if ((t * z) <= 400000.0) {
    		tmp = (y * x) / a;
    	} else {
    		tmp = -z / (a / t);
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	tmp = 0
    	if (t * z) <= -2e+19:
    		tmp = (-1.0 / a) * (t * z)
    	elif (t * z) <= 400000.0:
    		tmp = (y * x) / a
    	else:
    		tmp = -z / (a / t)
    	return tmp
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (Float64(t * z) <= -2e+19)
    		tmp = Float64(Float64(-1.0 / a) * Float64(t * z));
    	elseif (Float64(t * z) <= 400000.0)
    		tmp = Float64(Float64(y * x) / a);
    	else
    		tmp = Float64(Float64(-z) / Float64(a / t));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	tmp = 0.0;
    	if ((t * z) <= -2e+19)
    		tmp = (-1.0 / a) * (t * z);
    	elseif ((t * z) <= 400000.0)
    		tmp = (y * x) / a;
    	else
    		tmp = -z / (a / t);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[N[(t * z), $MachinePrecision], -2e+19], N[(N[(-1.0 / a), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * z), $MachinePrecision], 400000.0], N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision], N[((-z) / N[(a / t), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{+19}:\\
    \;\;\;\;\frac{-1}{a} \cdot \left(t \cdot z\right)\\
    
    \mathbf{elif}\;t \cdot z \leq 400000:\\
    \;\;\;\;\frac{y \cdot x}{a}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{-z}{\frac{a}{t}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (*.f64 z t) < -2e19

      1. Initial program 95.0%

        \[\frac{x \cdot y - z \cdot t}{a} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot t}{a}} \]
        2. frac-2negN/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(x \cdot y - z \cdot t\right)\right)}{\mathsf{neg}\left(a\right)}} \]
        3. div-invN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot y - z \cdot t\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)}} \]
        4. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot y - z \cdot t\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)}} \]
        5. lift--.f64N/A

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(x \cdot y - z \cdot t\right)}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
        6. sub-negN/A

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(x \cdot y + \left(\mathsf{neg}\left(z \cdot t\right)\right)\right)}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
        7. distribute-neg-inN/A

          \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(x \cdot y\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot t\right)\right)\right)\right)\right)} \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
        8. lift-*.f64N/A

          \[\leadsto \left(\left(\mathsf{neg}\left(\color{blue}{x \cdot y}\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot t\right)\right)\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
        9. *-commutativeN/A

          \[\leadsto \left(\left(\mathsf{neg}\left(\color{blue}{y \cdot x}\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot t\right)\right)\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
        10. distribute-lft-neg-inN/A

          \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(y\right)\right) \cdot x} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot t\right)\right)\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
        11. remove-double-negN/A

          \[\leadsto \left(\left(\mathsf{neg}\left(y\right)\right) \cdot x + \color{blue}{z \cdot t}\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
        12. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(y\right), x, z \cdot t\right)} \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
        13. lower-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{-y}, x, z \cdot t\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
        14. lift-*.f64N/A

          \[\leadsto \mathsf{fma}\left(-y, x, \color{blue}{z \cdot t}\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
        15. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(-y, x, \color{blue}{t \cdot z}\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
        16. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(-y, x, \color{blue}{t \cdot z}\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
        17. neg-mul-1N/A

          \[\leadsto \mathsf{fma}\left(-y, x, t \cdot z\right) \cdot \frac{1}{\color{blue}{-1 \cdot a}} \]
        18. associate-/r*N/A

          \[\leadsto \mathsf{fma}\left(-y, x, t \cdot z\right) \cdot \color{blue}{\frac{\frac{1}{-1}}{a}} \]
        19. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(-y, x, t \cdot z\right) \cdot \frac{\color{blue}{-1}}{a} \]
        20. lower-/.f6495.0

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

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

        \[\leadsto \color{blue}{\left(t \cdot z\right)} \cdot \frac{-1}{a} \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(z \cdot t\right)} \cdot \frac{-1}{a} \]
        2. lower-*.f6473.0

          \[\leadsto \color{blue}{\left(z \cdot t\right)} \cdot \frac{-1}{a} \]
      7. Applied rewrites73.0%

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

      if -2e19 < (*.f64 z t) < 4e5

      1. Initial program 92.8%

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

        \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
        2. lower-*.f6474.7

          \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
      5. Applied rewrites74.7%

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

      if 4e5 < (*.f64 z t)

      1. Initial program 87.2%

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

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

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

          \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot \frac{z}{a}} \]
        3. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot \frac{z}{a}} \]
        4. mul-1-negN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot \frac{z}{a} \]
        5. lower-neg.f64N/A

          \[\leadsto \color{blue}{\left(-t\right)} \cdot \frac{z}{a} \]
        6. lower-/.f6479.4

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{+19}:\\ \;\;\;\;\frac{-1}{a} \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;t \cdot z \leq 400000:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-z}{\frac{a}{t}}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 6: 74.3% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{+19}:\\ \;\;\;\;\frac{-1}{a} \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;t \cdot z \leq 400000:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{a} \cdot z\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (<= (* t z) -2e+19)
         (* (/ -1.0 a) (* t z))
         (if (<= (* t z) 400000.0) (/ (* y x) a) (* (/ (- t) a) z))))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if ((t * z) <= -2e+19) {
      		tmp = (-1.0 / a) * (t * z);
      	} else if ((t * z) <= 400000.0) {
      		tmp = (y * x) / a;
      	} else {
      		tmp = (-t / a) * z;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8) :: tmp
          if ((t * z) <= (-2d+19)) then
              tmp = ((-1.0d0) / a) * (t * z)
          else if ((t * z) <= 400000.0d0) then
              tmp = (y * x) / a
          else
              tmp = (-t / a) * z
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if ((t * z) <= -2e+19) {
      		tmp = (-1.0 / a) * (t * z);
      	} else if ((t * z) <= 400000.0) {
      		tmp = (y * x) / a;
      	} else {
      		tmp = (-t / a) * z;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	tmp = 0
      	if (t * z) <= -2e+19:
      		tmp = (-1.0 / a) * (t * z)
      	elif (t * z) <= 400000.0:
      		tmp = (y * x) / a
      	else:
      		tmp = (-t / a) * z
      	return tmp
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (Float64(t * z) <= -2e+19)
      		tmp = Float64(Float64(-1.0 / a) * Float64(t * z));
      	elseif (Float64(t * z) <= 400000.0)
      		tmp = Float64(Float64(y * x) / a);
      	else
      		tmp = Float64(Float64(Float64(-t) / a) * z);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	tmp = 0.0;
      	if ((t * z) <= -2e+19)
      		tmp = (-1.0 / a) * (t * z);
      	elseif ((t * z) <= 400000.0)
      		tmp = (y * x) / a;
      	else
      		tmp = (-t / a) * z;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[N[(t * z), $MachinePrecision], -2e+19], N[(N[(-1.0 / a), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * z), $MachinePrecision], 400000.0], N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision], N[(N[((-t) / a), $MachinePrecision] * z), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{+19}:\\
      \;\;\;\;\frac{-1}{a} \cdot \left(t \cdot z\right)\\
      
      \mathbf{elif}\;t \cdot z \leq 400000:\\
      \;\;\;\;\frac{y \cdot x}{a}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{-t}{a} \cdot z\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (*.f64 z t) < -2e19

        1. Initial program 95.0%

          \[\frac{x \cdot y - z \cdot t}{a} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot t}{a}} \]
          2. frac-2negN/A

            \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(x \cdot y - z \cdot t\right)\right)}{\mathsf{neg}\left(a\right)}} \]
          3. div-invN/A

            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot y - z \cdot t\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)}} \]
          4. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot y - z \cdot t\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)}} \]
          5. lift--.f64N/A

            \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(x \cdot y - z \cdot t\right)}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
          6. sub-negN/A

            \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(x \cdot y + \left(\mathsf{neg}\left(z \cdot t\right)\right)\right)}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
          7. distribute-neg-inN/A

            \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(x \cdot y\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot t\right)\right)\right)\right)\right)} \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
          8. lift-*.f64N/A

            \[\leadsto \left(\left(\mathsf{neg}\left(\color{blue}{x \cdot y}\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot t\right)\right)\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
          9. *-commutativeN/A

            \[\leadsto \left(\left(\mathsf{neg}\left(\color{blue}{y \cdot x}\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot t\right)\right)\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
          10. distribute-lft-neg-inN/A

            \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(y\right)\right) \cdot x} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot t\right)\right)\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
          11. remove-double-negN/A

            \[\leadsto \left(\left(\mathsf{neg}\left(y\right)\right) \cdot x + \color{blue}{z \cdot t}\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
          12. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(y\right), x, z \cdot t\right)} \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
          13. lower-neg.f64N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{-y}, x, z \cdot t\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
          14. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(-y, x, \color{blue}{z \cdot t}\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
          15. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(-y, x, \color{blue}{t \cdot z}\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
          16. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(-y, x, \color{blue}{t \cdot z}\right) \cdot \frac{1}{\mathsf{neg}\left(a\right)} \]
          17. neg-mul-1N/A

            \[\leadsto \mathsf{fma}\left(-y, x, t \cdot z\right) \cdot \frac{1}{\color{blue}{-1 \cdot a}} \]
          18. associate-/r*N/A

            \[\leadsto \mathsf{fma}\left(-y, x, t \cdot z\right) \cdot \color{blue}{\frac{\frac{1}{-1}}{a}} \]
          19. metadata-evalN/A

            \[\leadsto \mathsf{fma}\left(-y, x, t \cdot z\right) \cdot \frac{\color{blue}{-1}}{a} \]
          20. lower-/.f6495.0

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

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

          \[\leadsto \color{blue}{\left(t \cdot z\right)} \cdot \frac{-1}{a} \]
        6. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\left(z \cdot t\right)} \cdot \frac{-1}{a} \]
          2. lower-*.f6473.0

            \[\leadsto \color{blue}{\left(z \cdot t\right)} \cdot \frac{-1}{a} \]
        7. Applied rewrites73.0%

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

        if -2e19 < (*.f64 z t) < 4e5

        1. Initial program 92.8%

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

          \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
          2. lower-*.f6474.7

            \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
        5. Applied rewrites74.7%

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

        if 4e5 < (*.f64 z t)

        1. Initial program 87.2%

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

          \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
          2. lower-*.f6420.4

            \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
        5. Applied rewrites20.4%

          \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
        6. Taylor expanded in t around inf

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

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

            \[\leadsto \color{blue}{\left(-1 \cdot \frac{t}{a}\right) \cdot z} \]
          3. lower-*.f64N/A

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

            \[\leadsto \color{blue}{\frac{-1 \cdot t}{a}} \cdot z \]
          5. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{-1 \cdot t}{a}} \cdot z \]
          6. mul-1-negN/A

            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(t\right)}}{a} \cdot z \]
          7. lower-neg.f6478.0

            \[\leadsto \frac{\color{blue}{-t}}{a} \cdot z \]
        8. Applied rewrites78.0%

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

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

      Alternative 7: 75.0% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-t}{a} \cdot z\\ \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \cdot z \leq 400000:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (* (/ (- t) a) z)))
         (if (<= (* t z) -2e+19) t_1 (if (<= (* t z) 400000.0) (/ (* y x) a) t_1))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = (-t / a) * z;
      	double tmp;
      	if ((t * z) <= -2e+19) {
      		tmp = t_1;
      	} else if ((t * z) <= 400000.0) {
      		tmp = (y * x) / 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 = (-t / a) * z
          if ((t * z) <= (-2d+19)) then
              tmp = t_1
          else if ((t * z) <= 400000.0d0) then
              tmp = (y * x) / 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 = (-t / a) * z;
      	double tmp;
      	if ((t * z) <= -2e+19) {
      		tmp = t_1;
      	} else if ((t * z) <= 400000.0) {
      		tmp = (y * x) / a;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	t_1 = (-t / a) * z
      	tmp = 0
      	if (t * z) <= -2e+19:
      		tmp = t_1
      	elif (t * z) <= 400000.0:
      		tmp = (y * x) / a
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a)
      	t_1 = Float64(Float64(Float64(-t) / a) * z)
      	tmp = 0.0
      	if (Float64(t * z) <= -2e+19)
      		tmp = t_1;
      	elseif (Float64(t * z) <= 400000.0)
      		tmp = Float64(Float64(y * x) / a);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	t_1 = (-t / a) * z;
      	tmp = 0.0;
      	if ((t * z) <= -2e+19)
      		tmp = t_1;
      	elseif ((t * z) <= 400000.0)
      		tmp = (y * x) / a;
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[((-t) / a), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -2e+19], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 400000.0], N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{-t}{a} \cdot z\\
      \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{+19}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \cdot z \leq 400000:\\
      \;\;\;\;\frac{y \cdot x}{a}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 z t) < -2e19 or 4e5 < (*.f64 z t)

        1. Initial program 90.9%

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

          \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
          2. lower-*.f6425.8

            \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
        5. Applied rewrites25.8%

          \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
        6. Taylor expanded in t around inf

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

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

            \[\leadsto \color{blue}{\left(-1 \cdot \frac{t}{a}\right) \cdot z} \]
          3. lower-*.f64N/A

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

            \[\leadsto \color{blue}{\frac{-1 \cdot t}{a}} \cdot z \]
          5. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{-1 \cdot t}{a}} \cdot z \]
          6. mul-1-negN/A

            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(t\right)}}{a} \cdot z \]
          7. lower-neg.f6474.9

            \[\leadsto \frac{\color{blue}{-t}}{a} \cdot z \]
        8. Applied rewrites74.9%

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

        if -2e19 < (*.f64 z t) < 4e5

        1. Initial program 92.8%

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

          \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
          2. lower-*.f6474.7

            \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
        5. Applied rewrites74.7%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{+19}:\\ \;\;\;\;\frac{-t}{a} \cdot z\\ \mathbf{elif}\;t \cdot z \leq 400000:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{a} \cdot z\\ \end{array} \]
      5. Add Preprocessing

      Alternative 8: 75.5% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-z}{a} \cdot t\\ \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \cdot z \leq 400000:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (* (/ (- z) a) t)))
         (if (<= (* t z) -2e+19) t_1 (if (<= (* t z) 400000.0) (/ (* y x) a) t_1))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = (-z / a) * t;
      	double tmp;
      	if ((t * z) <= -2e+19) {
      		tmp = t_1;
      	} else if ((t * z) <= 400000.0) {
      		tmp = (y * x) / 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 = (-z / a) * t
          if ((t * z) <= (-2d+19)) then
              tmp = t_1
          else if ((t * z) <= 400000.0d0) then
              tmp = (y * x) / 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 = (-z / a) * t;
      	double tmp;
      	if ((t * z) <= -2e+19) {
      		tmp = t_1;
      	} else if ((t * z) <= 400000.0) {
      		tmp = (y * x) / a;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	t_1 = (-z / a) * t
      	tmp = 0
      	if (t * z) <= -2e+19:
      		tmp = t_1
      	elif (t * z) <= 400000.0:
      		tmp = (y * x) / a
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a)
      	t_1 = Float64(Float64(Float64(-z) / a) * t)
      	tmp = 0.0
      	if (Float64(t * z) <= -2e+19)
      		tmp = t_1;
      	elseif (Float64(t * z) <= 400000.0)
      		tmp = Float64(Float64(y * x) / a);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	t_1 = (-z / a) * t;
      	tmp = 0.0;
      	if ((t * z) <= -2e+19)
      		tmp = t_1;
      	elseif ((t * z) <= 400000.0)
      		tmp = (y * x) / a;
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[((-z) / a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -2e+19], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 400000.0], N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{-z}{a} \cdot t\\
      \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{+19}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \cdot z \leq 400000:\\
      \;\;\;\;\frac{y \cdot x}{a}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 z t) < -2e19 or 4e5 < (*.f64 z t)

        1. Initial program 90.9%

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

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

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

            \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot \frac{z}{a}} \]
          3. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot \frac{z}{a}} \]
          4. mul-1-negN/A

            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot \frac{z}{a} \]
          5. lower-neg.f64N/A

            \[\leadsto \color{blue}{\left(-t\right)} \cdot \frac{z}{a} \]
          6. lower-/.f6477.2

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

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

        if -2e19 < (*.f64 z t) < 4e5

        1. Initial program 92.8%

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

          \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
          2. lower-*.f6474.7

            \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
        5. Applied rewrites74.7%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{+19}:\\ \;\;\;\;\frac{-z}{a} \cdot t\\ \mathbf{elif}\;t \cdot z \leq 400000:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-z}{a} \cdot t\\ \end{array} \]
      5. Add Preprocessing

      Alternative 9: 93.3% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \cdot z \leq 5 \cdot 10^{+302}:\\ \;\;\;\;\frac{y \cdot x - t \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{a} \cdot z\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (<= (* t z) 5e+302) (/ (- (* y x) (* t z)) a) (* (/ (- t) a) z)))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if ((t * z) <= 5e+302) {
      		tmp = ((y * x) - (t * z)) / a;
      	} else {
      		tmp = (-t / a) * z;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8) :: tmp
          if ((t * z) <= 5d+302) then
              tmp = ((y * x) - (t * z)) / a
          else
              tmp = (-t / a) * z
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if ((t * z) <= 5e+302) {
      		tmp = ((y * x) - (t * z)) / a;
      	} else {
      		tmp = (-t / a) * z;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	tmp = 0
      	if (t * z) <= 5e+302:
      		tmp = ((y * x) - (t * z)) / a
      	else:
      		tmp = (-t / a) * z
      	return tmp
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (Float64(t * z) <= 5e+302)
      		tmp = Float64(Float64(Float64(y * x) - Float64(t * z)) / a);
      	else
      		tmp = Float64(Float64(Float64(-t) / a) * z);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	tmp = 0.0;
      	if ((t * z) <= 5e+302)
      		tmp = ((y * x) - (t * z)) / a;
      	else
      		tmp = (-t / a) * z;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[N[(t * z), $MachinePrecision], 5e+302], N[(N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[((-t) / a), $MachinePrecision] * z), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \cdot z \leq 5 \cdot 10^{+302}:\\
      \;\;\;\;\frac{y \cdot x - t \cdot z}{a}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{-t}{a} \cdot z\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 z t) < 5e302

        1. Initial program 94.5%

          \[\frac{x \cdot y - z \cdot t}{a} \]
        2. Add Preprocessing

        if 5e302 < (*.f64 z t)

        1. Initial program 52.7%

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

          \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
          2. lower-*.f641.8

            \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
        5. Applied rewrites1.8%

          \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
        6. Taylor expanded in t around inf

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

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

            \[\leadsto \color{blue}{\left(-1 \cdot \frac{t}{a}\right) \cdot z} \]
          3. lower-*.f64N/A

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

            \[\leadsto \color{blue}{\frac{-1 \cdot t}{a}} \cdot z \]
          5. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{-1 \cdot t}{a}} \cdot z \]
          6. mul-1-negN/A

            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(t\right)}}{a} \cdot z \]
          7. lower-neg.f6499.9

            \[\leadsto \frac{\color{blue}{-t}}{a} \cdot z \]
        8. Applied rewrites99.9%

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

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

      Alternative 10: 51.6% accurate, 1.5× speedup?

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
        2. lower-*.f6450.6

          \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
      5. Applied rewrites50.6%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
      6. Taylor expanded in t around inf

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

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

          \[\leadsto \color{blue}{\left(-1 \cdot \frac{t}{a}\right) \cdot z} \]
        3. lower-*.f64N/A

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

          \[\leadsto \color{blue}{\frac{-1 \cdot t}{a}} \cdot z \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{-1 \cdot t}{a}} \cdot z \]
        6. mul-1-negN/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(t\right)}}{a} \cdot z \]
        7. lower-neg.f6449.3

          \[\leadsto \frac{\color{blue}{-t}}{a} \cdot z \]
      8. Applied rewrites49.3%

        \[\leadsto \color{blue}{\frac{-t}{a} \cdot z} \]
      9. Taylor expanded in t around 0

        \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
      10. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
        2. associate-*l/N/A

          \[\leadsto \color{blue}{\frac{y}{a} \cdot x} \]
        3. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{y}{a} \cdot x} \]
        4. lower-/.f6448.2

          \[\leadsto \color{blue}{\frac{y}{a}} \cdot x \]
      11. Applied rewrites48.2%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot x} \]
      12. Add Preprocessing

      Developer Target 1: 91.3% accurate, 0.5× 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 2024255 
      (FPCore (x y z t a)
        :name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
        :precision binary64
      
        :alt
        (! :herbie-platform default (if (< z -246868496869954800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6309831121978371/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z)))))
      
        (/ (- (* x y) (* z t)) a))