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

Percentage Accurate: 91.2% → 96.9%
Time: 6.4s
Alternatives: 11
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;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    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 11 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 91.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot y - z \cdot t}{a} \end{array} \]
(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* z t)) a))
double code(double x, double y, double z, double t, double a) {
	return ((x * y) - (z * t)) / a;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    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: 96.9% accurate, 0.3× speedup?

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

\mathbf{elif}\;t\_1 \leq 10^{+304}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, x, \left(-z\right) \cdot t\right)}{a}\\

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


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

    1. Initial program 75.4%

      \[\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. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot t}}{a} \]
      3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

    if -1.99999999999999997e307 < (-.f64 (*.f64 x y) (*.f64 z t)) < 9.9999999999999994e303

    1. Initial program 98.5%

      \[\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. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot t}}{a} \]
      3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

    if 9.9999999999999994e303 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 66.4%

      \[\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. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{z \cdot t}}{a} \]
      5. *-commutativeN/A

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

        \[\leadsto \frac{x \cdot y}{a} - \color{blue}{t \cdot \frac{z}{a}} \]
      7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 75.5% accurate, 0.3× speedup?

\[\begin{array}{l} [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\ \\ \begin{array}{l} t_1 := \frac{\left(-z\right) \cdot t}{a}\\ t_2 := \frac{-z}{a} \cdot t\\ \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+90}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \cdot t \leq -2 \cdot 10^{+49}:\\ \;\;\;\;\frac{x}{a} \cdot y\\ \mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-62}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \cdot t \leq 10^{-6}:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+113}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* (- z) t) a)) (t_2 (* (/ (- z) a) t)))
   (if (<= (* z t) -2e+90)
     t_2
     (if (<= (* z t) -2e+49)
       (* (/ x a) y)
       (if (<= (* z t) -1e-62)
         t_1
         (if (<= (* z t) 1e-6)
           (/ (* y x) a)
           (if (<= (* z t) 5e+113) t_1 t_2)))))))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
	double t_1 = (-z * t) / a;
	double t_2 = (-z / a) * t;
	double tmp;
	if ((z * t) <= -2e+90) {
		tmp = t_2;
	} else if ((z * t) <= -2e+49) {
		tmp = (x / a) * y;
	} else if ((z * t) <= -1e-62) {
		tmp = t_1;
	} else if ((z * t) <= 1e-6) {
		tmp = (y * x) / a;
	} else if ((z * t) <= 5e+113) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    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 = (-z * t) / a
    t_2 = (-z / a) * t
    if ((z * t) <= (-2d+90)) then
        tmp = t_2
    else if ((z * t) <= (-2d+49)) then
        tmp = (x / a) * y
    else if ((z * t) <= (-1d-62)) then
        tmp = t_1
    else if ((z * t) <= 1d-6) then
        tmp = (y * x) / a
    else if ((z * t) <= 5d+113) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (-z * t) / a;
	double t_2 = (-z / a) * t;
	double tmp;
	if ((z * t) <= -2e+90) {
		tmp = t_2;
	} else if ((z * t) <= -2e+49) {
		tmp = (x / a) * y;
	} else if ((z * t) <= -1e-62) {
		tmp = t_1;
	} else if ((z * t) <= 1e-6) {
		tmp = (y * x) / a;
	} else if ((z * t) <= 5e+113) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a])
def code(x, y, z, t, a):
	t_1 = (-z * t) / a
	t_2 = (-z / a) * t
	tmp = 0
	if (z * t) <= -2e+90:
		tmp = t_2
	elif (z * t) <= -2e+49:
		tmp = (x / a) * y
	elif (z * t) <= -1e-62:
		tmp = t_1
	elif (z * t) <= 1e-6:
		tmp = (y * x) / a
	elif (z * t) <= 5e+113:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
