Data.Colour.RGB:hslsv from colour-2.3.3, B

Percentage Accurate: 99.4% → 99.8%
Time: 7.3s
Alternatives: 15
Speedup: 1.1×

Specification

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

\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\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 15 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: 99.4% accurate, 1.0× speedup?

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

\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}

Alternative 1: 99.8% accurate, 1.1× speedup?

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

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

    \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-+.f64N/A

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

      \[\leadsto \frac{60 \cdot \left(x - y\right)}{z - t} + \color{blue}{a \cdot 120} \]
    3. fp-cancel-sign-sub-invN/A

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t} - \left(\mathsf{neg}\left(a\right)\right) \cdot 120} \]
    4. fp-cancel-sub-sign-invN/A

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

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

      \[\leadsto \color{blue}{a} \cdot 120 + \frac{60 \cdot \left(x - y\right)}{z - t} \]
    7. lower-fma.f6499.4

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{z - t} \cdot \left(x - y\right)}\right) \]
    14. lower-/.f6499.8

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
  5. Add Preprocessing

Alternative 2: 74.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-27} \lor \neg \left(t\_1 \leq 10^{+19}\right):\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
   (if (or (<= t_1 -4e-27) (not (<= t_1 1e+19)))
     (* (- x y) (/ 60.0 (- z t)))
     (* 120.0 a))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if ((t_1 <= -4e-27) || !(t_1 <= 1e+19)) {
		tmp = (x - y) * (60.0 / (z - t));
	} else {
		tmp = 120.0 * a;
	}
	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 = (60.0d0 * (x - y)) / (z - t)
    if ((t_1 <= (-4d-27)) .or. (.not. (t_1 <= 1d+19))) then
        tmp = (x - y) * (60.0d0 / (z - t))
    else
        tmp = 120.0d0 * a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if ((t_1 <= -4e-27) || !(t_1 <= 1e+19)) {
		tmp = (x - y) * (60.0 / (z - t));
	} else {
		tmp = 120.0 * a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (60.0 * (x - y)) / (z - t)
	tmp = 0
	if (t_1 <= -4e-27) or not (t_1 <= 1e+19):
		tmp = (x - y) * (60.0 / (z - t))
	else:
		tmp = 120.0 * a
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
	tmp = 0.0
	if ((t_1 <= -4e-27) || !(t_1 <= 1e+19))
		tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)));
	else
		tmp = Float64(120.0 * a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (60.0 * (x - y)) / (z - t);
	tmp = 0.0;
	if ((t_1 <= -4e-27) || ~((t_1 <= 1e+19)))
		tmp = (x - y) * (60.0 / (z - t));
	else
		tmp = 120.0 * a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e-27], N[Not[LessEqual[t$95$1, 1e+19]], $MachinePrecision]], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-27} \lor \neg \left(t\_1 \leq 10^{+19}\right):\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\

