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

Percentage Accurate: 99.4% → 99.8%
Time: 7.6s
Alternatives: 21
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 21 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 59.4% 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^{+95}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+48}:\\ \;\;\;\;\frac{-60 \cdot y}{z - t}\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-198}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+49}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{t}, -60, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
   (if (<= t_1 -1e+95)
     (* x (/ 60.0 (- z t)))
     (if (<= t_1 -5e+48)
       (/ (* -60.0 y) (- z t))
       (if (<= t_1 4e-198)
         (* 120.0 a)
         (if (<= t_1 2e+49)
           (fma (/ x t) -60.0 (* 120.0 a))
           (* (- x y) (/ 60.0 z))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_1 <= -1e+95) {
		tmp = x * (60.0 / (z - t));
	} else if (t_1 <= -5e+48) {
		tmp = (-60.0 * y) / (z - t);
	} else if (t_1 <= 4e-198) {
		tmp = 120.0 * a;
	} else if (t_1 <= 2e+49) {
		tmp = fma((x / t), -60.0, (120.0 * a));
	} else {
		tmp = (x - y) * (60.0 / z);
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
	tmp = 0.0
	if (t_1 <= -1e+95)
		tmp = Float64(x * Float64(60.0 / Float64(z - t)));
	elseif (t_1 <= -5e+48)
		tmp = Float64(Float64(-60.0 * y) / Float64(z - t));
	elseif (t_1 <= 4e-198)
		tmp = Float64(120.0 * a);
	elseif (t_1 <= 2e+49)
		tmp = fma(Float64(x / t), -60.0, Float64(120.0 * a));
	else
		tmp = Float64(Float64(x - y) * Float64(60.0 / z));
	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+95], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e+48], N[(N[(-60.0 * y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e-198], N[(120.0 * a), $MachinePrecision], If[LessEqual[t$95$1, 2e+49], N[(N[(x / t), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+48}:\\
\;\;\;\;\frac{-60 \cdot y}{z - t}\\

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-198}:\\
\;\;\;\;120 \cdot a\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+49}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, -60, 120 \cdot a\right)\\

\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\


\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)) < -1.00000000000000002e95

    1. Initial program 96.5%

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

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

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

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

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

        if -1.00000000000000002e95 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.99999999999999973e48

        1. Initial program 99.8%

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

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

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

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

            if -4.99999999999999973e48 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 3.9999999999999996e-198

            1. Initial program 99.8%

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

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

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

              if 3.9999999999999996e-198 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.99999999999999989e49

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    1. Initial program 99.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. Applied rewrites83.5%

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

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

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

                      Alternative 3: 58.8% accurate, 0.2× speedup?

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

                        1. Initial program 97.9%

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

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

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

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

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

                            if -1.00000000000000002e95 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.99999999999999973e48 or 2e153 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

                            1. Initial program 99.7%

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

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

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

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

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

                                1. Initial program 99.8%

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

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

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

                                Alternative 4: 74.0% accurate, 0.3× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x - y\right) \cdot \frac{60}{z - t}\\ t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+48}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-198}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+48}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{t}, -60, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                (FPCore (x y z t a)
                                 :precision binary64
                                 (let* ((t_1 (* (- x y) (/ 60.0 (- z t)))) (t_2 (/ (* 60.0 (- x y)) (- z t))))
                                   (if (<= t_2 -5e+48)
                                     t_1
                                     (if (<= t_2 4e-198)
                                       (* 120.0 a)
                                       (if (<= t_2 4e+48) (fma (/ x t) -60.0 (* 120.0 a)) t_1)))))
                                double code(double x, double y, double z, double t, double a) {
                                	double t_1 = (x - y) * (60.0 / (z - t));
                                	double t_2 = (60.0 * (x - y)) / (z - t);
                                	double tmp;
                                	if (t_2 <= -5e+48) {
                                		tmp = t_1;
                                	} else if (t_2 <= 4e-198) {
                                		tmp = 120.0 * a;
                                	} else if (t_2 <= 4e+48) {
                                		tmp = fma((x / t), -60.0, (120.0 * a));
                                	} else {
                                		tmp = t_1;
                                	}
                                	return tmp;
                                }
                                
                                function code(x, y, z, t, a)
                                	t_1 = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))
                                	t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
                                	tmp = 0.0
                                	if (t_2 <= -5e+48)
                                		tmp = t_1;
                                	elseif (t_2 <= 4e-198)
                                		tmp = Float64(120.0 * a);
                                	elseif (t_2 <= 4e+48)
                                		tmp = fma(Float64(x / t), -60.0, Float64(120.0 * a));
                                	else
                                		tmp = t_1;
                                	end
                                	return tmp
                                end
                                
                                code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+48], t$95$1, If[LessEqual[t$95$2, 4e-198], N[(120.0 * a), $MachinePrecision], If[LessEqual[t$95$2, 4e+48], N[(N[(x / t), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_1 := \left(x - y\right) \cdot \frac{60}{z - t}\\
                                t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
                                \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+48}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-198}:\\
                                \;\;\;\;120 \cdot a\\
                                
                                \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+48}:\\
                                \;\;\;\;\mathsf{fma}\left(\frac{x}{t}, -60, 120 \cdot a\right)\\
                                
                                \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)) < -4.99999999999999973e48 or 4.00000000000000018e48 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

                                  1. Initial program 98.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. Applied rewrites81.8%

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

                                    if -4.99999999999999973e48 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 3.9999999999999996e-198

                                    1. Initial program 99.8%

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

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

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

                                      if 3.9999999999999996e-198 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.00000000000000018e48

                                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            1. Initial program 96.5%

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

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

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

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

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

                                                if -1.00000000000000002e95 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.99999999999999973e48

                                                1. Initial program 99.8%

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

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

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

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

                                                    if -4.99999999999999973e48 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000011e63

                                                    1. Initial program 99.8%

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

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

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

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

                                                      1. Initial program 99.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. Applied rewrites84.9%

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

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

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

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

                                                          1. Initial program 96.5%

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

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

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

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

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

                                                              if -1.00000000000000002e95 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.99999999999999973e48

                                                              1. Initial program 99.8%

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

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

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

                                                                if -4.99999999999999973e48 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000011e63

                                                                1. Initial program 99.8%

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

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

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

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

                                                                  1. Initial program 99.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. Applied rewrites84.9%

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

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

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

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

                                                                      1. Initial program 96.5%

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

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

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

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

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

                                                                          if -1.00000000000000002e95 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.99999999999999973e48

                                                                          1. Initial program 99.8%

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

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

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

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

                                                                              if -4.99999999999999973e48 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000011e63

                                                                              1. Initial program 99.8%

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

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

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

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

                                                                                1. Initial program 99.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. Applied rewrites84.9%

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

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

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

                                                                                  Alternative 8: 60.6% accurate, 0.3× speedup?

                                                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x - y}{t} \cdot -60\\ t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+48}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+63}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;t\_2 \leq 10^{+82}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                                  (FPCore (x y z t a)
                                                                                   :precision binary64
                                                                                   (let* ((t_1 (* (/ (- x y) t) -60.0)) (t_2 (/ (* 60.0 (- x y)) (- z t))))
                                                                                     (if (<= t_2 -5e+48)
                                                                                       t_1
                                                                                       (if (<= t_2 5e+63)
                                                                                         (* 120.0 a)
                                                                                         (if (<= t_2 1e+82) (* x (/ 60.0 z)) t_1)))))
                                                                                  double code(double x, double y, double z, double t, double a) {
                                                                                  	double t_1 = ((x - y) / t) * -60.0;
                                                                                  	double t_2 = (60.0 * (x - y)) / (z - t);
                                                                                  	double tmp;
                                                                                  	if (t_2 <= -5e+48) {
                                                                                  		tmp = t_1;
                                                                                  	} else if (t_2 <= 5e+63) {
                                                                                  		tmp = 120.0 * a;
                                                                                  	} else if (t_2 <= 1e+82) {
                                                                                  		tmp = x * (60.0 / z);
                                                                                  	} 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) / t) * (-60.0d0)
                                                                                      t_2 = (60.0d0 * (x - y)) / (z - t)
                                                                                      if (t_2 <= (-5d+48)) then
                                                                                          tmp = t_1
                                                                                      else if (t_2 <= 5d+63) then
                                                                                          tmp = 120.0d0 * a
                                                                                      else if (t_2 <= 1d+82) then
                                                                                          tmp = x * (60.0d0 / z)
                                                                                      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) / t) * -60.0;
                                                                                  	double t_2 = (60.0 * (x - y)) / (z - t);
                                                                                  	double tmp;
                                                                                  	if (t_2 <= -5e+48) {
                                                                                  		tmp = t_1;
                                                                                  	} else if (t_2 <= 5e+63) {
                                                                                  		tmp = 120.0 * a;
                                                                                  	} else if (t_2 <= 1e+82) {
                                                                                  		tmp = x * (60.0 / z);
                                                                                  	} else {
                                                                                  		tmp = t_1;
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  def code(x, y, z, t, a):
                                                                                  	t_1 = ((x - y) / t) * -60.0
                                                                                  	t_2 = (60.0 * (x - y)) / (z - t)
                                                                                  	tmp = 0
                                                                                  	if t_2 <= -5e+48:
                                                                                  		tmp = t_1
                                                                                  	elif t_2 <= 5e+63:
                                                                                  		tmp = 120.0 * a
                                                                                  	elif t_2 <= 1e+82:
                                                                                  		tmp = x * (60.0 / z)
                                                                                  	else:
                                                                                  		tmp = t_1
                                                                                  	return tmp
                                                                                  
                                                                                  function code(x, y, z, t, a)
                                                                                  	t_1 = Float64(Float64(Float64(x - y) / t) * -60.0)
                                                                                  	t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
                                                                                  	tmp = 0.0
                                                                                  	if (t_2 <= -5e+48)
                                                                                  		tmp = t_1;
                                                                                  	elseif (t_2 <= 5e+63)
                                                                                  		tmp = Float64(120.0 * a);
                                                                                  	elseif (t_2 <= 1e+82)
                                                                                  		tmp = Float64(x * Float64(60.0 / z));
                                                                                  	else
                                                                                  		tmp = t_1;
                                                                                  	end
                                                                                  	return tmp
                                                                                  end
                                                                                  
                                                                                  function tmp_2 = code(x, y, z, t, a)
                                                                                  	t_1 = ((x - y) / t) * -60.0;
                                                                                  	t_2 = (60.0 * (x - y)) / (z - t);
                                                                                  	tmp = 0.0;
                                                                                  	if (t_2 <= -5e+48)
                                                                                  		tmp = t_1;
                                                                                  	elseif (t_2 <= 5e+63)
                                                                                  		tmp = 120.0 * a;
                                                                                  	elseif (t_2 <= 1e+82)
                                                                                  		tmp = x * (60.0 / z);
                                                                                  	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] / t), $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, -5e+48], t$95$1, If[LessEqual[t$95$2, 5e+63], N[(120.0 * a), $MachinePrecision], If[LessEqual[t$95$2, 1e+82], N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  
                                                                                  \\
                                                                                  \begin{array}{l}
                                                                                  t_1 := \frac{x - y}{t} \cdot -60\\
                                                                                  t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
                                                                                  \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+48}:\\
                                                                                  \;\;\;\;t\_1\\
                                                                                  
                                                                                  \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+63}:\\
                                                                                  \;\;\;\;120 \cdot a\\
                                                                                  
                                                                                  \mathbf{elif}\;t\_2 \leq 10^{+82}:\\
                                                                                  \;\;\;\;x \cdot \frac{60}{z}\\
                                                                                  
                                                                                  \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)) < -4.99999999999999973e48 or 9.9999999999999996e81 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

                                                                                    1. Initial program 98.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. Applied rewrites80.8%

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

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

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

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

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

                                                                                          if -4.99999999999999973e48 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000011e63

                                                                                          1. Initial program 99.8%

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

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

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

                                                                                            if 5.00000000000000011e63 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999996e81

                                                                                            1. Initial program 99.3%

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

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

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

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

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

                                                                                                  \[\leadsto x \cdot \frac{60}{z} \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. Applied rewrites72.0%

                                                                                                    \[\leadsto x \cdot \frac{60}{z} \]
                                                                                                4. Recombined 3 regimes into one program.
                                                                                                5. Final simplification63.3%

                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq -5 \cdot 10^{+48}:\\ \;\;\;\;\frac{x - y}{t} \cdot -60\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq 5 \cdot 10^{+63}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq 10^{+82}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y}{t} \cdot -60\\ \end{array} \]
                                                                                                6. Add Preprocessing

                                                                                                Alternative 9: 54.2% accurate, 0.3× speedup?

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

                                                                                                  1. Initial program 97.5%

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

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

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

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

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

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

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

                                                                                                        if -2.0000000000000001e137 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000011e63

                                                                                                        1. Initial program 99.8%

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

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

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

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

                                                                                                          1. Initial program 99.6%

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

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

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

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

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

                                                                                                            Alternative 10: 55.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 -2 \cdot 10^{+162} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+189}\right):\\ \;\;\;\;y \cdot \frac{60}{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+162) (not (<= t_1 5e+189)))
                                                                                                                 (* y (/ 60.0 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+162) || !(t_1 <= 5e+189)) {
                                                                                                            		tmp = y * (60.0 / 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+162)) .or. (.not. (t_1 <= 5d+189))) then
                                                                                                                    tmp = y * (60.0d0 / 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+162) || !(t_1 <= 5e+189)) {
                                                                                                            		tmp = y * (60.0 / 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+162) or not (t_1 <= 5e+189):
                                                                                                            		tmp = y * (60.0 / 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+162) || !(t_1 <= 5e+189))
                                                                                                            		tmp = Float64(y * Float64(60.0 / 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+162) || ~((t_1 <= 5e+189)))
                                                                                                            		tmp = y * (60.0 / 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+162], N[Not[LessEqual[t$95$1, 5e+189]], $MachinePrecision]], N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]]
                                                                                                            
                                                                                                            \begin{array}{l}
                                                                                                            
                                                                                                            \\
                                                                                                            \begin{array}{l}
                                                                                                            t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
                                                                                                            \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+162} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+189}\right):\\
                                                                                                            \;\;\;\;y \cdot \frac{60}{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.9999999999999999e162 or 5.0000000000000004e189 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

                                                                                                              1. Initial program 97.1%

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

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

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

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

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

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

                                                                                                                    if -1.9999999999999999e162 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.0000000000000004e189

                                                                                                                    1. Initial program 99.8%

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

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

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

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

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

                                                                                                                      1. Initial program 93.8%

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

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

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

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

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

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

                                                                                                                            if -1.9999999999999999e162 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.0000000000000004e189

                                                                                                                            1. Initial program 99.8%

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

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

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

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

                                                                                                                              1. Initial program 99.6%

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

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

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

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

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

                                                                                                                                Alternative 12: 85.1% accurate, 0.6× speedup?

                                                                                                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\ t_2 := \frac{x - y}{z}\\ \mathbf{if}\;z \leq -6.8 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(a, 120, t\_2 \cdot 60\right)\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-38}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-114}:\\ \;\;\;\;\mathsf{fma}\left(a, 120, \frac{x - y}{t} \cdot -60\right)\\ \mathbf{elif}\;z \leq 4500:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t\_2, 60, 120 \cdot a\right)\\ \end{array} \end{array} \]
                                                                                                                                (FPCore (x y z t a)
                                                                                                                                 :precision binary64
                                                                                                                                 (let* ((t_1 (fma (/ x (- z t)) 60.0 (* 120.0 a))) (t_2 (/ (- x y) z)))
                                                                                                                                   (if (<= z -6.8e+52)
                                                                                                                                     (fma a 120.0 (* t_2 60.0))
                                                                                                                                     (if (<= z -1.6e-38)
                                                                                                                                       t_1
                                                                                                                                       (if (<= z 7.5e-114)
                                                                                                                                         (fma a 120.0 (* (/ (- x y) t) -60.0))
                                                                                                                                         (if (<= z 4500.0) t_1 (fma t_2 60.0 (* 120.0 a))))))))
                                                                                                                                double code(double x, double y, double z, double t, double a) {
                                                                                                                                	double t_1 = fma((x / (z - t)), 60.0, (120.0 * a));
                                                                                                                                	double t_2 = (x - y) / z;
                                                                                                                                	double tmp;
                                                                                                                                	if (z <= -6.8e+52) {
                                                                                                                                		tmp = fma(a, 120.0, (t_2 * 60.0));
                                                                                                                                	} else if (z <= -1.6e-38) {
                                                                                                                                		tmp = t_1;
                                                                                                                                	} else if (z <= 7.5e-114) {
                                                                                                                                		tmp = fma(a, 120.0, (((x - y) / t) * -60.0));
                                                                                                                                	} else if (z <= 4500.0) {
                                                                                                                                		tmp = t_1;
                                                                                                                                	} else {
                                                                                                                                		tmp = fma(t_2, 60.0, (120.0 * a));
                                                                                                                                	}
                                                                                                                                	return tmp;
                                                                                                                                }
                                                                                                                                
                                                                                                                                function code(x, y, z, t, a)
                                                                                                                                	t_1 = fma(Float64(x / Float64(z - t)), 60.0, Float64(120.0 * a))
                                                                                                                                	t_2 = Float64(Float64(x - y) / z)
                                                                                                                                	tmp = 0.0
                                                                                                                                	if (z <= -6.8e+52)
                                                                                                                                		tmp = fma(a, 120.0, Float64(t_2 * 60.0));
                                                                                                                                	elseif (z <= -1.6e-38)
                                                                                                                                		tmp = t_1;
                                                                                                                                	elseif (z <= 7.5e-114)
                                                                                                                                		tmp = fma(a, 120.0, Float64(Float64(Float64(x - y) / t) * -60.0));
                                                                                                                                	elseif (z <= 4500.0)
                                                                                                                                		tmp = t_1;
                                                                                                                                	else
                                                                                                                                		tmp = fma(t_2, 60.0, Float64(120.0 * a));
                                                                                                                                	end
                                                                                                                                	return tmp
                                                                                                                                end
                                                                                                                                
                                                                                                                                code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -6.8e+52], N[(a * 120.0 + N[(t$95$2 * 60.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.6e-38], t$95$1, If[LessEqual[z, 7.5e-114], N[(a * 120.0 + N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * -60.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4500.0], t$95$1, N[(t$95$2 * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]]]]]]]
                                                                                                                                
                                                                                                                                \begin{array}{l}
                                                                                                                                
                                                                                                                                \\
                                                                                                                                \begin{array}{l}
                                                                                                                                t_1 := \mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\
                                                                                                                                t_2 := \frac{x - y}{z}\\
                                                                                                                                \mathbf{if}\;z \leq -6.8 \cdot 10^{+52}:\\
                                                                                                                                \;\;\;\;\mathsf{fma}\left(a, 120, t\_2 \cdot 60\right)\\
                                                                                                                                
                                                                                                                                \mathbf{elif}\;z \leq -1.6 \cdot 10^{-38}:\\
                                                                                                                                \;\;\;\;t\_1\\
                                                                                                                                
                                                                                                                                \mathbf{elif}\;z \leq 7.5 \cdot 10^{-114}:\\
                                                                                                                                \;\;\;\;\mathsf{fma}\left(a, 120, \frac{x - y}{t} \cdot -60\right)\\
                                                                                                                                
                                                                                                                                \mathbf{elif}\;z \leq 4500:\\
                                                                                                                                \;\;\;\;t\_1\\
                                                                                                                                
                                                                                                                                \mathbf{else}:\\
                                                                                                                                \;\;\;\;\mathsf{fma}\left(t\_2, 60, 120 \cdot a\right)\\
                                                                                                                                
                                                                                                                                
                                                                                                                                \end{array}
                                                                                                                                \end{array}
                                                                                                                                
                                                                                                                                Derivation
                                                                                                                                1. Split input into 4 regimes
                                                                                                                                2. if z < -6.8e52

                                                                                                                                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                    if -6.8e52 < z < -1.59999999999999989e-38 or 7.5000000000000002e-114 < z < 4500

                                                                                                                                    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                      if -1.59999999999999989e-38 < z < 7.5000000000000002e-114

                                                                                                                                      1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                        if 4500 < z

                                                                                                                                        1. Initial program 99.7%

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

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

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

                                                                                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(a, 120, \frac{x - y}{z} \cdot 60\right)\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-38}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-114}:\\ \;\;\;\;\mathsf{fma}\left(a, 120, \frac{x - y}{t} \cdot -60\right)\\ \mathbf{elif}\;z \leq 4500:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\ \end{array} \]
                                                                                                                                        7. Add Preprocessing

                                                                                                                                        Alternative 13: 85.1% accurate, 0.6× speedup?

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

                                                                                                                                          1. Initial program 99.7%

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

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

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

                                                                                                                                            if -6.8e52 < z < -1.59999999999999989e-38 or 7.5000000000000002e-114 < z < 4500

                                                                                                                                            1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                              if -1.59999999999999989e-38 < z < 7.5000000000000002e-114

                                                                                                                                              1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-38}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-114}:\\ \;\;\;\;\mathsf{fma}\left(a, 120, \frac{x - y}{t} \cdot -60\right)\\ \mathbf{elif}\;z \leq 4500:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\ \end{array} \]
                                                                                                                                              9. Add Preprocessing

                                                                                                                                              Alternative 14: 85.1% accurate, 0.6× speedup?

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

                                                                                                                                                1. Initial program 99.7%

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

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

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

                                                                                                                                                  if -6.8e52 < z < -2.10000000000000013e-41 or 7.5000000000000002e-114 < z < 4500

                                                                                                                                                  1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                                    if -2.10000000000000013e-41 < z < 7.5000000000000002e-114

                                                                                                                                                    1. Initial program 99.7%

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

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

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

                                                                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-41}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-114}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, -60, 120 \cdot a\right)\\ \mathbf{elif}\;z \leq 4500:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\ \end{array} \]
                                                                                                                                                    7. Add Preprocessing

                                                                                                                                                    Alternative 15: 89.6% accurate, 0.8× speedup?

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

                                                                                                                                                      1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                                        if -2.3e64 < x < 1.60000000000000008e58

                                                                                                                                                        1. Initial program 99.8%

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

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

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

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

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

                                                                                                                                                              \[\leadsto \color{blue}{a \cdot 120} + \frac{-60 \cdot y}{z - t} \]
                                                                                                                                                            4. lower-fma.f6495.7

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

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

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

                                                                                                                                                        Alternative 16: 81.7% accurate, 0.8× speedup?

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

                                                                                                                                                          1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                                            if -2.10000000000000013e-41 < z < 7.5000000000000002e-114

                                                                                                                                                            1. Initial program 99.7%

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

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

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

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

                                                                                                                                                            Alternative 17: 80.7% accurate, 0.8× speedup?

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

                                                                                                                                                              1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                                                  \[\leadsto \mathsf{fma}\left(a, 120, -60 \cdot \color{blue}{\frac{y}{z}}\right) \]
                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                  1. Applied rewrites68.1%

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

                                                                                                                                                                  if -1.52e153 < y < 2.3e90

                                                                                                                                                                  1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                                                    if 2.3e90 < y

                                                                                                                                                                    1. Initial program 97.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. Applied rewrites76.6%

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

                                                                                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.52 \cdot 10^{+153}:\\ \;\;\;\;\mathsf{fma}\left(a, 120, \frac{y}{z} \cdot -60\right)\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+90}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z - t}, 60, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \end{array} \]
                                                                                                                                                                    7. Add Preprocessing

                                                                                                                                                                    Alternative 18: 58.5% accurate, 1.0× speedup?

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

                                                                                                                                                                      1. Initial program 98.3%

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

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

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

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

                                                                                                                                                                          if -1.45000000000000001e153 < y < 2.3e90

                                                                                                                                                                          1. Initial program 99.7%

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

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

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

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

                                                                                                                                                                          Alternative 19: 52.7% accurate, 1.1× speedup?

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

                                                                                                                                                                            1. Initial program 99.7%

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

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

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

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

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

                                                                                                                                                                                  \[\leadsto x \cdot \frac{60}{z} \]
                                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                                  1. Applied rewrites61.6%

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

                                                                                                                                                                                  if -7.00000000000000016e188 < x < 3.1000000000000001e250

                                                                                                                                                                                  1. Initial program 99.7%

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

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

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

                                                                                                                                                                                    if 3.1000000000000001e250 < x

                                                                                                                                                                                    1. Initial program 91.9%

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

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

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

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

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

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

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

                                                                                                                                                                                        Alternative 20: 52.2% accurate, 1.3× speedup?

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

                                                                                                                                                                                          1. Initial program 99.7%

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

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

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

                                                                                                                                                                                            if 3.1000000000000001e250 < x

                                                                                                                                                                                            1. Initial program 91.9%

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

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

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

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

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

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

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

                                                                                                                                                                                                    \[\leadsto \frac{x}{t} \cdot -60 \]
                                                                                                                                                                                                  3. Step-by-step derivation
                                                                                                                                                                                                    1. Applied rewrites58.5%

                                                                                                                                                                                                      \[\leadsto \frac{x}{t} \cdot -60 \]
                                                                                                                                                                                                  4. Recombined 2 regimes into one program.
                                                                                                                                                                                                  5. Final simplification55.3%

                                                                                                                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3.1 \cdot 10^{+250}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t} \cdot -60\\ \end{array} \]
                                                                                                                                                                                                  6. Add Preprocessing

                                                                                                                                                                                                  Alternative 21: 51.5% accurate, 5.2× speedup?

                                                                                                                                                                                                  \[\begin{array}{l} \\ 120 \cdot a \end{array} \]
                                                                                                                                                                                                  (FPCore (x y z t a) :precision binary64 (* 120.0 a))
                                                                                                                                                                                                  double code(double x, double y, double z, double t, double a) {
                                                                                                                                                                                                  	return 120.0 * a;
                                                                                                                                                                                                  }
                                                                                                                                                                                                  
                                                                                                                                                                                                  module fmin_fmax_functions
                                                                                                                                                                                                      implicit none
                                                                                                                                                                                                      private
                                                                                                                                                                                                      public fmax
                                                                                                                                                                                                      public fmin
                                                                                                                                                                                                  
                                                                                                                                                                                                      interface fmax
                                                                                                                                                                                                          module procedure fmax88
                                                                                                                                                                                                          module procedure fmax44
                                                                                                                                                                                                          module procedure fmax84
                                                                                                                                                                                                          module procedure fmax48
                                                                                                                                                                                                      end interface
                                                                                                                                                                                                      interface fmin
                                                                                                                                                                                                          module procedure fmin88
                                                                                                                                                                                                          module procedure fmin44
                                                                                                                                                                                                          module procedure fmin84
                                                                                                                                                                                                          module procedure fmin48
                                                                                                                                                                                                      end interface
                                                                                                                                                                                                  contains
                                                                                                                                                                                                      real(8) function fmax88(x, y) result (res)
                                                                                                                                                                                                          real(8), intent (in) :: x
                                                                                                                                                                                                          real(8), intent (in) :: y
                                                                                                                                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                                                                      end function
                                                                                                                                                                                                      real(4) function fmax44(x, y) result (res)
                                                                                                                                                                                                          real(4), intent (in) :: x
                                                                                                                                                                                                          real(4), intent (in) :: y
                                                                                                                                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                                                                      end function
                                                                                                                                                                                                      real(8) function fmax84(x, y) result(res)
                                                                                                                                                                                                          real(8), intent (in) :: x
                                                                                                                                                                                                          real(4), intent (in) :: y
                                                                                                                                                                                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                                                                                      end function
                                                                                                                                                                                                      real(8) function fmax48(x, y) result(res)
                                                                                                                                                                                                          real(4), intent (in) :: x
                                                                                                                                                                                                          real(8), intent (in) :: y
                                                                                                                                                                                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                                                                                      end function
                                                                                                                                                                                                      real(8) function fmin88(x, y) result (res)
                                                                                                                                                                                                          real(8), intent (in) :: x
                                                                                                                                                                                                          real(8), intent (in) :: y
                                                                                                                                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                                                                      end function
                                                                                                                                                                                                      real(4) function fmin44(x, y) result (res)
                                                                                                                                                                                                          real(4), intent (in) :: x
                                                                                                                                                                                                          real(4), intent (in) :: y
                                                                                                                                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                                                                      end function
                                                                                                                                                                                                      real(8) function fmin84(x, y) result(res)
                                                                                                                                                                                                          real(8), intent (in) :: x
                                                                                                                                                                                                          real(4), intent (in) :: y
                                                                                                                                                                                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                                                                                      end function
                                                                                                                                                                                                      real(8) function fmin48(x, y) result(res)
                                                                                                                                                                                                          real(4), intent (in) :: x
                                                                                                                                                                                                          real(8), intent (in) :: y
                                                                                                                                                                                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                                                                                      end function
                                                                                                                                                                                                  end module
                                                                                                                                                                                                  
                                                                                                                                                                                                  real(8) function code(x, y, z, t, a)
                                                                                                                                                                                                  use fmin_fmax_functions
                                                                                                                                                                                                      real(8), intent (in) :: x
                                                                                                                                                                                                      real(8), intent (in) :: y
                                                                                                                                                                                                      real(8), intent (in) :: z
                                                                                                                                                                                                      real(8), intent (in) :: t
                                                                                                                                                                                                      real(8), intent (in) :: a
                                                                                                                                                                                                      code = 120.0d0 * a
                                                                                                                                                                                                  end function
                                                                                                                                                                                                  
                                                                                                                                                                                                  public static double code(double x, double y, double z, double t, double a) {
                                                                                                                                                                                                  	return 120.0 * a;
                                                                                                                                                                                                  }
                                                                                                                                                                                                  
                                                                                                                                                                                                  def code(x, y, z, t, a):
                                                                                                                                                                                                  	return 120.0 * a
                                                                                                                                                                                                  
                                                                                                                                                                                                  function code(x, y, z, t, a)
                                                                                                                                                                                                  	return Float64(120.0 * a)
                                                                                                                                                                                                  end
                                                                                                                                                                                                  
                                                                                                                                                                                                  function tmp = code(x, y, z, t, a)
                                                                                                                                                                                                  	tmp = 120.0 * a;
                                                                                                                                                                                                  end
                                                                                                                                                                                                  
                                                                                                                                                                                                  code[x_, y_, z_, t_, a_] := N[(120.0 * a), $MachinePrecision]
                                                                                                                                                                                                  
                                                                                                                                                                                                  \begin{array}{l}
                                                                                                                                                                                                  
                                                                                                                                                                                                  \\
                                                                                                                                                                                                  120 \cdot a
                                                                                                                                                                                                  \end{array}
                                                                                                                                                                                                  
                                                                                                                                                                                                  Derivation
                                                                                                                                                                                                  1. Initial program 99.4%

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

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

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

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

                                                                                                                                                                                                    \[\begin{array}{l} \\ \frac{60}{\frac{z - t}{x - y}} + a \cdot 120 \end{array} \]
                                                                                                                                                                                                    (FPCore (x y z t a)
                                                                                                                                                                                                     :precision binary64
                                                                                                                                                                                                     (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
                                                                                                                                                                                                    double code(double x, double y, double z, double t, double a) {
                                                                                                                                                                                                    	return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
                                                                                                                                                                                                    }
                                                                                                                                                                                                    
                                                                                                                                                                                                    module fmin_fmax_functions
                                                                                                                                                                                                        implicit none
                                                                                                                                                                                                        private
                                                                                                                                                                                                        public fmax
                                                                                                                                                                                                        public fmin
                                                                                                                                                                                                    
                                                                                                                                                                                                        interface fmax
                                                                                                                                                                                                            module procedure fmax88
                                                                                                                                                                                                            module procedure fmax44
                                                                                                                                                                                                            module procedure fmax84
                                                                                                                                                                                                            module procedure fmax48
                                                                                                                                                                                                        end interface
                                                                                                                                                                                                        interface fmin
                                                                                                                                                                                                            module procedure fmin88
                                                                                                                                                                                                            module procedure fmin44
                                                                                                                                                                                                            module procedure fmin84
                                                                                                                                                                                                            module procedure fmin48
                                                                                                                                                                                                        end interface
                                                                                                                                                                                                    contains
                                                                                                                                                                                                        real(8) function fmax88(x, y) result (res)
                                                                                                                                                                                                            real(8), intent (in) :: x
                                                                                                                                                                                                            real(8), intent (in) :: y
                                                                                                                                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                                                                        end function
                                                                                                                                                                                                        real(4) function fmax44(x, y) result (res)
                                                                                                                                                                                                            real(4), intent (in) :: x
                                                                                                                                                                                                            real(4), intent (in) :: y
                                                                                                                                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                                                                        end function
                                                                                                                                                                                                        real(8) function fmax84(x, y) result(res)
                                                                                                                                                                                                            real(8), intent (in) :: x
                                                                                                                                                                                                            real(4), intent (in) :: y
                                                                                                                                                                                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                                                                                        end function
                                                                                                                                                                                                        real(8) function fmax48(x, y) result(res)
                                                                                                                                                                                                            real(4), intent (in) :: x
                                                                                                                                                                                                            real(8), intent (in) :: y
                                                                                                                                                                                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                                                                                        end function
                                                                                                                                                                                                        real(8) function fmin88(x, y) result (res)
                                                                                                                                                                                                            real(8), intent (in) :: x
                                                                                                                                                                                                            real(8), intent (in) :: y
                                                                                                                                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                                                                        end function
                                                                                                                                                                                                        real(4) function fmin44(x, y) result (res)
                                                                                                                                                                                                            real(4), intent (in) :: x
                                                                                                                                                                                                            real(4), intent (in) :: y
                                                                                                                                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                                                                        end function
                                                                                                                                                                                                        real(8) function fmin84(x, y) result(res)
                                                                                                                                                                                                            real(8), intent (in) :: x
                                                                                                                                                                                                            real(4), intent (in) :: y
                                                                                                                                                                                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                                                                                        end function
                                                                                                                                                                                                        real(8) function fmin48(x, y) result(res)
                                                                                                                                                                                                            real(4), intent (in) :: x
                                                                                                                                                                                                            real(8), intent (in) :: y
                                                                                                                                                                                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                                                                                        end function
                                                                                                                                                                                                    end module
                                                                                                                                                                                                    
                                                                                                                                                                                                    real(8) function code(x, y, z, t, a)
                                                                                                                                                                                                    use fmin_fmax_functions
                                                                                                                                                                                                        real(8), intent (in) :: x
                                                                                                                                                                                                        real(8), intent (in) :: y
                                                                                                                                                                                                        real(8), intent (in) :: z
                                                                                                                                                                                                        real(8), intent (in) :: t
                                                                                                                                                                                                        real(8), intent (in) :: a
                                                                                                                                                                                                        code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
                                                                                                                                                                                                    end function
                                                                                                                                                                                                    
                                                                                                                                                                                                    public static double code(double x, double y, double z, double t, double a) {
                                                                                                                                                                                                    	return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
                                                                                                                                                                                                    }
                                                                                                                                                                                                    
                                                                                                                                                                                                    def code(x, y, z, t, a):
                                                                                                                                                                                                    	return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
                                                                                                                                                                                                    
                                                                                                                                                                                                    function code(x, y, z, t, a)
                                                                                                                                                                                                    	return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0))
                                                                                                                                                                                                    end
                                                                                                                                                                                                    
                                                                                                                                                                                                    function tmp = code(x, y, z, t, a)
                                                                                                                                                                                                    	tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0);
                                                                                                                                                                                                    end
                                                                                                                                                                                                    
                                                                                                                                                                                                    code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
                                                                                                                                                                                                    
                                                                                                                                                                                                    \begin{array}{l}
                                                                                                                                                                                                    
                                                                                                                                                                                                    \\
                                                                                                                                                                                                    \frac{60}{\frac{z - t}{x - y}} + a \cdot 120
                                                                                                                                                                                                    \end{array}
                                                                                                                                                                                                    

                                                                                                                                                                                                    Reproduce

                                                                                                                                                                                                    ?
                                                                                                                                                                                                    herbie shell --seed 2025022 
                                                                                                                                                                                                    (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)))