x, y, z, t, a = sort([x, y, z, t, a])
function code(x, y, z, t, a)
	t_1 = Float64(Float64(Float64(-z) * t) / a)
	t_2 = Float64(Float64(Float64(-z) / a) * t)
	tmp = 0.0
	if (Float64(z * t) <= -2e+90)
		tmp = t_2;
	elseif (Float64(z * t) <= -2e+49)
		tmp = Float64(Float64(x / a) * y);
	elseif (Float64(z * t) <= -1e-62)
		tmp = t_1;
	elseif (Float64(z * t) <= 1e-6)
		tmp = Float64(Float64(y * x) / a);
	elseif (Float64(z * t) <= 5e+113)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = (-z * t) / a;
	t_2 = (-z / a) * t;
	tmp = 0.0;
	if ((z * t) <= -2e+90)
		tmp = t_2;
	elseif ((z * t) <= -2e+49)
		tmp = (x / a) * y;
	elseif ((z * t) <= -1e-62)
		tmp = t_1;
	elseif ((z * t) <= 1e-6)
		tmp = (y * x) / a;
	elseif ((z * t) <= 5e+113)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[((-z) * t), $MachinePrecision] / a), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-z) / a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -2e+90], t$95$2, If[LessEqual[N[(z * t), $MachinePrecision], -2e+49], N[(N[(x / a), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], -1e-62], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 1e-6], N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 5e+113], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := \frac{\left(-z\right) \cdot t}{a}\\