\mathbf{else}:\\
\;\;\;\;120 \cdot a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.0000000000000002e-27 or 1e19 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 98.9%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    4. Step-by-step derivation
      1. Applied rewrites81.2%

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

      if -4.0000000000000002e-27 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1e19

      1. Initial program 99.8%

        \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

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

          \[\leadsto \color{blue}{120 \cdot a} \]
      5. Recombined 2 regimes into one program.
      6. Final simplification77.8%

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

      Alternative 3: 73.7% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-27} \lor \neg \left(t\_1 \leq 10^{+19}\right):\\ \;\;\;\;\frac{\left(y - x\right) \cdot -60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
         (if (or (<= t_1 -4e-27) (not (<= t_1 1e+19)))
           (/ (* (- y x) -60.0) (- z t))
           (* 120.0 a))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = (60.0 * (x - y)) / (z - t);
      	double tmp;
      	if ((t_1 <= -4e-27) || !(t_1 <= 1e+19)) {
      		tmp = ((y - x) * -60.0) / (z - t);
      	} else {
      		tmp = 120.0 * a;
      	}
      	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 = (60.0d0 * (x - y)) / (z - t)
          if ((t_1 <= (-4d-27)) .or. (.not. (t_1 <= 1d+19))) then
              tmp = ((y - x) * (-60.0d0)) / (z - t)
          else
              tmp = 120.0d0 * a
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double t_1 = (60.0 * (x - y)) / (z - t);
      	double tmp;
      	if ((t_1 <= -4e-27) || !(t_1 <= 1e+19)) {
      		tmp = ((y - x) * -60.0) / (z - t);
      	} else {
      		tmp = 120.0 * a;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	t_1 = (60.0 * (x - y)) / (z - t)
      	tmp = 0
      	if (t_1 <= -4e-27) or not (t_1 <= 1e+19):
      		tmp = ((y - x) * -60.0) / (z - t)
      	else:
      		tmp = 120.0 * a
      	return tmp
      
      function code(x, y, z, t, a)
      	t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
      	tmp = 0.0
      	if ((t_1 <= -4e-27) || !(t_1 <= 1e+19))
      		tmp = Float64(Float64(Float64(y - x) * -60.0) / Float64(z - t));
      	else
      		tmp = Float64(120.0 * a);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	t_1 = (60.0 * (x - y)) / (z - t);
      	tmp = 0.0;
      	if ((t_1 <= -4e-27) || ~((t_1 <= 1e+19)))
      		tmp = ((y - x) * -60.0) / (z - t);
      	else
      		tmp = 120.0 * a;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e-27], N[Not[LessEqual[t$95$1, 1e+19]], $MachinePrecision]], N[(N[(N[(y - x), $MachinePrecision] * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
      \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-27} \lor \neg \left(t\_1 \leq 10^{+19}\right):\\
      \;\;\;\;\frac{\left(y - x\right) \cdot -60}{z - t}\\
      
      \mathbf{else}:\\
      \;\;\;\;120 \cdot a\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.0000000000000002e-27 or 1e19 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

        1. Initial program 98.9%

          \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
        2. Add Preprocessing
        3. Taylor expanded in a around inf

          \[\leadsto \color{blue}{a \cdot \left(120 + 60 \cdot \frac{x - y}{a \cdot \left(z - t\right)}\right)} \]
        4. Step-by-step derivation
          1. Applied rewrites87.6%

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

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

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

            if -4.0000000000000002e-27 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1e19

            1. Initial program 99.8%

              \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
            2. Add Preprocessing
            3. Taylor expanded in z around inf

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

                \[\leadsto \color{blue}{120 \cdot a} \]
            5. Recombined 2 regimes into one program.
            6. Final simplification77.4%

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

            Alternative 4: 58.9% accurate, 0.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-9} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+39}\right):\\ \;\;\;\;\frac{x - y}{z} \cdot 60\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \end{array} \]
            (FPCore (x y z t a)
             :precision binary64
             (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
               (if (or (<= t_1 -4e-9) (not (<= t_1 5e+39)))
                 (* (/ (- x y) z) 60.0)
                 (* 120.0 a))))
            double code(double x, double y, double z, double t, double a) {
            	double t_1 = (60.0 * (x - y)) / (z - t);
            	double tmp;
            	if ((t_1 <= -4e-9) || !(t_1 <= 5e+39)) {
            		tmp = ((x - y) / z) * 60.0;
            	} else {
            		tmp = 120.0 * a;
            	}
            	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 = (60.0d0 * (x - y)) / (z - t)
                if ((t_1 <= (-4d-9)) .or. (.not. (t_1 <= 5d+39))) then
                    tmp = ((x - y) / z) * 60.0d0
                else
                    tmp = 120.0d0 * a
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a) {
            	double t_1 = (60.0 * (x - y)) / (z - t);
            	double tmp;
            	if ((t_1 <= -4e-9) || !(t_1 <= 5e+39)) {
            		tmp = ((x - y) / z) * 60.0;
            	} else {
            		tmp = 120.0 * a;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a):
            	t_1 = (60.0 * (x - y)) / (z - t)
            	tmp = 0
            	if (t_1 <= -4e-9) or not (t_1 <= 5e+39):
            		tmp = ((x - y) / z) * 60.0
            	else:
            		tmp = 120.0 * a
            	return tmp
            
            function code(x, y, z, t, a)
            	t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
            	tmp = 0.0
            	if ((t_1 <= -4e-9) || !(t_1 <= 5e+39))
            		tmp = Float64(Float64(Float64(x - y) / z) * 60.0);
            	else
            		tmp = Float64(120.0 * a);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a)
            	t_1 = (60.0 * (x - y)) / (z - t);
            	tmp = 0.0;
            	if ((t_1 <= -4e-9) || ~((t_1 <= 5e+39)))
            		tmp = ((x - y) / z) * 60.0;
            	else
            		tmp = 120.0 * a;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e-9], N[Not[LessEqual[t$95$1, 5e+39]], $MachinePrecision]], N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * 60.0), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
            \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-9} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+39}\right):\\
            \;\;\;\;\frac{x - y}{z} \cdot 60\\
            
            \mathbf{else}:\\
            \;\;\;\;120 \cdot a\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.00000000000000025e-9 or 5.00000000000000015e39 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

              1. Initial program 98.9%

                \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

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

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

                  \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z}} \]
                3. Step-by-step derivation
                  1. Applied rewrites48.5%

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

                  if -4.00000000000000025e-9 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000015e39

                  1. Initial program 99.8%

                    \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                  2. Add Preprocessing
                  3. Taylor expanded in z around inf

                    \[\leadsto \color{blue}{120 \cdot a} \]
                  4. Step-by-step derivation
                    1. Applied rewrites70.8%

                      \[\leadsto \color{blue}{120 \cdot a} \]
                  5. Recombined 2 regimes into one program.
                  6. Final simplification60.9%

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

                  Alternative 5: 56.5% accurate, 0.4× speedup?

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

                    1. Initial program 99.7%

                      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                    2. Add Preprocessing
                    3. Taylor expanded in a around 0

                      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
                    4. Step-by-step derivation
                      1. Applied rewrites79.1%

                        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
                      2. Taylor expanded in z around 0

                        \[\leadsto \left(x - y\right) \cdot \frac{-60}{\color{blue}{t}} \]
                      3. Step-by-step derivation
                        1. Applied rewrites52.0%

                          \[\leadsto \left(x - y\right) \cdot \frac{-60}{\color{blue}{t}} \]

                        if -4.0000000000000002e-27 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1e19

                        1. Initial program 99.8%

                          \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                        2. Add Preprocessing
                        3. Taylor expanded in z around inf

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

                            \[\leadsto \color{blue}{120 \cdot a} \]

                          if 1e19 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

                          1. Initial program 98.2%

                            \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                          2. Add Preprocessing
                          3. Taylor expanded in x around inf

                            \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} \]
                          4. Step-by-step derivation
                            1. Applied rewrites49.2%

                              \[\leadsto \color{blue}{\frac{x}{z - t} \cdot 60} \]
                          5. Recombined 3 regimes into one program.
                          6. Add Preprocessing

                          Alternative 6: 57.8% accurate, 0.4× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-27}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+39}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\ \end{array} \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
                             (if (<= t_1 -4e-27)
                               (* (- x y) (/ -60.0 t))
                               (if (<= t_1 5e+39) (* 120.0 a) (* (- x y) (/ 60.0 z))))))
                          double code(double x, double y, double z, double t, double a) {
                          	double t_1 = (60.0 * (x - y)) / (z - t);
                          	double tmp;
                          	if (t_1 <= -4e-27) {
                          		tmp = (x - y) * (-60.0 / t);
                          	} else if (t_1 <= 5e+39) {
                          		tmp = 120.0 * a;
                          	} else {
                          		tmp = (x - y) * (60.0 / z);
                          	}
                          	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 = (60.0d0 * (x - y)) / (z - t)
                              if (t_1 <= (-4d-27)) then
                                  tmp = (x - y) * ((-60.0d0) / t)
                              else if (t_1 <= 5d+39) then
                                  tmp = 120.0d0 * a
                              else
                                  tmp = (x - y) * (60.0d0 / z)
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a) {
                          	double t_1 = (60.0 * (x - y)) / (z - t);
                          	double tmp;
                          	if (t_1 <= -4e-27) {
                          		tmp = (x - y) * (-60.0 / t);
                          	} else if (t_1 <= 5e+39) {
                          		tmp = 120.0 * a;
                          	} else {
                          		tmp = (x - y) * (60.0 / z);
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a):
                          	t_1 = (60.0 * (x - y)) / (z - t)
                          	tmp = 0
                          	if t_1 <= -4e-27:
                          		tmp = (x - y) * (-60.0 / t)
                          	elif t_1 <= 5e+39:
                          		tmp = 120.0 * a
                          	else:
                          		tmp = (x - y) * (60.0 / z)
                          	return tmp
                          
                          function code(x, y, z, t, a)
                          	t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
                          	tmp = 0.0
                          	if (t_1 <= -4e-27)
                          		tmp = Float64(Float64(x - y) * Float64(-60.0 / t));
                          	elseif (t_1 <= 5e+39)
                          		tmp = Float64(120.0 * a);
                          	else
                          		tmp = Float64(Float64(x - y) * Float64(60.0 / z));
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a)
                          	t_1 = (60.0 * (x - y)) / (z - t);
                          	tmp = 0.0;
                          	if (t_1 <= -4e-27)
                          		tmp = (x - y) * (-60.0 / t);
                          	elseif (t_1 <= 5e+39)
                          		tmp = 120.0 * a;
                          	else
                          		tmp = (x - y) * (60.0 / z);
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e-27], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+39], N[(120.0 * a), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
                          \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-27}:\\
                          \;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
                          
                          \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+39}:\\
                          \;\;\;\;120 \cdot a\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.0000000000000002e-27

                            1. Initial program 99.7%

                              \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                            2. Add Preprocessing
                            3. Taylor expanded in a around 0

                              \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
                            4. Step-by-step derivation
                              1. Applied rewrites79.1%

                                \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
                              2. Taylor expanded in z around 0

                                \[\leadsto \left(x - y\right) \cdot \frac{-60}{\color{blue}{t}} \]
                              3. Step-by-step derivation
                                1. Applied rewrites52.0%

                                  \[\leadsto \left(x - y\right) \cdot \frac{-60}{\color{blue}{t}} \]

                                if -4.0000000000000002e-27 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000015e39

                                1. Initial program 99.8%

                                  \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                2. Add Preprocessing
                                3. Taylor expanded in z around inf

                                  \[\leadsto \color{blue}{120 \cdot a} \]
                                4. Step-by-step derivation
                                  1. Applied rewrites72.5%

                                    \[\leadsto \color{blue}{120 \cdot a} \]

                                  if 5.00000000000000015e39 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

                                  1. Initial program 98.1%

                                    \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in a around 0

                                    \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
                                  4. Step-by-step derivation
                                    1. Applied rewrites83.5%

                                      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
                                    2. Taylor expanded in z around inf

                                      \[\leadsto \left(x - y\right) \cdot \frac{60}{z} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites51.1%

                                        \[\leadsto \left(x - y\right) \cdot \frac{60}{z} \]
                                    4. Recombined 3 regimes into one program.
                                    5. Add Preprocessing

                                    Alternative 7: 57.8% accurate, 0.4× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-27}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+39}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y}{z} \cdot 60\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a)
                                     :precision binary64
                                     (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
                                       (if (<= t_1 -4e-27)
                                         (* (- x y) (/ -60.0 t))
                                         (if (<= t_1 5e+39) (* 120.0 a) (* (/ (- x y) z) 60.0)))))
                                    double code(double x, double y, double z, double t, double a) {
                                    	double t_1 = (60.0 * (x - y)) / (z - t);
                                    	double tmp;
                                    	if (t_1 <= -4e-27) {
                                    		tmp = (x - y) * (-60.0 / t);
                                    	} else if (t_1 <= 5e+39) {
                                    		tmp = 120.0 * a;
                                    	} else {
                                    		tmp = ((x - y) / z) * 60.0;
                                    	}
                                    	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 = (60.0d0 * (x - y)) / (z - t)
                                        if (t_1 <= (-4d-27)) then
                                            tmp = (x - y) * ((-60.0d0) / t)
                                        else if (t_1 <= 5d+39) then
                                            tmp = 120.0d0 * a
                                        else
                                            tmp = ((x - y) / z) * 60.0d0
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double x, double y, double z, double t, double a) {
                                    	double t_1 = (60.0 * (x - y)) / (z - t);
                                    	double tmp;
                                    	if (t_1 <= -4e-27) {
                                    		tmp = (x - y) * (-60.0 / t);
                                    	} else if (t_1 <= 5e+39) {
                                    		tmp = 120.0 * a;
                                    	} else {
                                    		tmp = ((x - y) / z) * 60.0;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x, y, z, t, a):
                                    	t_1 = (60.0 * (x - y)) / (z - t)
                                    	tmp = 0
                                    	if t_1 <= -4e-27:
                                    		tmp = (x - y) * (-60.0 / t)
                                    	elif t_1 <= 5e+39:
                                    		tmp = 120.0 * a
                                    	else:
                                    		tmp = ((x - y) / z) * 60.0
                                    	return tmp
                                    
                                    function code(x, y, z, t, a)
                                    	t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
                                    	tmp = 0.0
                                    	if (t_1 <= -4e-27)
                                    		tmp = Float64(Float64(x - y) * Float64(-60.0 / t));
                                    	elseif (t_1 <= 5e+39)
                                    		tmp = Float64(120.0 * a);
                                    	else
                                    		tmp = Float64(Float64(Float64(x - y) / z) * 60.0);
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x, y, z, t, a)
                                    	t_1 = (60.0 * (x - y)) / (z - t);
                                    	tmp = 0.0;
                                    	if (t_1 <= -4e-27)
                                    		tmp = (x - y) * (-60.0 / t);
                                    	elseif (t_1 <= 5e+39)
                                    		tmp = 120.0 * a;
                                    	else
                                    		tmp = ((x - y) / z) * 60.0;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e-27], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+39], N[(120.0 * a), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * 60.0), $MachinePrecision]]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
                                    \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-27}:\\
                                    \;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
                                    
                                    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+39}:\\
                                    \;\;\;\;120 \cdot a\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\frac{x - y}{z} \cdot 60\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.0000000000000002e-27

                                      1. Initial program 99.7%

                                        \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in a around 0

                                        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
                                      4. Step-by-step derivation
                                        1. Applied rewrites79.1%

                                          \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
                                        2. Taylor expanded in z around 0

                                          \[\leadsto \left(x - y\right) \cdot \frac{-60}{\color{blue}{t}} \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites52.0%

                                            \[\leadsto \left(x - y\right) \cdot \frac{-60}{\color{blue}{t}} \]

                                          if -4.0000000000000002e-27 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000015e39

                                          1. Initial program 99.8%

                                            \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in z around inf

                                            \[\leadsto \color{blue}{120 \cdot a} \]
                                          4. Step-by-step derivation
                                            1. Applied rewrites72.5%

                                              \[\leadsto \color{blue}{120 \cdot a} \]

                                            if 5.00000000000000015e39 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

                                            1. Initial program 98.1%

                                              \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                            2. Add Preprocessing
                                            3. Taylor expanded in z around inf

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

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

                                                \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z}} \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites51.1%

                                                  \[\leadsto \frac{x - y}{z} \cdot \color{blue}{60} \]
                                              4. Recombined 3 regimes into one program.
                                              5. Add Preprocessing

                                              Alternative 8: 55.0% accurate, 0.4× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+193} \lor \neg \left(t\_1 \leq 10^{+131}\right):\\ \;\;\;\;\frac{x}{z} \cdot 60\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \end{array} \]
                                              (FPCore (x y z t a)
                                               :precision binary64
                                               (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
                                                 (if (or (<= t_1 -5e+193) (not (<= t_1 1e+131)))
                                                   (* (/ x z) 60.0)
                                                   (* 120.0 a))))
                                              double code(double x, double y, double z, double t, double a) {
                                              	double t_1 = (60.0 * (x - y)) / (z - t);
                                              	double tmp;
                                              	if ((t_1 <= -5e+193) || !(t_1 <= 1e+131)) {
                                              		tmp = (x / z) * 60.0;
                                              	} else {
                                              		tmp = 120.0 * a;
                                              	}
                                              	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 = (60.0d0 * (x - y)) / (z - t)
                                                  if ((t_1 <= (-5d+193)) .or. (.not. (t_1 <= 1d+131))) then
                                                      tmp = (x / z) * 60.0d0
                                                  else
                                                      tmp = 120.0d0 * a
                                                  end if
                                                  code = tmp
                                              end function
                                              
                                              public static double code(double x, double y, double z, double t, double a) {
                                              	double t_1 = (60.0 * (x - y)) / (z - t);
                                              	double tmp;
                                              	if ((t_1 <= -5e+193) || !(t_1 <= 1e+131)) {
                                              		tmp = (x / z) * 60.0;
                                              	} else {
                                              		tmp = 120.0 * a;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              def code(x, y, z, t, a):
                                              	t_1 = (60.0 * (x - y)) / (z - t)
                                              	tmp = 0
                                              	if (t_1 <= -5e+193) or not (t_1 <= 1e+131):
                                              		tmp = (x / z) * 60.0
                                              	else:
                                              		tmp = 120.0 * a
                                              	return tmp
                                              
                                              function code(x, y, z, t, a)
                                              	t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
                                              	tmp = 0.0
                                              	if ((t_1 <= -5e+193) || !(t_1 <= 1e+131))
                                              		tmp = Float64(Float64(x / z) * 60.0);
                                              	else
                                              		tmp = Float64(120.0 * a);
                                              	end
                                              	return tmp
                                              end
                                              
                                              function tmp_2 = code(x, y, z, t, a)
                                              	t_1 = (60.0 * (x - y)) / (z - t);
                                              	tmp = 0.0;
                                              	if ((t_1 <= -5e+193) || ~((t_1 <= 1e+131)))
                                              		tmp = (x / z) * 60.0;
                                              	else
                                              		tmp = 120.0 * a;
                                              	end
                                              	tmp_2 = tmp;
                                              end
                                              
                                              code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+193], N[Not[LessEqual[t$95$1, 1e+131]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] * 60.0), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
                                              \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+193} \lor \neg \left(t\_1 \leq 10^{+131}\right):\\
                                              \;\;\;\;\frac{x}{z} \cdot 60\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;120 \cdot a\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 2 regimes
                                              2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.99999999999999972e193 or 9.9999999999999991e130 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

                                                1. Initial program 98.0%

                                                  \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                2. Add Preprocessing
                                                3. Taylor expanded in z around inf

                                                  \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
                                                4. Step-by-step derivation
                                                  1. Applied rewrites63.6%

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

                                                    \[\leadsto 60 \cdot \color{blue}{\frac{x}{z}} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites37.5%

                                                      \[\leadsto \frac{x}{z} \cdot \color{blue}{60} \]

                                                    if -4.99999999999999972e193 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999991e130

                                                    1. Initial program 99.8%

                                                      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                    2. Add Preprocessing
                                                    3. Taylor expanded in z around inf

                                                      \[\leadsto \color{blue}{120 \cdot a} \]
                                                    4. Step-by-step derivation
                                                      1. Applied rewrites60.2%

                                                        \[\leadsto \color{blue}{120 \cdot a} \]
                                                    5. Recombined 2 regimes into one program.
                                                    6. Final simplification55.0%

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

                                                    Alternative 9: 55.1% accurate, 0.4× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+205}:\\ \;\;\;\;x \cdot \frac{-60}{t}\\ \mathbf{elif}\;t\_1 \leq 10^{+131}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot 60\\ \end{array} \end{array} \]
                                                    (FPCore (x y z t a)
                                                     :precision binary64
                                                     (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
                                                       (if (<= t_1 -4e+205)
                                                         (* x (/ -60.0 t))
                                                         (if (<= t_1 1e+131) (* 120.0 a) (* (/ x z) 60.0)))))
                                                    double code(double x, double y, double z, double t, double a) {
                                                    	double t_1 = (60.0 * (x - y)) / (z - t);
                                                    	double tmp;
                                                    	if (t_1 <= -4e+205) {
                                                    		tmp = x * (-60.0 / t);
                                                    	} else if (t_1 <= 1e+131) {
                                                    		tmp = 120.0 * a;
                                                    	} else {
                                                    		tmp = (x / z) * 60.0;
                                                    	}
                                                    	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 = (60.0d0 * (x - y)) / (z - t)
                                                        if (t_1 <= (-4d+205)) then
                                                            tmp = x * ((-60.0d0) / t)
                                                        else if (t_1 <= 1d+131) then
                                                            tmp = 120.0d0 * a
                                                        else
                                                            tmp = (x / z) * 60.0d0
                                                        end if
                                                        code = tmp
                                                    end function
                                                    
                                                    public static double code(double x, double y, double z, double t, double a) {
                                                    	double t_1 = (60.0 * (x - y)) / (z - t);
                                                    	double tmp;
                                                    	if (t_1 <= -4e+205) {
                                                    		tmp = x * (-60.0 / t);
                                                    	} else if (t_1 <= 1e+131) {
                                                    		tmp = 120.0 * a;
                                                    	} else {
                                                    		tmp = (x / z) * 60.0;
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    def code(x, y, z, t, a):
                                                    	t_1 = (60.0 * (x - y)) / (z - t)
                                                    	tmp = 0
                                                    	if t_1 <= -4e+205:
                                                    		tmp = x * (-60.0 / t)
                                                    	elif t_1 <= 1e+131:
                                                    		tmp = 120.0 * a
                                                    	else:
                                                    		tmp = (x / z) * 60.0
                                                    	return tmp
                                                    
                                                    function code(x, y, z, t, a)
                                                    	t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
                                                    	tmp = 0.0
                                                    	if (t_1 <= -4e+205)
                                                    		tmp = Float64(x * Float64(-60.0 / t));
                                                    	elseif (t_1 <= 1e+131)
                                                    		tmp = Float64(120.0 * a);
                                                    	else
                                                    		tmp = Float64(Float64(x / z) * 60.0);
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    function tmp_2 = code(x, y, z, t, a)
                                                    	t_1 = (60.0 * (x - y)) / (z - t);
                                                    	tmp = 0.0;
                                                    	if (t_1 <= -4e+205)
                                                    		tmp = x * (-60.0 / t);
                                                    	elseif (t_1 <= 1e+131)
                                                    		tmp = 120.0 * a;
                                                    	else
                                                    		tmp = (x / z) * 60.0;
                                                    	end
                                                    	tmp_2 = tmp;
                                                    end
                                                    
                                                    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+205], N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+131], N[(120.0 * a), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * 60.0), $MachinePrecision]]]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
                                                    \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+205}:\\
                                                    \;\;\;\;x \cdot \frac{-60}{t}\\
                                                    
                                                    \mathbf{elif}\;t\_1 \leq 10^{+131}:\\
                                                    \;\;\;\;120 \cdot a\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\frac{x}{z} \cdot 60\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 3 regimes
                                                    2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.00000000000000007e205

                                                      1. Initial program 99.7%

                                                        \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in a around 0

                                                        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
                                                      4. Step-by-step derivation
                                                        1. Applied rewrites99.7%

                                                          \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
                                                        2. Taylor expanded in z around 0

                                                          \[\leadsto \left(x - y\right) \cdot \frac{-60}{\color{blue}{t}} \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites78.5%

                                                            \[\leadsto \left(x - y\right) \cdot \frac{-60}{\color{blue}{t}} \]
                                                          2. Taylor expanded in x around inf

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

                                                              \[\leadsto x \cdot \frac{\color{blue}{-60}}{t} \]

                                                            if -4.00000000000000007e205 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999991e130

                                                            1. Initial program 99.8%

                                                              \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                            2. Add Preprocessing
                                                            3. Taylor expanded in z around inf

                                                              \[\leadsto \color{blue}{120 \cdot a} \]
                                                            4. Step-by-step derivation
                                                              1. Applied rewrites59.9%

                                                                \[\leadsto \color{blue}{120 \cdot a} \]

                                                              if 9.9999999999999991e130 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

                                                              1. Initial program 97.0%

                                                                \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                              2. Add Preprocessing
                                                              3. Taylor expanded in z around inf

                                                                \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
                                                              4. Step-by-step derivation
                                                                1. Applied rewrites62.6%

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

                                                                  \[\leadsto 60 \cdot \color{blue}{\frac{x}{z}} \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites37.7%

                                                                    \[\leadsto \frac{x}{z} \cdot \color{blue}{60} \]
                                                                4. Recombined 3 regimes into one program.
                                                                5. Add Preprocessing

                                                                Alternative 10: 84.6% accurate, 0.7× speedup?

                                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\ \mathbf{if}\;z \leq -2.2 \cdot 10^{+67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7.4 \cdot 10^{-62}:\\ \;\;\;\;\frac{60 \cdot x}{z - t} + a \cdot 120\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, -60, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                (FPCore (x y z t a)
                                                                 :precision binary64
                                                                 (let* ((t_1 (fma (/ (- x y) z) 60.0 (* 120.0 a))))
                                                                   (if (<= z -2.2e+67)
                                                                     t_1
                                                                     (if (<= z -7.4e-62)
                                                                       (+ (/ (* 60.0 x) (- z t)) (* a 120.0))
                                                                       (if (<= z 8.5e-8) (fma (/ (- x y) t) -60.0 (* 120.0 a)) t_1)))))
                                                                double code(double x, double y, double z, double t, double a) {
                                                                	double t_1 = fma(((x - y) / z), 60.0, (120.0 * a));
                                                                	double tmp;
                                                                	if (z <= -2.2e+67) {
                                                                		tmp = t_1;
                                                                	} else if (z <= -7.4e-62) {
                                                                		tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
                                                                	} else if (z <= 8.5e-8) {
                                                                		tmp = fma(((x - y) / t), -60.0, (120.0 * a));
                                                                	} else {
                                                                		tmp = t_1;
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                function code(x, y, z, t, a)
                                                                	t_1 = fma(Float64(Float64(x - y) / z), 60.0, Float64(120.0 * a))
                                                                	tmp = 0.0
                                                                	if (z <= -2.2e+67)
                                                                		tmp = t_1;
                                                                	elseif (z <= -7.4e-62)
                                                                		tmp = Float64(Float64(Float64(60.0 * x) / Float64(z - t)) + Float64(a * 120.0));
                                                                	elseif (z <= 8.5e-8)
                                                                		tmp = fma(Float64(Float64(x - y) / t), -60.0, Float64(120.0 * a));
                                                                	else
                                                                		tmp = t_1;
                                                                	end
                                                                	return tmp
                                                                end
                                                                
                                                                code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+67], t$95$1, If[LessEqual[z, -7.4e-62], N[(N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e-8], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                                                                
                                                                \begin{array}{l}
                                                                
                                                                \\
                                                                \begin{array}{l}
                                                                t_1 := \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\
                                                                \mathbf{if}\;z \leq -2.2 \cdot 10^{+67}:\\
                                                                \;\;\;\;t\_1\\
                                                                
                                                                \mathbf{elif}\;z \leq -7.4 \cdot 10^{-62}:\\
                                                                \;\;\;\;\frac{60 \cdot x}{z - t} + a \cdot 120\\
                                                                
                                                                \mathbf{elif}\;z \leq 8.5 \cdot 10^{-8}:\\
                                                                \;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, -60, 120 \cdot a\right)\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;t\_1\\
                                                                
                                                                
                                                                \end{array}
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 3 regimes
                                                                2. if z < -2.2e67 or 8.49999999999999935e-8 < z

                                                                  1. Initial program 99.0%

                                                                    \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                                  2. Add Preprocessing
                                                                  3. Taylor expanded in z around inf

                                                                    \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
                                                                  4. Step-by-step derivation
                                                                    1. Applied rewrites89.1%

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

                                                                    if -2.2e67 < z < -7.3999999999999996e-62

                                                                    1. Initial program 99.8%

                                                                      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                                    2. Add Preprocessing
                                                                    3. Taylor expanded in x around inf

                                                                      \[\leadsto \frac{60 \cdot \color{blue}{x}}{z - t} + a \cdot 120 \]
                                                                    4. Step-by-step derivation
                                                                      1. Applied rewrites88.0%

                                                                        \[\leadsto \frac{60 \cdot \color{blue}{x}}{z - t} + a \cdot 120 \]

                                                                      if -7.3999999999999996e-62 < z < 8.49999999999999935e-8

                                                                      1. Initial program 99.8%

                                                                        \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                                      2. Add Preprocessing
                                                                      3. Taylor expanded in z around 0

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

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

                                                                      Alternative 11: 83.7% accurate, 0.7× speedup?

                                                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\ \mathbf{if}\;z \leq -8 \cdot 10^{+204}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-85}:\\ \;\;\;\;\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot x\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, -60, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                      (FPCore (x y z t a)
                                                                       :precision binary64
                                                                       (let* ((t_1 (fma (/ (- x y) z) 60.0 (* 120.0 a))))
                                                                         (if (<= z -8e+204)
                                                                           t_1
                                                                           (if (<= z -4.6e-85)
                                                                             (fma a 120.0 (* (/ 60.0 (- z t)) x))
                                                                             (if (<= z 8.5e-8) (fma (/ (- x y) t) -60.0 (* 120.0 a)) t_1)))))
                                                                      double code(double x, double y, double z, double t, double a) {
                                                                      	double t_1 = fma(((x - y) / z), 60.0, (120.0 * a));
                                                                      	double tmp;
                                                                      	if (z <= -8e+204) {
                                                                      		tmp = t_1;
                                                                      	} else if (z <= -4.6e-85) {
                                                                      		tmp = fma(a, 120.0, ((60.0 / (z - t)) * x));
                                                                      	} else if (z <= 8.5e-8) {
                                                                      		tmp = fma(((x - y) / t), -60.0, (120.0 * a));
                                                                      	} else {
                                                                      		tmp = t_1;
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      function code(x, y, z, t, a)
                                                                      	t_1 = fma(Float64(Float64(x - y) / z), 60.0, Float64(120.0 * a))
                                                                      	tmp = 0.0
                                                                      	if (z <= -8e+204)
                                                                      		tmp = t_1;
                                                                      	elseif (z <= -4.6e-85)
                                                                      		tmp = fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * x));
                                                                      	elseif (z <= 8.5e-8)
                                                                      		tmp = fma(Float64(Float64(x - y) / t), -60.0, Float64(120.0 * a));
                                                                      	else
                                                                      		tmp = t_1;
                                                                      	end
                                                                      	return tmp
                                                                      end
                                                                      
                                                                      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+204], t$95$1, If[LessEqual[z, -4.6e-85], N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e-8], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                                                                      
                                                                      \begin{array}{l}
                                                                      
                                                                      \\
                                                                      \begin{array}{l}
                                                                      t_1 := \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\
                                                                      \mathbf{if}\;z \leq -8 \cdot 10^{+204}:\\
                                                                      \;\;\;\;t\_1\\
                                                                      
                                                                      \mathbf{elif}\;z \leq -4.6 \cdot 10^{-85}:\\
                                                                      \;\;\;\;\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot x\right)\\
                                                                      
                                                                      \mathbf{elif}\;z \leq 8.5 \cdot 10^{-8}:\\
                                                                      \;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, -60, 120 \cdot a\right)\\
                                                                      
                                                                      \mathbf{else}:\\
                                                                      \;\;\;\;t\_1\\
                                                                      
                                                                      
                                                                      \end{array}
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Split input into 3 regimes
                                                                      2. if z < -7.99999999999999991e204 or 8.49999999999999935e-8 < z

                                                                        1. Initial program 98.8%

                                                                          \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                                        2. Add Preprocessing
                                                                        3. Taylor expanded in z around inf

                                                                          \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
                                                                        4. Step-by-step derivation
                                                                          1. Applied rewrites90.4%

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

                                                                          if -7.99999999999999991e204 < z < -4.6000000000000001e-85

                                                                          1. Initial program 99.7%

                                                                            \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                                          2. Add Preprocessing
                                                                          3. Step-by-step derivation
                                                                            1. lift-+.f64N/A

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

                                                                              \[\leadsto \frac{60 \cdot \left(x - y\right)}{z - t} + \color{blue}{a \cdot 120} \]
                                                                            3. fp-cancel-sign-sub-invN/A

                                                                              \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t} - \left(\mathsf{neg}\left(a\right)\right) \cdot 120} \]
                                                                            4. fp-cancel-sub-sign-invN/A

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

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

                                                                              \[\leadsto \color{blue}{a} \cdot 120 + \frac{60 \cdot \left(x - y\right)}{z - t} \]
                                                                            7. lower-fma.f6499.8

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

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

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

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

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

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

                                                                              \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{z - t} \cdot \left(x - y\right)}\right) \]
                                                                            14. lower-/.f6499.7

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

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

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

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

                                                                            if -4.6000000000000001e-85 < z < 8.49999999999999935e-8

                                                                            1. Initial program 99.8%

                                                                              \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                                            2. Add Preprocessing
                                                                            3. Taylor expanded in z around 0

                                                                              \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t} + 120 \cdot a} \]
                                                                            4. Step-by-step derivation
                                                                              1. Applied rewrites89.1%

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

                                                                            Alternative 12: 83.7% accurate, 0.7× speedup?

                                                                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\ \mathbf{if}\;z \leq -8 \cdot 10^{+204}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7.4 \cdot 10^{-62}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-8}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, -60, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                            (FPCore (x y z t a)
                                                                             :precision binary64
                                                                             (let* ((t_1 (fma (/ (- x y) z) 60.0 (* 120.0 a))))
                                                                               (if (<= z -8e+204)
                                                                                 t_1
                                                                                 (if (<= z -7.4e-62)
                                                                                   (fma (/ x (- z t)) 60.0 (* 120.0 a))
                                                                                   (if (<= z 8.5e-8) (fma (/ (- x y) t) -60.0 (* 120.0 a)) t_1)))))
                                                                            double code(double x, double y, double z, double t, double a) {
                                                                            	double t_1 = fma(((x - y) / z), 60.0, (120.0 * a));
                                                                            	double tmp;
                                                                            	if (z <= -8e+204) {
                                                                            		tmp = t_1;
                                                                            	} else if (z <= -7.4e-62) {
                                                                            		tmp = fma((x / (z - t)), 60.0, (120.0 * a));
                                                                            	} else if (z <= 8.5e-8) {
                                                                            		tmp = fma(((x - y) / t), -60.0, (120.0 * a));
                                                                            	} else {
                                                                            		tmp = t_1;
                                                                            	}
                                                                            	return tmp;
                                                                            }
                                                                            
                                                                            function code(x, y, z, t, a)
                                                                            	t_1 = fma(Float64(Float64(x - y) / z), 60.0, Float64(120.0 * a))
                                                                            	tmp = 0.0
                                                                            	if (z <= -8e+204)
                                                                            		tmp = t_1;
                                                                            	elseif (z <= -7.4e-62)
                                                                            		tmp = fma(Float64(x / Float64(z - t)), 60.0, Float64(120.0 * a));
                                                                            	elseif (z <= 8.5e-8)
                                                                            		tmp = fma(Float64(Float64(x - y) / t), -60.0, Float64(120.0 * a));
                                                                            	else
                                                                            		tmp = t_1;
                                                                            	end
                                                                            	return tmp
                                                                            end
                                                                            
                                                                            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+204], t$95$1, If[LessEqual[z, -7.4e-62], N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e-8], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                                                                            
                                                                            \begin{array}{l}
                                                                            
                                                                            \\
                                                                            \begin{array}{l}
                                                                            t_1 := \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\
                                                                            \mathbf{if}\;z \leq -8 \cdot 10^{+204}:\\
                                                                            \;\;\;\;t\_1\\
                                                                            
                                                                            \mathbf{elif}\;z \leq -7.4 \cdot 10^{-62}:\\
                                                                            \;\;\;\;\mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\
                                                                            
                                                                            \mathbf{elif}\;z \leq 8.5 \cdot 10^{-8}:\\
                                                                            \;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, -60, 120 \cdot a\right)\\
                                                                            
                                                                            \mathbf{else}:\\
                                                                            \;\;\;\;t\_1\\
                                                                            
                                                                            
                                                                            \end{array}
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Split input into 3 regimes
                                                                            2. if z < -7.99999999999999991e204 or 8.49999999999999935e-8 < z

                                                                              1. Initial program 98.8%

                                                                                \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                                              2. Add Preprocessing
                                                                              3. Taylor expanded in z around inf

                                                                                \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
                                                                              4. Step-by-step derivation
                                                                                1. Applied rewrites90.4%

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

                                                                                if -7.99999999999999991e204 < z < -7.3999999999999996e-62

                                                                                1. Initial program 99.8%

                                                                                  \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                                                2. Add Preprocessing
                                                                                3. Taylor expanded in y around 0

                                                                                  \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t} + 120 \cdot a} \]
                                                                                4. Step-by-step derivation
                                                                                  1. Applied rewrites85.9%

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

                                                                                  if -7.3999999999999996e-62 < z < 8.49999999999999935e-8

                                                                                  1. Initial program 99.8%

                                                                                    \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                                                  2. Add Preprocessing
                                                                                  3. Taylor expanded in z around 0

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

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

                                                                                  Alternative 13: 82.4% accurate, 0.8× speedup?

                                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.02 \cdot 10^{-40} \lor \neg \left(a \leq 9.1 \cdot 10^{-107}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \end{array} \end{array} \]
                                                                                  (FPCore (x y z t a)
                                                                                   :precision binary64
                                                                                   (if (or (<= a -1.02e-40) (not (<= a 9.1e-107)))
                                                                                     (fma (/ x (- z t)) 60.0 (* 120.0 a))
                                                                                     (* (- x y) (/ 60.0 (- z t)))))
                                                                                  double code(double x, double y, double z, double t, double a) {
                                                                                  	double tmp;
                                                                                  	if ((a <= -1.02e-40) || !(a <= 9.1e-107)) {
                                                                                  		tmp = fma((x / (z - t)), 60.0, (120.0 * a));
                                                                                  	} else {
                                                                                  		tmp = (x - y) * (60.0 / (z - t));
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  function code(x, y, z, t, a)
                                                                                  	tmp = 0.0
                                                                                  	if ((a <= -1.02e-40) || !(a <= 9.1e-107))
                                                                                  		tmp = fma(Float64(x / Float64(z - t)), 60.0, Float64(120.0 * a));
                                                                                  	else
                                                                                  		tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)));
                                                                                  	end
                                                                                  	return tmp
                                                                                  end
                                                                                  
                                                                                  code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.02e-40], N[Not[LessEqual[a, 9.1e-107]], $MachinePrecision]], N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  
                                                                                  \\
                                                                                  \begin{array}{l}
                                                                                  \mathbf{if}\;a \leq -1.02 \cdot 10^{-40} \lor \neg \left(a \leq 9.1 \cdot 10^{-107}\right):\\
                                                                                  \;\;\;\;\mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\
                                                                                  
                                                                                  \mathbf{else}:\\
                                                                                  \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
                                                                                  
                                                                                  
                                                                                  \end{array}
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Split input into 2 regimes
                                                                                  2. if a < -1.01999999999999995e-40 or 9.1000000000000002e-107 < a

                                                                                    1. Initial program 99.8%

                                                                                      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                                                    2. Add Preprocessing
                                                                                    3. Taylor expanded in y around 0

                                                                                      \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t} + 120 \cdot a} \]
                                                                                    4. Step-by-step derivation
                                                                                      1. Applied rewrites86.9%

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

                                                                                      if -1.01999999999999995e-40 < a < 9.1000000000000002e-107

                                                                                      1. Initial program 98.7%

                                                                                        \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                                                      2. Add Preprocessing
                                                                                      3. Taylor expanded in a around 0

                                                                                        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
                                                                                      4. Step-by-step derivation
                                                                                        1. Applied rewrites82.5%

                                                                                          \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
                                                                                      5. Recombined 2 regimes into one program.
                                                                                      6. Final simplification85.3%

                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.02 \cdot 10^{-40} \lor \neg \left(a \leq 9.1 \cdot 10^{-107}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \end{array} \]
                                                                                      7. Add Preprocessing

                                                                                      Alternative 14: 52.7% accurate, 1.1× speedup?

                                                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{-128} \lor \neg \left(a \leq 1.35 \cdot 10^{-151}\right):\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{-60}{z}\\ \end{array} \end{array} \]
                                                                                      (FPCore (x y z t a)
                                                                                       :precision binary64
                                                                                       (if (or (<= a -1.12e-128) (not (<= a 1.35e-151)))
                                                                                         (* 120.0 a)
                                                                                         (* y (/ -60.0 z))))
                                                                                      double code(double x, double y, double z, double t, double a) {
                                                                                      	double tmp;
                                                                                      	if ((a <= -1.12e-128) || !(a <= 1.35e-151)) {
                                                                                      		tmp = 120.0 * a;
                                                                                      	} else {
                                                                                      		tmp = y * (-60.0 / z);
                                                                                      	}
                                                                                      	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) :: tmp
                                                                                          if ((a <= (-1.12d-128)) .or. (.not. (a <= 1.35d-151))) then
                                                                                              tmp = 120.0d0 * a
                                                                                          else
                                                                                              tmp = y * ((-60.0d0) / z)
                                                                                          end if
                                                                                          code = tmp
                                                                                      end function
                                                                                      
                                                                                      public static double code(double x, double y, double z, double t, double a) {
                                                                                      	double tmp;
                                                                                      	if ((a <= -1.12e-128) || !(a <= 1.35e-151)) {
                                                                                      		tmp = 120.0 * a;
                                                                                      	} else {
                                                                                      		tmp = y * (-60.0 / z);
                                                                                      	}
                                                                                      	return tmp;
                                                                                      }
                                                                                      
                                                                                      def code(x, y, z, t, a):
                                                                                      	tmp = 0
                                                                                      	if (a <= -1.12e-128) or not (a <= 1.35e-151):
                                                                                      		tmp = 120.0 * a
                                                                                      	else:
                                                                                      		tmp = y * (-60.0 / z)
                                                                                      	return tmp
                                                                                      
                                                                                      function code(x, y, z, t, a)
                                                                                      	tmp = 0.0
                                                                                      	if ((a <= -1.12e-128) || !(a <= 1.35e-151))
                                                                                      		tmp = Float64(120.0 * a);
                                                                                      	else
                                                                                      		tmp = Float64(y * Float64(-60.0 / z));
                                                                                      	end
                                                                                      	return tmp
                                                                                      end
                                                                                      
                                                                                      function tmp_2 = code(x, y, z, t, a)
                                                                                      	tmp = 0.0;
                                                                                      	if ((a <= -1.12e-128) || ~((a <= 1.35e-151)))
                                                                                      		tmp = 120.0 * a;
                                                                                      	else
                                                                                      		tmp = y * (-60.0 / z);
                                                                                      	end
                                                                                      	tmp_2 = tmp;
                                                                                      end
                                                                                      
                                                                                      code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.12e-128], N[Not[LessEqual[a, 1.35e-151]], $MachinePrecision]], N[(120.0 * a), $MachinePrecision], N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision]]
                                                                                      
                                                                                      \begin{array}{l}
                                                                                      
                                                                                      \\
                                                                                      \begin{array}{l}
                                                                                      \mathbf{if}\;a \leq -1.12 \cdot 10^{-128} \lor \neg \left(a \leq 1.35 \cdot 10^{-151}\right):\\
                                                                                      \;\;\;\;120 \cdot a\\
                                                                                      
                                                                                      \mathbf{else}:\\
                                                                                      \;\;\;\;y \cdot \frac{-60}{z}\\
                                                                                      
                                                                                      
                                                                                      \end{array}
                                                                                      \end{array}
                                                                                      
                                                                                      Derivation
                                                                                      1. Split input into 2 regimes
                                                                                      2. if a < -1.12e-128 or 1.35000000000000004e-151 < a

                                                                                        1. Initial program 99.8%

                                                                                          \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                                                        2. Add Preprocessing
                                                                                        3. Taylor expanded in z around inf

                                                                                          \[\leadsto \color{blue}{120 \cdot a} \]
                                                                                        4. Step-by-step derivation
                                                                                          1. Applied rewrites59.7%

                                                                                            \[\leadsto \color{blue}{120 \cdot a} \]

                                                                                          if -1.12e-128 < a < 1.35000000000000004e-151

                                                                                          1. Initial program 98.2%

                                                                                            \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                                                          2. Add Preprocessing
                                                                                          3. Taylor expanded in z around inf

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

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

                                                                                              \[\leadsto -60 \cdot \color{blue}{\frac{y}{z}} \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites32.1%

                                                                                                \[\leadsto \frac{y}{z} \cdot \color{blue}{-60} \]
                                                                                              2. Step-by-step derivation
                                                                                                1. Applied rewrites32.1%

                                                                                                  \[\leadsto y \cdot \frac{-60}{\color{blue}{z}} \]
                                                                                              3. Recombined 2 regimes into one program.
                                                                                              4. Final simplification52.7%

                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{-128} \lor \neg \left(a \leq 1.35 \cdot 10^{-151}\right):\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{-60}{z}\\ \end{array} \]
                                                                                              5. Add Preprocessing

                                                                                              Alternative 15: 50.9% accurate, 5.2× speedup?

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

                                                                                                \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                                                                                              2. Add Preprocessing
                                                                                              3. Taylor expanded in z around inf

                                                                                                \[\leadsto \color{blue}{120 \cdot a} \]
                                                                                              4. Step-by-step derivation
                                                                                                1. Applied rewrites48.0%

                                                                                                  \[\leadsto \color{blue}{120 \cdot a} \]
                                                                                                2. Add Preprocessing

                                                                                                Developer Target 1: 99.8% accurate, 0.8× speedup?

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

                                                                                                Reproduce

                                                                                                ?
                                                                                                herbie shell --seed 2025018 
                                                                                                (FPCore (x y z t a)
                                                                                                  :name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
                                                                                                  :precision binary64
                                                                                                
                                                                                                  :alt
                                                                                                  (! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))
                                                                                                
                                                                                                  (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))