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

Percentage Accurate: 99.4% → 99.5%
Time: 5.4s
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.5% accurate, 1.1× speedup?

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

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

    \[\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)}{\color{blue}{z - t}} + a \cdot 120 \]
    3. lift-/.f64N/A

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{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. lower-*.f64N/A

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

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

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

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

Alternative 2: 60.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+161}:\\ \;\;\;\;\frac{x - y}{z} \cdot 60\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{+132}:\\ \;\;\;\;\frac{x - y}{t} \cdot -60\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-6}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{z}, -60, 120 \cdot a\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+94}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;t\_1 \leq 10^{+209}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z}\\ \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 -1e+161)
     (* (/ (- x y) z) 60.0)
     (if (<= t_1 -2e+132)
       (* (/ (- x y) t) -60.0)
       (if (<= t_1 -5e-6)
         (fma (/ y z) -60.0 (* 120.0 a))
         (if (<= t_1 1e+94)
           (* 120.0 a)
           (if (<= t_1 1e+209)
             (/ (* (- x y) 60.0) z)
             (* (/ 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 <= -1e+161) {
		tmp = ((x - y) / z) * 60.0;
	} else if (t_1 <= -2e+132) {
		tmp = ((x - y) / t) * -60.0;
	} else if (t_1 <= -5e-6) {
		tmp = fma((y / z), -60.0, (120.0 * a));
	} else if (t_1 <= 1e+94) {
		tmp = 120.0 * a;
	} else if (t_1 <= 1e+209) {
		tmp = ((x - y) * 60.0) / z;
	} 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 <= -1e+161)
		tmp = Float64(Float64(Float64(x - y) / z) * 60.0);
	elseif (t_1 <= -2e+132)
		tmp = Float64(Float64(Float64(x - y) / t) * -60.0);
	elseif (t_1 <= -5e-6)
		tmp = fma(Float64(y / z), -60.0, Float64(120.0 * a));
	elseif (t_1 <= 1e+94)
		tmp = Float64(120.0 * a);
	elseif (t_1 <= 1e+209)
		tmp = Float64(Float64(Float64(x - y) * 60.0) / z);
	else
		tmp = Float64(Float64(x / Float64(z - t)) * 60.0);
	end
	return 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, -1e+161], N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * 60.0), $MachinePrecision], If[LessEqual[t$95$1, -2e+132], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * -60.0), $MachinePrecision], If[LessEqual[t$95$1, -5e-6], N[(N[(y / z), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+94], N[(120.0 * a), $MachinePrecision], If[LessEqual[t$95$1, 1e+209], N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / z), $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 -1 \cdot 10^{+161}:\\
\;\;\;\;\frac{x - y}{z} \cdot 60\\

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{+132}:\\
\;\;\;\;\frac{x - y}{t} \cdot -60\\

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-6}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, -60, 120 \cdot a\right)\\

\mathbf{elif}\;t\_1 \leq 10^{+94}:\\
\;\;\;\;120 \cdot a\\

\mathbf{elif}\;t\_1 \leq 10^{+209}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot 60}{z}\\

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


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

    1. Initial program 99.8%

      \[\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. associate-*r/N/A

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

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

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

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

        \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
      6. lift--.f6483.4

        \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
    5. Applied rewrites83.4%

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

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

        \[\leadsto 60 \cdot \frac{\color{blue}{x} - y}{z} \]
      2. *-commutativeN/A

        \[\leadsto \frac{x - y}{z} \cdot 60 \]
      3. lower-*.f64N/A

        \[\leadsto \frac{x - y}{z} \cdot 60 \]
      4. lift-/.f64N/A

        \[\leadsto \frac{x - y}{z} \cdot 60 \]
      5. lift--.f6476.6

        \[\leadsto \frac{x - y}{z} \cdot 60 \]
    8. Applied rewrites76.6%

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

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

    1. Initial program 99.8%

      \[\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. associate-*r/N/A

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

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

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

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

        \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
      6. lift--.f6487.6

        \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
    5. Applied rewrites87.6%

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

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

        \[\leadsto -60 \cdot \frac{\color{blue}{x} - y}{t} \]
      2. *-commutativeN/A

        \[\leadsto \frac{x - y}{t} \cdot -60 \]
      3. lower-*.f64N/A

        \[\leadsto \frac{x - y}{t} \cdot -60 \]
      4. lower-/.f64N/A

        \[\leadsto \frac{x - y}{t} \cdot -60 \]
      5. lift--.f6487.4

        \[\leadsto \frac{x - y}{t} \cdot -60 \]
    8. Applied rewrites87.4%

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

    if -1.99999999999999998e132 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.00000000000000041e-6

    1. Initial program 99.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. *-commutativeN/A

        \[\leadsto \frac{x - y}{z} \cdot 60 + \color{blue}{120} \cdot a \]
      2. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right) \]
      5. lower-*.f6466.9

        \[\leadsto \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right) \]
    5. Applied rewrites66.9%

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

      \[\leadsto -60 \cdot \frac{y}{z} + \color{blue}{120 \cdot a} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{y}{z} \cdot -60 + 120 \cdot a \]
      2. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{z}, -60, 120 \cdot a\right) \]
      3. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{z}, -60, 120 \cdot a\right) \]
      4. lift-*.f6459.3

        \[\leadsto \mathsf{fma}\left(\frac{y}{z}, -60, 120 \cdot a\right) \]
    8. Applied rewrites59.3%

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

    if -5.00000000000000041e-6 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1e94

    1. Initial program 99.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}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6475.2

        \[\leadsto 120 \cdot \color{blue}{a} \]
    5. Applied rewrites75.2%

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

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

    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. associate-*r/N/A

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

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

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

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

        \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
      6. lift--.f6483.0

        \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
    5. Applied rewrites83.0%

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

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

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

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

      1. Initial program 91.1%

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

          \[\leadsto \frac{x}{z - t} \cdot \color{blue}{60} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{x}{z - t} \cdot \color{blue}{60} \]
        3. lower-/.f64N/A

          \[\leadsto \frac{x}{z - t} \cdot 60 \]
        4. lift--.f6462.2

          \[\leadsto \frac{x}{z - t} \cdot 60 \]
      5. Applied rewrites62.2%

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

    Alternative 3: 60.3% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+161}:\\ \;\;\;\;\frac{x - y}{z} \cdot 60\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+103}:\\ \;\;\;\;\frac{x - y}{t} \cdot -60\\ \mathbf{elif}\;t\_1 \leq 10^{+94}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;t\_1 \leq 10^{+209}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z}\\ \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 -1e+161)
         (* (/ (- x y) z) 60.0)
         (if (<= t_1 -1e+103)
           (* (/ (- x y) t) -60.0)
           (if (<= t_1 1e+94)
             (* 120.0 a)
             (if (<= t_1 1e+209)
               (/ (* (- x y) 60.0) z)
               (* (/ 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 <= -1e+161) {
    		tmp = ((x - y) / z) * 60.0;
    	} else if (t_1 <= -1e+103) {
    		tmp = ((x - y) / t) * -60.0;
    	} else if (t_1 <= 1e+94) {
    		tmp = 120.0 * a;
    	} else if (t_1 <= 1e+209) {
    		tmp = ((x - y) * 60.0) / z;
    	} 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 <= (-1d+161)) then
            tmp = ((x - y) / z) * 60.0d0
        else if (t_1 <= (-1d+103)) then
            tmp = ((x - y) / t) * (-60.0d0)
        else if (t_1 <= 1d+94) then
            tmp = 120.0d0 * a
        else if (t_1 <= 1d+209) then
            tmp = ((x - y) * 60.0d0) / z
        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 <= -1e+161) {
    		tmp = ((x - y) / z) * 60.0;
    	} else if (t_1 <= -1e+103) {
    		tmp = ((x - y) / t) * -60.0;
    	} else if (t_1 <= 1e+94) {
    		tmp = 120.0 * a;
    	} else if (t_1 <= 1e+209) {
    		tmp = ((x - y) * 60.0) / z;
    	} 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 <= -1e+161:
    		tmp = ((x - y) / z) * 60.0
    	elif t_1 <= -1e+103:
    		tmp = ((x - y) / t) * -60.0
    	elif t_1 <= 1e+94:
    		tmp = 120.0 * a
    	elif t_1 <= 1e+209:
    		tmp = ((x - y) * 60.0) / z
    	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 <= -1e+161)
    		tmp = Float64(Float64(Float64(x - y) / z) * 60.0);
    	elseif (t_1 <= -1e+103)
    		tmp = Float64(Float64(Float64(x - y) / t) * -60.0);
    	elseif (t_1 <= 1e+94)
    		tmp = Float64(120.0 * a);
    	elseif (t_1 <= 1e+209)
    		tmp = Float64(Float64(Float64(x - y) * 60.0) / z);
    	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 <= -1e+161)
    		tmp = ((x - y) / z) * 60.0;
    	elseif (t_1 <= -1e+103)
    		tmp = ((x - y) / t) * -60.0;
    	elseif (t_1 <= 1e+94)
    		tmp = 120.0 * a;
    	elseif (t_1 <= 1e+209)
    		tmp = ((x - y) * 60.0) / z;
    	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, -1e+161], N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * 60.0), $MachinePrecision], If[LessEqual[t$95$1, -1e+103], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * -60.0), $MachinePrecision], If[LessEqual[t$95$1, 1e+94], N[(120.0 * a), $MachinePrecision], If[LessEqual[t$95$1, 1e+209], N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / z), $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 -1 \cdot 10^{+161}:\\
    \;\;\;\;\frac{x - y}{z} \cdot 60\\
    
    \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+103}:\\
    \;\;\;\;\frac{x - y}{t} \cdot -60\\
    
    \mathbf{elif}\;t\_1 \leq 10^{+94}:\\
    \;\;\;\;120 \cdot a\\
    
    \mathbf{elif}\;t\_1 \leq 10^{+209}:\\
    \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{x}{z - t} \cdot 60\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1e161

      1. Initial program 99.8%

        \[\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. associate-*r/N/A

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

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

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

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

          \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
        6. lift--.f6483.4

          \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
      5. Applied rewrites83.4%

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

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

          \[\leadsto 60 \cdot \frac{\color{blue}{x} - y}{z} \]
        2. *-commutativeN/A

          \[\leadsto \frac{x - y}{z} \cdot 60 \]
        3. lower-*.f64N/A

          \[\leadsto \frac{x - y}{z} \cdot 60 \]
        4. lift-/.f64N/A

          \[\leadsto \frac{x - y}{z} \cdot 60 \]
        5. lift--.f6476.6

          \[\leadsto \frac{x - y}{z} \cdot 60 \]
      8. Applied rewrites76.6%

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

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

      1. Initial program 99.8%

        \[\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. associate-*r/N/A

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

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

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

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

          \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
        6. lift--.f6491.3

          \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
      5. Applied rewrites91.3%

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

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

          \[\leadsto -60 \cdot \frac{\color{blue}{x} - y}{t} \]
        2. *-commutativeN/A

          \[\leadsto \frac{x - y}{t} \cdot -60 \]
        3. lower-*.f64N/A

          \[\leadsto \frac{x - y}{t} \cdot -60 \]
        4. lower-/.f64N/A

          \[\leadsto \frac{x - y}{t} \cdot -60 \]
        5. lift--.f6472.3

          \[\leadsto \frac{x - y}{t} \cdot -60 \]
      8. Applied rewrites72.3%

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

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

      1. Initial program 99.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}{120 \cdot a} \]
      4. Step-by-step derivation
        1. lower-*.f6468.8

          \[\leadsto 120 \cdot \color{blue}{a} \]
      5. Applied rewrites68.8%

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

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

      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. associate-*r/N/A

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

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

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

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

          \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
        6. lift--.f6483.0

          \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
      5. Applied rewrites83.0%

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

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

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

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

        1. Initial program 91.1%

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

            \[\leadsto \frac{x}{z - t} \cdot \color{blue}{60} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{z - t} \cdot \color{blue}{60} \]
          3. lower-/.f64N/A

            \[\leadsto \frac{x}{z - t} \cdot 60 \]
          4. lift--.f6462.2

            \[\leadsto \frac{x}{z - t} \cdot 60 \]
        5. Applied rewrites62.2%

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

      Alternative 4: 60.3% accurate, 0.2× speedup?

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

        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. associate-*r/N/A

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

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

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

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

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
          6. lift--.f6483.2

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
        5. Applied rewrites83.2%

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

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

            \[\leadsto 60 \cdot \frac{\color{blue}{x} - y}{z} \]
          2. *-commutativeN/A

            \[\leadsto \frac{x - y}{z} \cdot 60 \]
          3. lower-*.f64N/A

            \[\leadsto \frac{x - y}{z} \cdot 60 \]
          4. lift-/.f64N/A

            \[\leadsto \frac{x - y}{z} \cdot 60 \]
          5. lift--.f6471.9

            \[\leadsto \frac{x - y}{z} \cdot 60 \]
        8. Applied rewrites71.9%

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

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

        1. Initial program 99.8%

          \[\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. associate-*r/N/A

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

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

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

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

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
          6. lift--.f6491.3

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
        5. Applied rewrites91.3%

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

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

            \[\leadsto -60 \cdot \frac{\color{blue}{x} - y}{t} \]
          2. *-commutativeN/A

            \[\leadsto \frac{x - y}{t} \cdot -60 \]
          3. lower-*.f64N/A

            \[\leadsto \frac{x - y}{t} \cdot -60 \]
          4. lower-/.f64N/A

            \[\leadsto \frac{x - y}{t} \cdot -60 \]
          5. lift--.f6472.3

            \[\leadsto \frac{x - y}{t} \cdot -60 \]
        8. Applied rewrites72.3%

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

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

        1. Initial program 99.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}{120 \cdot a} \]
        4. Step-by-step derivation
          1. lower-*.f6468.8

            \[\leadsto 120 \cdot \color{blue}{a} \]
        5. Applied rewrites68.8%

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

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

        1. Initial program 91.1%

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

            \[\leadsto \frac{x}{z - t} \cdot \color{blue}{60} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{z - t} \cdot \color{blue}{60} \]
          3. lower-/.f64N/A

            \[\leadsto \frac{x}{z - t} \cdot 60 \]
          4. lift--.f6462.2

            \[\leadsto \frac{x}{z - t} \cdot 60 \]
        5. Applied rewrites62.2%

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

      Alternative 5: 61.0% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x - y}{z} \cdot 60\\ t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+161}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{+103}:\\ \;\;\;\;\frac{x - y}{t} \cdot -60\\ \mathbf{elif}\;t\_2 \leq 10^{+94}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (* (/ (- x y) z) 60.0)) (t_2 (/ (* 60.0 (- x y)) (- z t))))
         (if (<= t_2 -1e+161)
           t_1
           (if (<= t_2 -1e+103)
             (* (/ (- x y) t) -60.0)
             (if (<= t_2 1e+94) (* 120.0 a) t_1)))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = ((x - y) / z) * 60.0;
      	double t_2 = (60.0 * (x - y)) / (z - t);
      	double tmp;
      	if (t_2 <= -1e+161) {
      		tmp = t_1;
      	} else if (t_2 <= -1e+103) {
      		tmp = ((x - y) / t) * -60.0;
      	} else if (t_2 <= 1e+94) {
      		tmp = 120.0 * a;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z, t, a)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8) :: t_1
          real(8) :: t_2
          real(8) :: tmp
          t_1 = ((x - y) / z) * 60.0d0
          t_2 = (60.0d0 * (x - y)) / (z - t)
          if (t_2 <= (-1d+161)) then
              tmp = t_1
          else if (t_2 <= (-1d+103)) then
              tmp = ((x - y) / t) * (-60.0d0)
          else if (t_2 <= 1d+94) then
              tmp = 120.0d0 * a
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double t_1 = ((x - y) / z) * 60.0;
      	double t_2 = (60.0 * (x - y)) / (z - t);
      	double tmp;
      	if (t_2 <= -1e+161) {
      		tmp = t_1;
      	} else if (t_2 <= -1e+103) {
      		tmp = ((x - y) / t) * -60.0;
      	} else if (t_2 <= 1e+94) {
      		tmp = 120.0 * a;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	t_1 = ((x - y) / z) * 60.0
      	t_2 = (60.0 * (x - y)) / (z - t)
      	tmp = 0
      	if t_2 <= -1e+161:
      		tmp = t_1
      	elif t_2 <= -1e+103:
      		tmp = ((x - y) / t) * -60.0
      	elif t_2 <= 1e+94:
      		tmp = 120.0 * a
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a)
      	t_1 = Float64(Float64(Float64(x - y) / z) * 60.0)
      	t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
      	tmp = 0.0
      	if (t_2 <= -1e+161)
      		tmp = t_1;
      	elseif (t_2 <= -1e+103)
      		tmp = Float64(Float64(Float64(x - y) / t) * -60.0);
      	elseif (t_2 <= 1e+94)
      		tmp = Float64(120.0 * a);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	t_1 = ((x - y) / z) * 60.0;
      	t_2 = (60.0 * (x - y)) / (z - t);
      	tmp = 0.0;
      	if (t_2 <= -1e+161)
      		tmp = t_1;
      	elseif (t_2 <= -1e+103)
      		tmp = ((x - y) / t) * -60.0;
      	elseif (t_2 <= 1e+94)
      		tmp = 120.0 * a;
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * 60.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+161], t$95$1, If[LessEqual[t$95$2, -1e+103], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * -60.0), $MachinePrecision], If[LessEqual[t$95$2, 1e+94], N[(120.0 * a), $MachinePrecision], t$95$1]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{x - y}{z} \cdot 60\\
      t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
      \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+161}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{+103}:\\
      \;\;\;\;\frac{x - y}{t} \cdot -60\\
      
      \mathbf{elif}\;t\_2 \leq 10^{+94}:\\
      \;\;\;\;120 \cdot a\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \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)) < -1e161 or 1e94 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

        1. Initial program 96.8%

          \[\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. associate-*r/N/A

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

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

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

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

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
          6. lift--.f6480.0

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
        5. Applied rewrites80.0%

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

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

            \[\leadsto 60 \cdot \frac{\color{blue}{x} - y}{z} \]
          2. *-commutativeN/A

            \[\leadsto \frac{x - y}{z} \cdot 60 \]
          3. lower-*.f64N/A

            \[\leadsto \frac{x - y}{z} \cdot 60 \]
          4. lift-/.f64N/A

            \[\leadsto \frac{x - y}{z} \cdot 60 \]
          5. lift--.f6461.8

            \[\leadsto \frac{x - y}{z} \cdot 60 \]
        8. Applied rewrites61.8%

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

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

        1. Initial program 99.8%

          \[\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. associate-*r/N/A

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

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

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

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

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
          6. lift--.f6491.3

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
        5. Applied rewrites91.3%

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

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

            \[\leadsto -60 \cdot \frac{\color{blue}{x} - y}{t} \]
          2. *-commutativeN/A

            \[\leadsto \frac{x - y}{t} \cdot -60 \]
          3. lower-*.f64N/A

            \[\leadsto \frac{x - y}{t} \cdot -60 \]
          4. lower-/.f64N/A

            \[\leadsto \frac{x - y}{t} \cdot -60 \]
          5. lift--.f6472.3

            \[\leadsto \frac{x - y}{t} \cdot -60 \]
        8. Applied rewrites72.3%

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

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

        1. Initial program 99.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}{120 \cdot a} \]
        4. Step-by-step derivation
          1. lower-*.f6468.8

            \[\leadsto 120 \cdot \color{blue}{a} \]
        5. Applied rewrites68.8%

          \[\leadsto \color{blue}{120 \cdot a} \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 6: 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 -2 \cdot 10^{-69} \lor \neg \left(t\_1 \leq 2\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 -2e-69) (not (<= t_1 2.0)))
           (* (- 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 <= -2e-69) || !(t_1 <= 2.0)) {
      		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 <= (-2d-69)) .or. (.not. (t_1 <= 2.0d0))) 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 <= -2e-69) || !(t_1 <= 2.0)) {
      		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 <= -2e-69) or not (t_1 <= 2.0):
      		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 <= -2e-69) || !(t_1 <= 2.0))
      		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 <= -2e-69) || ~((t_1 <= 2.0)))
      		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, -2e-69], N[Not[LessEqual[t$95$1, 2.0]], $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 -2 \cdot 10^{-69} \lor \neg \left(t\_1 \leq 2\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)) < -1.9999999999999999e-69 or 2 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

        1. Initial program 98.4%

          \[\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. associate-*r/N/A

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

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

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

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

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
          6. lift--.f6472.0

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
        5. Applied rewrites72.0%

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

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

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

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{\color{blue}{z} - t} \]
          5. associate-/l*N/A

            \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{60}{z - t}} \]
          6. metadata-evalN/A

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

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

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

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

            \[\leadsto \left(x - y\right) \cdot \frac{60 \cdot 1}{\color{blue}{z - t}} \]
          11. metadata-evalN/A

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

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

            \[\leadsto \left(x - y\right) \cdot \frac{60}{z - \color{blue}{t}} \]
        7. Applied rewrites72.3%

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

        if -1.9999999999999999e-69 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2

        1. Initial program 99.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}{120 \cdot a} \]
        4. Step-by-step derivation
          1. lower-*.f6484.2

            \[\leadsto 120 \cdot \color{blue}{a} \]
        5. Applied rewrites84.2%

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

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

      Alternative 7: 73.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 -2 \cdot 10^{-69}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z - t}\\ \mathbf{elif}\;t\_1 \leq 2:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
         (if (<= t_1 -2e-69)
           (/ (* (- x y) 60.0) (- z t))
           (if (<= t_1 2.0) (* 120.0 a) (* (- x y) (/ 60.0 (- z t)))))))
      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 <= -2e-69) {
      		tmp = ((x - y) * 60.0) / (z - t);
      	} else if (t_1 <= 2.0) {
      		tmp = 120.0 * a;
      	} else {
      		tmp = (x - y) * (60.0 / (z - t));
      	}
      	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 <= (-2d-69)) then
              tmp = ((x - y) * 60.0d0) / (z - t)
          else if (t_1 <= 2.0d0) then
              tmp = 120.0d0 * a
          else
              tmp = (x - y) * (60.0d0 / (z - t))
          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 <= -2e-69) {
      		tmp = ((x - y) * 60.0) / (z - t);
      	} else if (t_1 <= 2.0) {
      		tmp = 120.0 * a;
      	} else {
      		tmp = (x - y) * (60.0 / (z - t));
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	t_1 = (60.0 * (x - y)) / (z - t)
      	tmp = 0
      	if t_1 <= -2e-69:
      		tmp = ((x - y) * 60.0) / (z - t)
      	elif t_1 <= 2.0:
      		tmp = 120.0 * a
      	else:
      		tmp = (x - y) * (60.0 / (z - t))
      	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 <= -2e-69)
      		tmp = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t));
      	elseif (t_1 <= 2.0)
      		tmp = Float64(120.0 * a);
      	else
      		tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)));
      	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 <= -2e-69)
      		tmp = ((x - y) * 60.0) / (z - t);
      	elseif (t_1 <= 2.0)
      		tmp = 120.0 * a;
      	else
      		tmp = (x - y) * (60.0 / (z - t));
      	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, -2e-69], N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(120.0 * a), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
      \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-69}:\\
      \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z - t}\\
      
      \mathbf{elif}\;t\_1 \leq 2:\\
      \;\;\;\;120 \cdot a\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
      
      
      \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)) < -1.9999999999999999e-69

        1. Initial program 99.8%

          \[\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. associate-*r/N/A

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

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

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

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

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
          6. lift--.f6472.1

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
        5. Applied rewrites72.1%

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

        if -1.9999999999999999e-69 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2

        1. Initial program 99.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}{120 \cdot a} \]
        4. Step-by-step derivation
          1. lower-*.f6484.2

            \[\leadsto 120 \cdot \color{blue}{a} \]
        5. Applied rewrites84.2%

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

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

        1. Initial program 96.6%

          \[\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. associate-*r/N/A

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

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

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

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

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
          6. lift--.f6472.0

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
        5. Applied rewrites72.0%

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

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

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

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{\color{blue}{z} - t} \]
          5. associate-/l*N/A

            \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{60}{z - t}} \]
          6. metadata-evalN/A

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

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

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

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

            \[\leadsto \left(x - y\right) \cdot \frac{60 \cdot 1}{\color{blue}{z - t}} \]
          11. metadata-evalN/A

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

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

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

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

      Alternative 8: 56.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 -1 \cdot 10^{+103}:\\ \;\;\;\;\frac{x - y}{t} \cdot -60\\ \mathbf{elif}\;t\_1 \leq 10^{+94}:\\ \;\;\;\;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 -1e+103)
           (* (/ (- x y) t) -60.0)
           (if (<= t_1 1e+94) (* 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 <= -1e+103) {
      		tmp = ((x - y) / t) * -60.0;
      	} else if (t_1 <= 1e+94) {
      		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 <= (-1d+103)) then
              tmp = ((x - y) / t) * (-60.0d0)
          else if (t_1 <= 1d+94) 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 <= -1e+103) {
      		tmp = ((x - y) / t) * -60.0;
      	} else if (t_1 <= 1e+94) {
      		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 <= -1e+103:
      		tmp = ((x - y) / t) * -60.0
      	elif t_1 <= 1e+94:
      		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 <= -1e+103)
      		tmp = Float64(Float64(Float64(x - y) / t) * -60.0);
      	elseif (t_1 <= 1e+94)
      		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 <= -1e+103)
      		tmp = ((x - y) / t) * -60.0;
      	elseif (t_1 <= 1e+94)
      		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, -1e+103], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * -60.0), $MachinePrecision], If[LessEqual[t$95$1, 1e+94], 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 -1 \cdot 10^{+103}:\\
      \;\;\;\;\frac{x - y}{t} \cdot -60\\
      
      \mathbf{elif}\;t\_1 \leq 10^{+94}:\\
      \;\;\;\;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)) < -1e103

        1. Initial program 99.8%

          \[\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. associate-*r/N/A

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

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

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

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

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
          6. lift--.f6485.7

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
        5. Applied rewrites85.7%

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

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

            \[\leadsto -60 \cdot \frac{\color{blue}{x} - y}{t} \]
          2. *-commutativeN/A

            \[\leadsto \frac{x - y}{t} \cdot -60 \]
          3. lower-*.f64N/A

            \[\leadsto \frac{x - y}{t} \cdot -60 \]
          4. lower-/.f64N/A

            \[\leadsto \frac{x - y}{t} \cdot -60 \]
          5. lift--.f6444.2

            \[\leadsto \frac{x - y}{t} \cdot -60 \]
        8. Applied rewrites44.2%

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

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

        1. Initial program 99.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}{120 \cdot a} \]
        4. Step-by-step derivation
          1. lower-*.f6468.8

            \[\leadsto 120 \cdot \color{blue}{a} \]
        5. Applied rewrites68.8%

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

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

        1. Initial program 95.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. *-commutativeN/A

            \[\leadsto \frac{x - y}{z} \cdot 60 + \color{blue}{120} \cdot a \]
          2. lower-fma.f64N/A

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

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

            \[\leadsto \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right) \]
          5. lower-*.f6466.8

            \[\leadsto \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right) \]
        5. Applied rewrites66.8%

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

          \[\leadsto 60 \cdot \color{blue}{\frac{x}{z}} \]
        7. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{x}{z} \cdot 60 \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{z} \cdot 60 \]
          3. lower-/.f6442.9

            \[\leadsto \frac{x}{z} \cdot 60 \]
        8. Applied rewrites42.9%

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

      Alternative 9: 53.6% 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 -2 \cdot 10^{+126}:\\ \;\;\;\;\frac{y}{z} \cdot -60\\ \mathbf{elif}\;t\_1 \leq 10^{+94}:\\ \;\;\;\;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 -2e+126)
           (* (/ y z) -60.0)
           (if (<= t_1 1e+94) (* 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 <= -2e+126) {
      		tmp = (y / z) * -60.0;
      	} else if (t_1 <= 1e+94) {
      		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 <= (-2d+126)) then
              tmp = (y / z) * (-60.0d0)
          else if (t_1 <= 1d+94) 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 <= -2e+126) {
      		tmp = (y / z) * -60.0;
      	} else if (t_1 <= 1e+94) {
      		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 <= -2e+126:
      		tmp = (y / z) * -60.0
      	elif t_1 <= 1e+94:
      		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 <= -2e+126)
      		tmp = Float64(Float64(y / z) * -60.0);
      	elseif (t_1 <= 1e+94)
      		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 <= -2e+126)
      		tmp = (y / z) * -60.0;
      	elseif (t_1 <= 1e+94)
      		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, -2e+126], N[(N[(y / z), $MachinePrecision] * -60.0), $MachinePrecision], If[LessEqual[t$95$1, 1e+94], 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 -2 \cdot 10^{+126}:\\
      \;\;\;\;\frac{y}{z} \cdot -60\\
      
      \mathbf{elif}\;t\_1 \leq 10^{+94}:\\
      \;\;\;\;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)) < -1.99999999999999985e126

        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}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{x - y}{z} \cdot 60 + \color{blue}{120} \cdot a \]
          2. lower-fma.f64N/A

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

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

            \[\leadsto \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right) \]
          5. lower-*.f6469.9

            \[\leadsto \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right) \]
        5. Applied rewrites69.9%

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

          \[\leadsto -60 \cdot \color{blue}{\frac{y}{z}} \]
        7. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{y}{z} \cdot -60 \]
          2. lower-*.f64N/A

            \[\leadsto \frac{y}{z} \cdot -60 \]
          3. lower-/.f6439.7

            \[\leadsto \frac{y}{z} \cdot -60 \]
        8. Applied rewrites39.7%

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

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

        1. Initial program 99.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}{120 \cdot a} \]
        4. Step-by-step derivation
          1. lower-*.f6468.5

            \[\leadsto 120 \cdot \color{blue}{a} \]
        5. Applied rewrites68.5%

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

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

        1. Initial program 95.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. *-commutativeN/A

            \[\leadsto \frac{x - y}{z} \cdot 60 + \color{blue}{120} \cdot a \]
          2. lower-fma.f64N/A

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

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

            \[\leadsto \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right) \]
          5. lower-*.f6466.8

            \[\leadsto \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right) \]
        5. Applied rewrites66.8%

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

          \[\leadsto 60 \cdot \color{blue}{\frac{x}{z}} \]
        7. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{x}{z} \cdot 60 \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{z} \cdot 60 \]
          3. lower-/.f6442.9

            \[\leadsto \frac{x}{z} \cdot 60 \]
        8. Applied rewrites42.9%

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

      Alternative 10: 87.8% accurate, 0.8× speedup?

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

        1. Initial program 97.6%

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

            \[\leadsto \frac{x}{z - t} \cdot 60 + \color{blue}{120} \cdot a \]
          2. lower-fma.f64N/A

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

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

            \[\leadsto \mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right) \]
          5. lower-*.f6491.2

            \[\leadsto \mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right) \]
        5. Applied rewrites91.2%

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

        if -4.7999999999999998e173 < x < 6.4e6

        1. Initial program 99.9%

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

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

            \[\leadsto \frac{y}{z - t} \cdot \color{blue}{-60} + a \cdot 120 \]
          2. lower-*.f64N/A

            \[\leadsto \frac{y}{z - t} \cdot \color{blue}{-60} + a \cdot 120 \]
          3. lower-/.f64N/A

            \[\leadsto \frac{y}{z - t} \cdot -60 + a \cdot 120 \]
          4. lift--.f6493.2

            \[\leadsto \frac{y}{z - t} \cdot -60 + a \cdot 120 \]
        5. Applied rewrites93.2%

          \[\leadsto \color{blue}{\frac{y}{z - t} \cdot -60} + a \cdot 120 \]
      3. Recombined 2 regimes into one program.
      4. Final simplification92.6%

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

      Alternative 11: 87.8% accurate, 0.8× speedup?

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

        1. Initial program 97.6%

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

            \[\leadsto \frac{x}{z - t} \cdot 60 + \color{blue}{120} \cdot a \]
          2. lower-fma.f64N/A

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

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

            \[\leadsto \mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right) \]
          5. lower-*.f6491.2

            \[\leadsto \mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right) \]
        5. Applied rewrites91.2%

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

        if -4.7999999999999998e173 < x < 6.4e6

        1. Initial program 99.9%

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

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

            \[\leadsto \frac{y}{z - t} \cdot -60 + \color{blue}{120} \cdot a \]
          2. lower-fma.f64N/A

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

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

            \[\leadsto \mathsf{fma}\left(\frac{y}{z - t}, -60, 120 \cdot a\right) \]
          5. lower-*.f6493.2

            \[\leadsto \mathsf{fma}\left(\frac{y}{z - t}, -60, 120 \cdot a\right) \]
        5. Applied rewrites93.2%

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

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

      Alternative 12: 81.9% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{+174}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+161}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z - t}\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (<= y -1.75e+174)
         (* (- x y) (/ 60.0 (- z t)))
         (if (<= y 1.3e+161)
           (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 (y <= -1.75e+174) {
      		tmp = (x - y) * (60.0 / (z - t));
      	} else if (y <= 1.3e+161) {
      		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 (y <= -1.75e+174)
      		tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)));
      	elseif (y <= 1.3e+161)
      		tmp = fma(Float64(x / Float64(z - t)), 60.0, Float64(120.0 * a));
      	else
      		tmp = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.75e+174], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+161], N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq -1.75 \cdot 10^{+174}:\\
      \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
      
      \mathbf{elif}\;y \leq 1.3 \cdot 10^{+161}:\\
      \;\;\;\;\mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z - t}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -1.7500000000000001e174

        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. associate-*r/N/A

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

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

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

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

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
          6. lift--.f6474.3

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
        5. Applied rewrites74.3%

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

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

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

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{\color{blue}{z} - t} \]
          5. associate-/l*N/A

            \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{60}{z - t}} \]
          6. metadata-evalN/A

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

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

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

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

            \[\leadsto \left(x - y\right) \cdot \frac{60 \cdot 1}{\color{blue}{z - t}} \]
          11. metadata-evalN/A

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

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

            \[\leadsto \left(x - y\right) \cdot \frac{60}{z - \color{blue}{t}} \]
        7. Applied rewrites74.5%

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

        if -1.7500000000000001e174 < y < 1.2999999999999999e161

        1. Initial program 98.9%

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

            \[\leadsto \frac{x}{z - t} \cdot 60 + \color{blue}{120} \cdot a \]
          2. lower-fma.f64N/A

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

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

            \[\leadsto \mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right) \]
          5. lower-*.f6488.5

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

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

        if 1.2999999999999999e161 < y

        1. Initial program 99.8%

          \[\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. associate-*r/N/A

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

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

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

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

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - t} \]
          6. lift--.f6478.6

            \[\leadsto \frac{\left(x - y\right) \cdot 60}{z - \color{blue}{t}} \]
        5. Applied rewrites78.6%

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

      Alternative 13: 51.6% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 7.5 \cdot 10^{+215}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot 60\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (<= x 7.5e+215) (* 120.0 a) (* (/ x z) 60.0)))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (x <= 7.5e+215) {
      		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) :: tmp
          if (x <= 7.5d+215) 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 tmp;
      	if (x <= 7.5e+215) {
      		tmp = 120.0 * a;
      	} else {
      		tmp = (x / z) * 60.0;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	tmp = 0
      	if x <= 7.5e+215:
      		tmp = 120.0 * a
      	else:
      		tmp = (x / z) * 60.0
      	return tmp
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (x <= 7.5e+215)
      		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)
      	tmp = 0.0;
      	if (x <= 7.5e+215)
      		tmp = 120.0 * a;
      	else
      		tmp = (x / z) * 60.0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[x, 7.5e+215], N[(120.0 * a), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * 60.0), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq 7.5 \cdot 10^{+215}:\\
      \;\;\;\;120 \cdot a\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x}{z} \cdot 60\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < 7.4999999999999994e215

        1. Initial program 99.5%

          \[\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. lower-*.f6457.5

            \[\leadsto 120 \cdot \color{blue}{a} \]
        5. Applied rewrites57.5%

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

        if 7.4999999999999994e215 < x

        1. Initial program 95.6%

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

            \[\leadsto \frac{x - y}{z} \cdot 60 + \color{blue}{120} \cdot a \]
          2. lower-fma.f64N/A

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

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

            \[\leadsto \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right) \]
          5. lower-*.f6480.7

            \[\leadsto \mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right) \]
        5. Applied rewrites80.7%

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

          \[\leadsto 60 \cdot \color{blue}{\frac{x}{z}} \]
        7. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{x}{z} \cdot 60 \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{z} \cdot 60 \]
          3. lower-/.f6472.7

            \[\leadsto \frac{x}{z} \cdot 60 \]
        8. Applied rewrites72.7%

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

      Alternative 14: 51.9% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 4.4 \cdot 10^{+176}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t} \cdot -60\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (<= x 4.4e+176) (* 120.0 a) (* (/ x t) -60.0)))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (x <= 4.4e+176) {
      		tmp = 120.0 * a;
      	} else {
      		tmp = (x / 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) :: tmp
          if (x <= 4.4d+176) then
              tmp = 120.0d0 * a
          else
              tmp = (x / t) * (-60.0d0)
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (x <= 4.4e+176) {
      		tmp = 120.0 * a;
      	} else {
      		tmp = (x / t) * -60.0;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	tmp = 0
      	if x <= 4.4e+176:
      		tmp = 120.0 * a
      	else:
      		tmp = (x / t) * -60.0
      	return tmp
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (x <= 4.4e+176)
      		tmp = Float64(120.0 * a);
      	else
      		tmp = Float64(Float64(x / t) * -60.0);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	tmp = 0.0;
      	if (x <= 4.4e+176)
      		tmp = 120.0 * a;
      	else
      		tmp = (x / t) * -60.0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[x, 4.4e+176], N[(120.0 * a), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * -60.0), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq 4.4 \cdot 10^{+176}:\\
      \;\;\;\;120 \cdot a\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x}{t} \cdot -60\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < 4.40000000000000015e176

        1. Initial program 99.5%

          \[\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. lower-*.f6458.5

            \[\leadsto 120 \cdot \color{blue}{a} \]
        5. Applied rewrites58.5%

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

        if 4.40000000000000015e176 < x

        1. Initial program 96.4%

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

            \[\leadsto \frac{x}{z - t} \cdot \color{blue}{60} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{z - t} \cdot \color{blue}{60} \]
          3. lower-/.f64N/A

            \[\leadsto \frac{x}{z - t} \cdot 60 \]
          4. lift--.f6483.6

            \[\leadsto \frac{x}{z - t} \cdot 60 \]
        5. Applied rewrites83.6%

          \[\leadsto \color{blue}{\frac{x}{z - t} \cdot 60} \]
        6. Taylor expanded in z around 0

          \[\leadsto -60 \cdot \color{blue}{\frac{x}{t}} \]
        7. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{x}{t} \cdot -60 \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{t} \cdot -60 \]
          3. lower-/.f6442.2

            \[\leadsto \frac{x}{t} \cdot -60 \]
        8. Applied rewrites42.2%

          \[\leadsto \frac{x}{t} \cdot \color{blue}{-60} \]
      3. Recombined 2 regimes into one program.
      4. 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.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}{120 \cdot a} \]
      4. Step-by-step derivation
        1. lower-*.f6453.6

          \[\leadsto 120 \cdot \color{blue}{a} \]
      5. Applied rewrites53.6%

        \[\leadsto \color{blue}{120 \cdot a} \]
      6. 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 2025035 
      (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)))