t_2 := \frac{-z}{a} \cdot t\\
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+90}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 z t) < -1.99999999999999993e90 or 5e113 < (*.f64 z t)

    1. Initial program 86.7%

      \[\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. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot t}}{a} \]
      3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

      if -1.99999999999999993e90 < (*.f64 z t) < -1.99999999999999989e49

      1. Initial program 88.1%

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
      4. Step-by-step derivation
        1. Applied rewrites87.8%

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

        if -1.99999999999999989e49 < (*.f64 z t) < -1e-62 or 9.99999999999999955e-7 < (*.f64 z t) < 5e113

        1. Initial program 95.0%

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

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

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

          if -1e-62 < (*.f64 z t) < 9.99999999999999955e-7

          1. Initial program 94.2%

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

            \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
          4. Step-by-step derivation
            1. Applied rewrites80.5%

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

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

          Alternative 3: 96.3% accurate, 0.3× speedup?

          \[\begin{array}{l} [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\ \\ \begin{array}{l} t_1 := x \cdot y - z \cdot t\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+307}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-t}{y}, z, x\right)}{a} \cdot y\\ \mathbf{elif}\;t\_1 \leq 10^{+279}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-z, t, y \cdot x\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-t}{x}, z, y\right)}{a} \cdot x\\ \end{array} \end{array} \]
          NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
          (FPCore (x y z t a)
           :precision binary64
           (let* ((t_1 (- (* x y) (* z t))))
             (if (<= t_1 -2e+307)
               (* (/ (fma (/ (- t) y) z x) a) y)
               (if (<= t_1 1e+279)
                 (/ (fma (- z) t (* y x)) a)
                 (* (/ (fma (/ (- t) x) z y) a) x)))))
          assert(x < y && y < z && z < t && t < a);
          double code(double x, double y, double z, double t, double a) {
          	double t_1 = (x * y) - (z * t);
          	double tmp;
          	if (t_1 <= -2e+307) {
          		tmp = (fma((-t / y), z, x) / a) * y;
          	} else if (t_1 <= 1e+279) {
          		tmp = fma(-z, t, (y * x)) / a;
          	} else {
          		tmp = (fma((-t / x), z, y) / a) * x;
          	}
          	return tmp;
          }
          
          x, y, z, t, a = sort([x, y, z, t, a])
          function code(x, y, z, t, a)
          	t_1 = Float64(Float64(x * y) - Float64(z * t))
          	tmp = 0.0
          	if (t_1 <= -2e+307)
          		tmp = Float64(Float64(fma(Float64(Float64(-t) / y), z, x) / a) * y);
          	elseif (t_1 <= 1e+279)
          		tmp = Float64(fma(Float64(-z), t, Float64(y * x)) / a);
          	else
          		tmp = Float64(Float64(fma(Float64(Float64(-t) / x), z, y) / a) * x);
          	end
          	return tmp
          end
          
          NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+307], N[(N[(N[(N[((-t) / y), $MachinePrecision] * z + x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, 1e+279], N[(N[((-z) * t + N[(y * x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(N[(N[((-t) / x), $MachinePrecision] * z + y), $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision]]]]
          
          \begin{array}{l}
          [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
          \\
          \begin{array}{l}
          t_1 := x \cdot y - z \cdot t\\
          \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+307}:\\
          \;\;\;\;\frac{\mathsf{fma}\left(\frac{-t}{y}, z, x\right)}{a} \cdot y\\
          
          \mathbf{elif}\;t\_1 \leq 10^{+279}:\\
          \;\;\;\;\frac{\mathsf{fma}\left(-z, t, y \cdot x\right)}{a}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\mathsf{fma}\left(\frac{-t}{x}, z, y\right)}{a} \cdot x\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (-.f64 (*.f64 x y) (*.f64 z t)) < -1.99999999999999997e307

            1. Initial program 75.4%

              \[\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. lift-*.f64N/A

                \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot t}}{a} \]
              3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

            if -1.99999999999999997e307 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1.00000000000000006e279

            1. Initial program 98.5%

              \[\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. lift-*.f64N/A

                \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot t}}{a} \]
              3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

            if 1.00000000000000006e279 < (-.f64 (*.f64 x y) (*.f64 z t))

            1. Initial program 68.4%

              \[\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. lift-*.f64N/A

                \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot t}}{a} \]
              3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

          Alternative 4: 95.1% accurate, 0.5× speedup?

          \[\begin{array}{l} [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\ \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -\infty \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+285}\right):\\ \;\;\;\;\frac{-z}{a} \cdot t\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\ \end{array} \end{array} \]
          NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
          (FPCore (x y z t a)
           :precision binary64
           (if (or (<= (* z t) (- INFINITY)) (not (<= (* z t) 2e+285)))
             (* (/ (- z) a) t)
             (/ (- (* x y) (* z t)) a)))
          assert(x < y && y < z && z < t && t < a);
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (((z * t) <= -((double) INFINITY)) || !((z * t) <= 2e+285)) {
          		tmp = (-z / a) * t;
          	} else {
          		tmp = ((x * y) - (z * t)) / a;
          	}
          	return tmp;
          }
          
          assert x < y && y < z && z < t && t < a;
          public static double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (((z * t) <= -Double.POSITIVE_INFINITY) || !((z * t) <= 2e+285)) {
          		tmp = (-z / a) * t;
          	} else {
          		tmp = ((x * y) - (z * t)) / a;
          	}
          	return tmp;
          }
          
          [x, y, z, t, a] = sort([x, y, z, t, a])
          def code(x, y, z, t, a):
          	tmp = 0
          	if ((z * t) <= -math.inf) or not ((z * t) <= 2e+285):
          		tmp = (-z / a) * t
          	else:
          		tmp = ((x * y) - (z * t)) / a
          	return tmp
          
          x, y, z, t, a = sort([x, y, z, t, a])
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if ((Float64(z * t) <= Float64(-Inf)) || !(Float64(z * t) <= 2e+285))
          		tmp = Float64(Float64(Float64(-z) / a) * t);
          	else
          		tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a);
          	end
          	return tmp
          end
          
          x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
          function tmp_2 = code(x, y, z, t, a)
          	tmp = 0.0;
          	if (((z * t) <= -Inf) || ~(((z * t) <= 2e+285)))
          		tmp = (-z / a) * t;
          	else
          		tmp = ((x * y) - (z * t)) / a;
          	end
          	tmp_2 = tmp;
          end
          
          NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], (-Infinity)], N[Not[LessEqual[N[(z * t), $MachinePrecision], 2e+285]], $MachinePrecision]], N[(N[((-z) / a), $MachinePrecision] * t), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]
          
          \begin{array}{l}
          [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
          \\
          \begin{array}{l}
          \mathbf{if}\;z \cdot t \leq -\infty \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+285}\right):\\
          \;\;\;\;\frac{-z}{a} \cdot t\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (*.f64 z t) < -inf.0 or 2e285 < (*.f64 z t)

            1. Initial program 73.2%

              \[\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. lift-*.f64N/A

                \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot t}}{a} \]
              3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a}} \]
            6. Step-by-step derivation
              1. Applied rewrites97.8%

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

              if -inf.0 < (*.f64 z t) < 2e285

              1. Initial program 95.1%

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

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

            Alternative 5: 93.5% accurate, 0.5× speedup?

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

              1. Initial program 69.9%

                \[\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. lift-*.f64N/A

                  \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot t}}{a} \]
                3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

              1. Initial program 93.5%

                \[\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. lift-*.f64N/A

                  \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot t}}{a} \]
                3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, x, \left(-z\right) \cdot t\right)}}{a} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 6: 74.7% accurate, 0.6× speedup?

            \[\begin{array}{l} [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\ \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -1 \cdot 10^{-62} \lor \neg \left(z \cdot t \leq 10^{-6}\right):\\ \;\;\;\;\left(-z\right) \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \end{array} \end{array} \]
            NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
            (FPCore (x y z t a)
             :precision binary64
             (if (or (<= (* z t) -1e-62) (not (<= (* z t) 1e-6)))
               (* (- z) (/ t a))
               (/ (* y x) a)))
            assert(x < y && y < z && z < t && t < a);
            double code(double x, double y, double z, double t, double a) {
            	double tmp;
            	if (((z * t) <= -1e-62) || !((z * t) <= 1e-6)) {
            		tmp = -z * (t / a);
            	} else {
            		tmp = (y * x) / a;
            	}
            	return tmp;
            }
            
            NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z, t, a)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8) :: tmp
                if (((z * t) <= (-1d-62)) .or. (.not. ((z * t) <= 1d-6))) then
                    tmp = -z * (t / a)
                else
                    tmp = (y * x) / a
                end if
                code = tmp
            end function
            
            assert x < y && y < z && z < t && t < a;
            public static double code(double x, double y, double z, double t, double a) {
            	double tmp;
            	if (((z * t) <= -1e-62) || !((z * t) <= 1e-6)) {
            		tmp = -z * (t / a);
            	} else {
            		tmp = (y * x) / a;
            	}
            	return tmp;
            }
            
            [x, y, z, t, a] = sort([x, y, z, t, a])
            def code(x, y, z, t, a):
            	tmp = 0
            	if ((z * t) <= -1e-62) or not ((z * t) <= 1e-6):
            		tmp = -z * (t / a)
            	else:
            		tmp = (y * x) / a
            	return tmp
            
            x, y, z, t, a = sort([x, y, z, t, a])
            function code(x, y, z, t, a)
            	tmp = 0.0
            	if ((Float64(z * t) <= -1e-62) || !(Float64(z * t) <= 1e-6))
            		tmp = Float64(Float64(-z) * Float64(t / a));
            	else
            		tmp = Float64(Float64(y * x) / a);
            	end
            	return tmp
            end
            
            x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
            function tmp_2 = code(x, y, z, t, a)
            	tmp = 0.0;
            	if (((z * t) <= -1e-62) || ~(((z * t) <= 1e-6)))
            		tmp = -z * (t / a);
            	else
            		tmp = (y * x) / a;
            	end
            	tmp_2 = tmp;
            end
            
            NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
            code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], -1e-62], N[Not[LessEqual[N[(z * t), $MachinePrecision], 1e-6]], $MachinePrecision]], N[((-z) * N[(t / a), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision]]
            
            \begin{array}{l}
            [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
            \\
            \begin{array}{l}
            \mathbf{if}\;z \cdot t \leq -1 \cdot 10^{-62} \lor \neg \left(z \cdot t \leq 10^{-6}\right):\\
            \;\;\;\;\left(-z\right) \cdot \frac{t}{a}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{y \cdot x}{a}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (*.f64 z t) < -1e-62 or 9.99999999999999955e-7 < (*.f64 z t)

              1. Initial program 89.1%

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

                \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a}} \]
              4. Step-by-step derivation
                1. Applied rewrites74.7%

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

                if -1e-62 < (*.f64 z t) < 9.99999999999999955e-7

                1. Initial program 94.2%

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

                  \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
                4. Step-by-step derivation
                  1. Applied rewrites80.5%

                    \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
                5. Recombined 2 regimes into one program.
                6. Final simplification77.1%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot t \leq -1 \cdot 10^{-62} \lor \neg \left(z \cdot t \leq 10^{-6}\right):\\ \;\;\;\;\left(-z\right) \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \end{array} \]
                7. Add Preprocessing

                Alternative 7: 74.5% accurate, 0.6× speedup?

                \[\begin{array}{l} [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\ \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+90} \lor \neg \left(z \cdot t \leq 2000000000\right):\\ \;\;\;\;\frac{-z}{a} \cdot t\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \end{array} \end{array} \]
                NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
                (FPCore (x y z t a)
                 :precision binary64
                 (if (or (<= (* z t) -2e+90) (not (<= (* z t) 2000000000.0)))
                   (* (/ (- z) a) t)
                   (/ (* y x) a)))
                assert(x < y && y < z && z < t && t < a);
                double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if (((z * t) <= -2e+90) || !((z * t) <= 2000000000.0)) {
                		tmp = (-z / a) * t;
                	} else {
                		tmp = (y * x) / a;
                	}
                	return tmp;
                }
                
                NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
                module fmin_fmax_functions
                    implicit none
                    private
                    public fmax
                    public fmin
                
                    interface fmax
                        module procedure fmax88
                        module procedure fmax44
                        module procedure fmax84
                        module procedure fmax48
                    end interface
                    interface fmin
                        module procedure fmin88
                        module procedure fmin44
                        module procedure fmin84
                        module procedure fmin48
                    end interface
                contains
                    real(8) function fmax88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmax44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmax84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmax48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                    end function
                    real(8) function fmin88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmin44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmin84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmin48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                    end function
                end module
                
                real(8) function code(x, y, z, t, a)
                use fmin_fmax_functions
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8), intent (in) :: t
                    real(8), intent (in) :: a
                    real(8) :: tmp
                    if (((z * t) <= (-2d+90)) .or. (.not. ((z * t) <= 2000000000.0d0))) then
                        tmp = (-z / a) * t
                    else
                        tmp = (y * x) / a
                    end if
                    code = tmp
                end function
                
                assert x < y && y < z && z < t && t < a;
                public static double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if (((z * t) <= -2e+90) || !((z * t) <= 2000000000.0)) {
                		tmp = (-z / a) * t;
                	} else {
                		tmp = (y * x) / a;
                	}
                	return tmp;
                }
                
                [x, y, z, t, a] = sort([x, y, z, t, a])
                def code(x, y, z, t, a):
                	tmp = 0
                	if ((z * t) <= -2e+90) or not ((z * t) <= 2000000000.0):
                		tmp = (-z / a) * t
                	else:
                		tmp = (y * x) / a
                	return tmp
                
                x, y, z, t, a = sort([x, y, z, t, a])
                function code(x, y, z, t, a)
                	tmp = 0.0
                	if ((Float64(z * t) <= -2e+90) || !(Float64(z * t) <= 2000000000.0))
                		tmp = Float64(Float64(Float64(-z) / a) * t);
                	else
                		tmp = Float64(Float64(y * x) / a);
                	end
                	return tmp
                end
                
                x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
                function tmp_2 = code(x, y, z, t, a)
                	tmp = 0.0;
                	if (((z * t) <= -2e+90) || ~(((z * t) <= 2000000000.0)))
                		tmp = (-z / a) * t;
                	else
                		tmp = (y * x) / a;
                	end
                	tmp_2 = tmp;
                end
                
                NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
                code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], -2e+90], N[Not[LessEqual[N[(z * t), $MachinePrecision], 2000000000.0]], $MachinePrecision]], N[(N[((-z) / a), $MachinePrecision] * t), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision]]
                
                \begin{array}{l}
                [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
                \\
                \begin{array}{l}
                \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+90} \lor \neg \left(z \cdot t \leq 2000000000\right):\\
                \;\;\;\;\frac{-z}{a} \cdot t\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{y \cdot x}{a}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (*.f64 z t) < -1.99999999999999993e90 or 2e9 < (*.f64 z t)

                  1. Initial program 87.6%

                    \[\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. lift-*.f64N/A

                      \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot t}}{a} \]
                    3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

                    if -1.99999999999999993e90 < (*.f64 z t) < 2e9

                    1. Initial program 94.5%

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

                      \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
                    4. Step-by-step derivation
                      1. Applied rewrites72.8%

                        \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
                    5. Recombined 2 regimes into one program.
                    6. Final simplification76.9%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+90} \lor \neg \left(z \cdot t \leq 2000000000\right):\\ \;\;\;\;\frac{-z}{a} \cdot t\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \end{array} \]
                    7. Add Preprocessing

                    Alternative 8: 93.3% accurate, 0.7× speedup?

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

                      1. Initial program 69.9%

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

                        \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
                      4. Step-by-step derivation
                        1. Applied rewrites96.1%

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

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

                        1. Initial program 93.5%

                          \[\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. lift-*.f64N/A

                            \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot t}}{a} \]
                          3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                      Alternative 9: 51.9% accurate, 1.1× speedup?

                      \[\begin{array}{l} [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+131}:\\ \;\;\;\;\frac{x}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \end{array} \end{array} \]
                      NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
                      (FPCore (x y z t a)
                       :precision binary64
                       (if (<= x -2.3e+131) (* (/ x a) y) (/ (* y x) a)))
                      assert(x < y && y < z && z < t && t < a);
                      double code(double x, double y, double z, double t, double a) {
                      	double tmp;
                      	if (x <= -2.3e+131) {
                      		tmp = (x / a) * y;
                      	} else {
                      		tmp = (y * x) / a;
                      	}
                      	return tmp;
                      }
                      
                      NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(x, y, z, t, a)
                      use fmin_fmax_functions
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          real(8), intent (in) :: a
                          real(8) :: tmp
                          if (x <= (-2.3d+131)) then
                              tmp = (x / a) * y
                          else
                              tmp = (y * x) / a
                          end if
                          code = tmp
                      end function
                      
                      assert x < y && y < z && z < t && t < a;
                      public static double code(double x, double y, double z, double t, double a) {
                      	double tmp;
                      	if (x <= -2.3e+131) {
                      		tmp = (x / a) * y;
                      	} else {
                      		tmp = (y * x) / a;
                      	}
                      	return tmp;
                      }
                      
                      [x, y, z, t, a] = sort([x, y, z, t, a])
                      def code(x, y, z, t, a):
                      	tmp = 0
                      	if x <= -2.3e+131:
                      		tmp = (x / a) * y
                      	else:
                      		tmp = (y * x) / a
                      	return tmp
                      
                      x, y, z, t, a = sort([x, y, z, t, a])
                      function code(x, y, z, t, a)
                      	tmp = 0.0
                      	if (x <= -2.3e+131)
                      		tmp = Float64(Float64(x / a) * y);
                      	else
                      		tmp = Float64(Float64(y * x) / a);
                      	end
                      	return tmp
                      end
                      
                      x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
                      function tmp_2 = code(x, y, z, t, a)
                      	tmp = 0.0;
                      	if (x <= -2.3e+131)
                      		tmp = (x / a) * y;
                      	else
                      		tmp = (y * x) / a;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
                      code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.3e+131], N[(N[(x / a), $MachinePrecision] * y), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision]]
                      
                      \begin{array}{l}
                      [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;x \leq -2.3 \cdot 10^{+131}:\\
                      \;\;\;\;\frac{x}{a} \cdot y\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{y \cdot x}{a}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < -2.29999999999999992e131

                        1. Initial program 90.9%

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

                          \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
                        4. Step-by-step derivation
                          1. Applied rewrites71.9%

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

                          if -2.29999999999999992e131 < x

                          1. Initial program 91.2%

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

                            \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
                          4. Step-by-step derivation
                            1. Applied rewrites42.3%

                              \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
                          5. Recombined 2 regimes into one program.
                          6. Final simplification46.0%

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

                          Alternative 10: 52.2% accurate, 1.1× speedup?

                          \[\begin{array}{l} [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -5.2 \cdot 10^{-121}:\\ \;\;\;\;\frac{x}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{a}\\ \end{array} \end{array} \]
                          NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
                          (FPCore (x y z t a)
                           :precision binary64
                           (if (<= x -5.2e-121) (* (/ x a) y) (* x (/ y a))))
                          assert(x < y && y < z && z < t && t < a);
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if (x <= -5.2e-121) {
                          		tmp = (x / a) * y;
                          	} else {
                          		tmp = x * (y / a);
                          	}
                          	return tmp;
                          }
                          
                          NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
                          module fmin_fmax_functions
                              implicit none
                              private
                              public fmax
                              public fmin
                          
                              interface fmax
                                  module procedure fmax88
                                  module procedure fmax44
                                  module procedure fmax84
                                  module procedure fmax48
                              end interface
                              interface fmin
                                  module procedure fmin88
                                  module procedure fmin44
                                  module procedure fmin84
                                  module procedure fmin48
                              end interface
                          contains
                              real(8) function fmax88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmax44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmax84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmax48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                              end function
                              real(8) function fmin88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmin44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmin84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmin48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                              end function
                          end module
                          
                          real(8) function code(x, y, z, t, a)
                          use fmin_fmax_functions
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8), intent (in) :: t
                              real(8), intent (in) :: a
                              real(8) :: tmp
                              if (x <= (-5.2d-121)) then
                                  tmp = (x / a) * y
                              else
                                  tmp = x * (y / a)
                              end if
                              code = tmp
                          end function
                          
                          assert x < y && y < z && z < t && t < a;
                          public static double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if (x <= -5.2e-121) {
                          		tmp = (x / a) * y;
                          	} else {
                          		tmp = x * (y / a);
                          	}
                          	return tmp;
                          }
                          
                          [x, y, z, t, a] = sort([x, y, z, t, a])
                          def code(x, y, z, t, a):
                          	tmp = 0
                          	if x <= -5.2e-121:
                          		tmp = (x / a) * y
                          	else:
                          		tmp = x * (y / a)
                          	return tmp
                          
                          x, y, z, t, a = sort([x, y, z, t, a])
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if (x <= -5.2e-121)
                          		tmp = Float64(Float64(x / a) * y);
                          	else
                          		tmp = Float64(x * Float64(y / a));
                          	end
                          	return tmp
                          end
                          
                          x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
                          function tmp_2 = code(x, y, z, t, a)
                          	tmp = 0.0;
                          	if (x <= -5.2e-121)
                          		tmp = (x / a) * y;
                          	else
                          		tmp = x * (y / a);
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
                          code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5.2e-121], N[(N[(x / a), $MachinePrecision] * y), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;x \leq -5.2 \cdot 10^{-121}:\\
                          \;\;\;\;\frac{x}{a} \cdot y\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;x \cdot \frac{y}{a}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if x < -5.19999999999999972e-121

                            1. Initial program 91.6%

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

                              \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
                            4. Step-by-step derivation
                              1. Applied rewrites48.9%

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

                              if -5.19999999999999972e-121 < x

                              1. Initial program 91.0%

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

                                \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
                              4. Step-by-step derivation
                                1. Applied rewrites42.7%

                                  \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
                                2. Step-by-step derivation
                                  1. Applied rewrites45.8%

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

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

                                Alternative 11: 51.8% accurate, 1.5× speedup?

                                \[\begin{array}{l} [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\ \\ x \cdot \frac{y}{a} \end{array} \]
                                NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
                                (FPCore (x y z t a) :precision binary64 (* x (/ y a)))
                                assert(x < y && y < z && z < t && t < a);
                                double code(double x, double y, double z, double t, double a) {
                                	return x * (y / a);
                                }
                                
                                NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
                                module fmin_fmax_functions
                                    implicit none
                                    private
                                    public fmax
                                    public fmin
                                
                                    interface fmax
                                        module procedure fmax88
                                        module procedure fmax44
                                        module procedure fmax84
                                        module procedure fmax48
                                    end interface
                                    interface fmin
                                        module procedure fmin88
                                        module procedure fmin44
                                        module procedure fmin84
                                        module procedure fmin48
                                    end interface
                                contains
                                    real(8) function fmax88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmax44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmax84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmax48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmin44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmin48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                    end function
                                end module
                                
                                real(8) function code(x, y, z, t, a)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    real(8), intent (in) :: z
                                    real(8), intent (in) :: t
                                    real(8), intent (in) :: a
                                    code = x * (y / a)
                                end function
                                
                                assert x < y && y < z && z < t && t < a;
                                public static double code(double x, double y, double z, double t, double a) {
                                	return x * (y / a);
                                }
                                
                                [x, y, z, t, a] = sort([x, y, z, t, a])
                                def code(x, y, z, t, a):
                                	return x * (y / a)
                                
                                x, y, z, t, a = sort([x, y, z, t, a])
                                function code(x, y, z, t, a)
                                	return Float64(x * Float64(y / a))
                                end
                                
                                x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
                                function tmp = code(x, y, z, t, a)
                                	tmp = x * (y / a);
                                end
                                
                                NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
                                code[x_, y_, z_, t_, a_] := N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]
                                
                                \begin{array}{l}
                                [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
                                \\
                                x \cdot \frac{y}{a}
                                \end{array}
                                
                                Derivation
                                1. Initial program 91.2%

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

                                  \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
                                4. Step-by-step derivation
                                  1. Applied rewrites44.7%

                                    \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
                                  2. Step-by-step derivation
                                    1. Applied rewrites46.1%

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

                                      \[\leadsto x \cdot \frac{y}{a} \]
                                    3. Add Preprocessing

                                    Developer Target 1: 91.4% 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;
                                    }
                                    
                                    module fmin_fmax_functions
                                        implicit none
                                        private
                                        public fmax
                                        public fmin
                                    
                                        interface fmax
                                            module procedure fmax88
                                            module procedure fmax44
                                            module procedure fmax84
                                            module procedure fmax48
                                        end interface
                                        interface fmin
                                            module procedure fmin88
                                            module procedure fmin44
                                            module procedure fmin84
                                            module procedure fmin48
                                        end interface
                                    contains
                                        real(8) function fmax88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmax44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmax84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmax48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmin44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmin48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                        end function
                                    end module
                                    
                                    real(8) function code(x, y, z, t, a)
                                    use fmin_fmax_functions
                                        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 2025019 
                                    (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))