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

Percentage Accurate: 99.4% → 99.8%
Time: 7.3s
Alternatives: 23
Speedup: 1.0×

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}

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 23 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.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 88.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60 \cdot x}{z - t} + a \cdot 120\\
\mathbf{if}\;x \leq -1.2 \cdot 10^{+160}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.2000000000000001e160 or 5.5000000000000004e55 < x

    1. Initial program 99.4%

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

      \[\leadsto \frac{\color{blue}{60 \cdot x}}{z - t} + a \cdot 120 \]
    3. Step-by-step derivation
      1. lower-*.f6474.7

        \[\leadsto \frac{60 \cdot \color{blue}{x}}{z - t} + a \cdot 120 \]
    4. Applied rewrites74.7%

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

    if -1.2000000000000001e160 < x < 5.5000000000000004e55

    1. Initial program 99.4%

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

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

        \[\leadsto \frac{-60 \cdot \color{blue}{y}}{z - t} + a \cdot 120 \]
    4. Applied rewrites74.4%

      \[\leadsto \frac{\color{blue}{-60 \cdot y}}{z - t} + a \cdot 120 \]
    5. 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.f6474.5

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

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

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

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

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

Alternative 3: 84.2% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.74999999999999991e192 or 1.89999999999999989e102 < x

    1. Initial program 99.4%

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

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

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

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

        \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z} - t} \]
      4. lower--.f6451.6

        \[\leadsto 60 \cdot \frac{x - y}{z - \color{blue}{t}} \]
    4. Applied rewrites51.6%

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

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

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

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

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

        \[\leadsto \frac{\mathsf{neg}\left(-60\right)}{z - t} \cdot \left(x - y\right) \]
      6. distribute-neg-fracN/A

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\frac{-60}{z - t}\right)\right) \cdot \left(x - y\right) \]
      10. distribute-neg-fracN/A

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

        \[\leadsto \frac{60}{z - t} \cdot \left(x - y\right) \]
      12. lower-/.f6451.6

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

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

    if -1.74999999999999991e192 < x < 1.89999999999999989e102

    1. Initial program 99.4%

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

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

        \[\leadsto \frac{-60 \cdot \color{blue}{y}}{z - t} + a \cdot 120 \]
    4. Applied rewrites74.4%

      \[\leadsto \frac{\color{blue}{-60 \cdot y}}{z - t} + a \cdot 120 \]
    5. 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.f6474.5

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

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

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

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

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

Alternative 4: 84.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{-56}:\\ \;\;\;\;\mathsf{fma}\left(-60, \frac{x - y}{t}, 120 \cdot a\right)\\ \mathbf{elif}\;t \leq 7.4 \cdot 10^{-38}:\\ \;\;\;\;\mathsf{fma}\left(a, 120, \frac{-60}{z} \cdot \left(y - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, 120, \frac{60}{t} \cdot \left(y - x\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -5.8e-56)
   (fma -60.0 (/ (- x y) t) (* 120.0 a))
   (if (<= t 7.4e-38)
     (fma a 120.0 (* (/ -60.0 z) (- y x)))
     (fma a 120.0 (* (/ 60.0 t) (- y x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -5.8e-56) {
		tmp = fma(-60.0, ((x - y) / t), (120.0 * a));
	} else if (t <= 7.4e-38) {
		tmp = fma(a, 120.0, ((-60.0 / z) * (y - x)));
	} else {
		tmp = fma(a, 120.0, ((60.0 / t) * (y - x)));
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -5.8e-56)
		tmp = fma(-60.0, Float64(Float64(x - y) / t), Float64(120.0 * a));
	elseif (t <= 7.4e-38)
		tmp = fma(a, 120.0, Float64(Float64(-60.0 / z) * Float64(y - x)));
	else
		tmp = fma(a, 120.0, Float64(Float64(60.0 / t) * Float64(y - x)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.8e-56], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.4e-38], N[(a * 120.0 + N[(N[(-60.0 / z), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0 + N[(N[(60.0 / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{-56}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x - y}{t}, 120 \cdot a\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.79999999999999982e-56

    1. Initial program 99.4%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t} + 120 \cdot a} \]
    3. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

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

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

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

    if -5.79999999999999982e-56 < t < 7.4e-38

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{-60}{z}} \cdot \left(y - x\right)\right) \]
    5. Step-by-step derivation
      1. lower-/.f6463.4

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

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

    if 7.4e-38 < t

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{t}} \cdot \left(y - x\right)\right) \]
    5. Step-by-step derivation
      1. lower-/.f6463.7

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

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

Alternative 5: 84.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-60, \frac{x - y}{t}, 120 \cdot a\right)\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.79999999999999982e-56 or 7.4e-38 < t

    1. Initial program 99.4%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t} + 120 \cdot a} \]
    3. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

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

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

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

    if -5.79999999999999982e-56 < t < 7.4e-38

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{-60}{z}} \cdot \left(y - x\right)\right) \]
    5. Step-by-step derivation
      1. lower-/.f6463.4

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

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

Alternative 6: 81.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-60, \frac{x - y}{t}, 120 \cdot a\right)\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.79999999999999982e-56 or 7.4e-38 < t

    1. Initial program 99.4%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t} + 120 \cdot a} \]
    3. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

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

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

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

    if -5.79999999999999982e-56 < t < 7.4e-38

    1. Initial program 99.4%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
    3. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

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

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

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

Alternative 7: 77.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(60, \frac{x}{z}, 120 \cdot a\right)\\ \mathbf{if}\;z \leq -2 \cdot 10^{+136}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{+37}:\\ \;\;\;\;\mathsf{fma}\left(a, 120, \frac{-60}{z} \cdot y\right)\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{-56}:\\ \;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\ \mathbf{elif}\;z \leq 8000000000000:\\ \;\;\;\;\mathsf{fma}\left(-60, \frac{x - y}{t}, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma 60.0 (/ x z) (* 120.0 a))))
   (if (<= z -2e+136)
     t_1
     (if (<= z -3.8e+37)
       (fma a 120.0 (* (/ -60.0 z) y))
       (if (<= z -2.05e-56)
         (* (/ 60.0 (- z t)) (- x y))
         (if (<= z 8000000000000.0)
           (fma -60.0 (/ (- x y) t) (* 120.0 a))
           t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma(60.0, (x / z), (120.0 * a));
	double tmp;
	if (z <= -2e+136) {
		tmp = t_1;
	} else if (z <= -3.8e+37) {
		tmp = fma(a, 120.0, ((-60.0 / z) * y));
	} else if (z <= -2.05e-56) {
		tmp = (60.0 / (z - t)) * (x - y);
	} else if (z <= 8000000000000.0) {
		tmp = fma(-60.0, ((x - y) / t), (120.0 * a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(60.0, Float64(x / z), Float64(120.0 * a))
	tmp = 0.0
	if (z <= -2e+136)
		tmp = t_1;
	elseif (z <= -3.8e+37)
		tmp = fma(a, 120.0, Float64(Float64(-60.0 / z) * y));
	elseif (z <= -2.05e-56)
		tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y));
	elseif (z <= 8000000000000.0)
		tmp = fma(-60.0, Float64(Float64(x - y) / t), Float64(120.0 * a));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(x / z), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e+136], t$95$1, If[LessEqual[z, -3.8e+37], N[(a * 120.0 + N[(N[(-60.0 / z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.05e-56], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8000000000000.0], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(60, \frac{x}{z}, 120 \cdot a\right)\\
\mathbf{if}\;z \leq -2 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -3.8 \cdot 10^{+37}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{-60}{z} \cdot y\right)\\

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

\mathbf{elif}\;z \leq 8000000000000:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x - y}{t}, 120 \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.00000000000000012e136 or 8e12 < z

    1. Initial program 99.4%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
    3. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

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

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

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

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

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

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

    if -2.00000000000000012e136 < z < -3.7999999999999999e37

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{-60}{z}} \cdot \left(y - x\right)\right) \]
    5. Step-by-step derivation
      1. lower-/.f6463.4

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

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

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

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

      if -3.7999999999999999e37 < z < -2.0500000000000001e-56

      1. Initial program 99.4%

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

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

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

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

          \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z} - t} \]
        4. lower--.f6451.6

          \[\leadsto 60 \cdot \frac{x - y}{z - \color{blue}{t}} \]
      4. Applied rewrites51.6%

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

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

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

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

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

          \[\leadsto \frac{\mathsf{neg}\left(-60\right)}{z - t} \cdot \left(x - y\right) \]
        6. distribute-neg-fracN/A

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(\frac{-60}{z - t}\right)\right) \cdot \left(x - y\right) \]
        10. distribute-neg-fracN/A

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

          \[\leadsto \frac{60}{z - t} \cdot \left(x - y\right) \]
        12. lower-/.f6451.6

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

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

      if -2.0500000000000001e-56 < z < 8e12

      1. Initial program 99.4%

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

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t} + 120 \cdot a} \]
      3. Step-by-step derivation
        1. lower-fma.f64N/A

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

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

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

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

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

    Alternative 8: 75.1% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -24000000:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;a \leq 10^{-51}:\\ \;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+163}:\\ \;\;\;\;\mathsf{fma}\left(60, \frac{x}{z}, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (if (<= a -24000000.0)
       (* 120.0 a)
       (if (<= a 1e-51)
         (* (/ 60.0 (- z t)) (- x y))
         (if (<= a 8.2e+163) (fma 60.0 (/ x z) (* 120.0 a)) (* 120.0 a)))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (a <= -24000000.0) {
    		tmp = 120.0 * a;
    	} else if (a <= 1e-51) {
    		tmp = (60.0 / (z - t)) * (x - y);
    	} else if (a <= 8.2e+163) {
    		tmp = fma(60.0, (x / z), (120.0 * a));
    	} else {
    		tmp = 120.0 * a;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (a <= -24000000.0)
    		tmp = Float64(120.0 * a);
    	elseif (a <= 1e-51)
    		tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y));
    	elseif (a <= 8.2e+163)
    		tmp = fma(60.0, Float64(x / z), Float64(120.0 * a));
    	else
    		tmp = Float64(120.0 * a);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[a, -24000000.0], N[(120.0 * a), $MachinePrecision], If[LessEqual[a, 1e-51], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.2e+163], N[(60.0 * N[(x / z), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;a \leq -24000000:\\
    \;\;\;\;120 \cdot a\\
    
    \mathbf{elif}\;a \leq 10^{-51}:\\
    \;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
    
    \mathbf{elif}\;a \leq 8.2 \cdot 10^{+163}:\\
    \;\;\;\;\mathsf{fma}\left(60, \frac{x}{z}, 120 \cdot a\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;120 \cdot a\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if a < -2.4e7 or 8.1999999999999998e163 < a

      1. Initial program 99.4%

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

        \[\leadsto \color{blue}{120 \cdot a} \]
      3. Step-by-step derivation
        1. lower-*.f6449.8

          \[\leadsto 120 \cdot \color{blue}{a} \]
      4. Applied rewrites49.8%

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

      if -2.4e7 < a < 1e-51

      1. Initial program 99.4%

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

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

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

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

          \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z} - t} \]
        4. lower--.f6451.6

          \[\leadsto 60 \cdot \frac{x - y}{z - \color{blue}{t}} \]
      4. Applied rewrites51.6%

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

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

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

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

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

          \[\leadsto \frac{\mathsf{neg}\left(-60\right)}{z - t} \cdot \left(x - y\right) \]
        6. distribute-neg-fracN/A

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(\frac{-60}{z - t}\right)\right) \cdot \left(x - y\right) \]
        10. distribute-neg-fracN/A

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

          \[\leadsto \frac{60}{z - t} \cdot \left(x - y\right) \]
        12. lower-/.f6451.6

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

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

      if 1e-51 < a < 8.1999999999999998e163

      1. Initial program 99.4%

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

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
      3. Step-by-step derivation
        1. lower-fma.f64N/A

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

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

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

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

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

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

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

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

    Alternative 9: 75.1% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -24000000:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;a \leq 10^{-51}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+163}:\\ \;\;\;\;\mathsf{fma}\left(60, \frac{x}{z}, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (if (<= a -24000000.0)
       (* 120.0 a)
       (if (<= a 1e-51)
         (* 60.0 (/ (- x y) (- z t)))
         (if (<= a 8.2e+163) (fma 60.0 (/ x z) (* 120.0 a)) (* 120.0 a)))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (a <= -24000000.0) {
    		tmp = 120.0 * a;
    	} else if (a <= 1e-51) {
    		tmp = 60.0 * ((x - y) / (z - t));
    	} else if (a <= 8.2e+163) {
    		tmp = fma(60.0, (x / z), (120.0 * a));
    	} else {
    		tmp = 120.0 * a;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (a <= -24000000.0)
    		tmp = Float64(120.0 * a);
    	elseif (a <= 1e-51)
    		tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)));
    	elseif (a <= 8.2e+163)
    		tmp = fma(60.0, Float64(x / z), Float64(120.0 * a));
    	else
    		tmp = Float64(120.0 * a);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[a, -24000000.0], N[(120.0 * a), $MachinePrecision], If[LessEqual[a, 1e-51], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.2e+163], N[(60.0 * N[(x / z), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;a \leq -24000000:\\
    \;\;\;\;120 \cdot a\\
    
    \mathbf{elif}\;a \leq 10^{-51}:\\
    \;\;\;\;60 \cdot \frac{x - y}{z - t}\\
    
    \mathbf{elif}\;a \leq 8.2 \cdot 10^{+163}:\\
    \;\;\;\;\mathsf{fma}\left(60, \frac{x}{z}, 120 \cdot a\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;120 \cdot a\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if a < -2.4e7 or 8.1999999999999998e163 < a

      1. Initial program 99.4%

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

        \[\leadsto \color{blue}{120 \cdot a} \]
      3. Step-by-step derivation
        1. lower-*.f6449.8

          \[\leadsto 120 \cdot \color{blue}{a} \]
      4. Applied rewrites49.8%

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

      if -2.4e7 < a < 1e-51

      1. Initial program 99.4%

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

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

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

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

          \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z} - t} \]
        4. lower--.f6451.6

          \[\leadsto 60 \cdot \frac{x - y}{z - \color{blue}{t}} \]
      4. Applied rewrites51.6%

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

      if 1e-51 < a < 8.1999999999999998e163

      1. Initial program 99.4%

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

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
      3. Step-by-step derivation
        1. lower-fma.f64N/A

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

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

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

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

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

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

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

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

    Alternative 10: 67.0% accurate, 0.9× speedup?

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

      1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{t}} \cdot \left(y - x\right)\right) \]
      5. Step-by-step derivation
        1. lower-/.f6463.7

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

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

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

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

        if -4.9e-56 < t < 3e13

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-fma.f64N/A

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(60, \frac{x}{\color{blue}{z}}, 120 \cdot a\right) \]
      9. Recombined 2 regimes into one program.
      10. Add Preprocessing

      Alternative 11: 60.0% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.25 \cdot 10^{+46}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-56}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+19}:\\ \;\;\;\;\mathsf{fma}\left(60, \frac{x}{z}, 120 \cdot a\right)\\ \mathbf{elif}\;t \leq 8.4 \cdot 10^{+93}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (<= t -2.25e+46)
         (* 120.0 a)
         (if (<= t -5.8e-56)
           (* -60.0 (/ y (- z t)))
           (if (<= t 2.4e+19)
             (fma 60.0 (/ x z) (* 120.0 a))
             (if (<= t 8.4e+93) (* -60.0 (/ (- x y) t)) (* 120.0 a))))))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (t <= -2.25e+46) {
      		tmp = 120.0 * a;
      	} else if (t <= -5.8e-56) {
      		tmp = -60.0 * (y / (z - t));
      	} else if (t <= 2.4e+19) {
      		tmp = fma(60.0, (x / z), (120.0 * a));
      	} else if (t <= 8.4e+93) {
      		tmp = -60.0 * ((x - y) / t);
      	} else {
      		tmp = 120.0 * a;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (t <= -2.25e+46)
      		tmp = Float64(120.0 * a);
      	elseif (t <= -5.8e-56)
      		tmp = Float64(-60.0 * Float64(y / Float64(z - t)));
      	elseif (t <= 2.4e+19)
      		tmp = fma(60.0, Float64(x / z), Float64(120.0 * a));
      	elseif (t <= 8.4e+93)
      		tmp = Float64(-60.0 * Float64(Float64(x - y) / t));
      	else
      		tmp = Float64(120.0 * a);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.25e+46], N[(120.0 * a), $MachinePrecision], If[LessEqual[t, -5.8e-56], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e+19], N[(60.0 * N[(x / z), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.4e+93], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq -2.25 \cdot 10^{+46}:\\
      \;\;\;\;120 \cdot a\\
      
      \mathbf{elif}\;t \leq -5.8 \cdot 10^{-56}:\\
      \;\;\;\;-60 \cdot \frac{y}{z - t}\\
      
      \mathbf{elif}\;t \leq 2.4 \cdot 10^{+19}:\\
      \;\;\;\;\mathsf{fma}\left(60, \frac{x}{z}, 120 \cdot a\right)\\
      
      \mathbf{elif}\;t \leq 8.4 \cdot 10^{+93}:\\
      \;\;\;\;-60 \cdot \frac{x - y}{t}\\
      
      \mathbf{else}:\\
      \;\;\;\;120 \cdot a\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if t < -2.25000000000000005e46 or 8.39999999999999921e93 < t

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-*.f6449.8

            \[\leadsto 120 \cdot \color{blue}{a} \]
        4. Applied rewrites49.8%

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

        if -2.25000000000000005e46 < t < -5.79999999999999982e-56

        1. Initial program 99.4%

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

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

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

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

            \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z} - t} \]
          4. lower--.f6451.6

            \[\leadsto 60 \cdot \frac{x - y}{z - \color{blue}{t}} \]
        4. Applied rewrites51.6%

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

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

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

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

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

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

          \[\leadsto -60 \cdot \color{blue}{\frac{y}{z - t}} \]
        9. Step-by-step derivation
          1. lower-*.f64N/A

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

            \[\leadsto -60 \cdot \frac{y}{z - \color{blue}{t}} \]
          3. lower--.f6427.0

            \[\leadsto -60 \cdot \frac{y}{z - t} \]
        10. Applied rewrites27.0%

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

        if -5.79999999999999982e-56 < t < 2.4e19

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-fma.f64N/A

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

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

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

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

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

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

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

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

        if 2.4e19 < t < 8.39999999999999921e93

        1. Initial program 99.4%

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

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

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

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

            \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z} - t} \]
          4. lower--.f6451.6

            \[\leadsto 60 \cdot \frac{x - y}{z - \color{blue}{t}} \]
        4. Applied rewrites51.6%

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

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

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

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

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

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

      Alternative 12: 59.3% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.75 \cdot 10^{+192}:\\ \;\;\;\;\frac{60}{z - t} \cdot x\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{-89}:\\ \;\;\;\;\mathsf{fma}\left(-60, \frac{y}{z}, 120 \cdot a\right)\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{+102}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{60 \cdot x}{z - t}\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (<= x -1.75e+192)
         (* (/ 60.0 (- z t)) x)
         (if (<= x 1.25e-89)
           (fma -60.0 (/ y z) (* 120.0 a))
           (if (<= x 1.9e+102) (* 120.0 a) (/ (* 60.0 x) (- z t))))))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (x <= -1.75e+192) {
      		tmp = (60.0 / (z - t)) * x;
      	} else if (x <= 1.25e-89) {
      		tmp = fma(-60.0, (y / z), (120.0 * a));
      	} else if (x <= 1.9e+102) {
      		tmp = 120.0 * a;
      	} else {
      		tmp = (60.0 * x) / (z - t);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (x <= -1.75e+192)
      		tmp = Float64(Float64(60.0 / Float64(z - t)) * x);
      	elseif (x <= 1.25e-89)
      		tmp = fma(-60.0, Float64(y / z), Float64(120.0 * a));
      	elseif (x <= 1.9e+102)
      		tmp = Float64(120.0 * a);
      	else
      		tmp = Float64(Float64(60.0 * x) / Float64(z - t));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.75e+192], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, 1.25e-89], N[(-60.0 * N[(y / z), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.9e+102], N[(120.0 * a), $MachinePrecision], N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq -1.75 \cdot 10^{+192}:\\
      \;\;\;\;\frac{60}{z - t} \cdot x\\
      
      \mathbf{elif}\;x \leq 1.25 \cdot 10^{-89}:\\
      \;\;\;\;\mathsf{fma}\left(-60, \frac{y}{z}, 120 \cdot a\right)\\
      
      \mathbf{elif}\;x \leq 1.9 \cdot 10^{+102}:\\
      \;\;\;\;120 \cdot a\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{60 \cdot x}{z - t}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if x < -1.74999999999999991e192

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

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

            \[\leadsto 60 \cdot \frac{x}{\color{blue}{z - t}} \]
          3. lower--.f6427.4

            \[\leadsto 60 \cdot \frac{x}{z - \color{blue}{t}} \]
        4. Applied rewrites27.4%

          \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

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

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

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

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

            \[\leadsto \left(60 \cdot \frac{1}{z - t}\right) \cdot \color{blue}{x} \]
          6. mult-flip-revN/A

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

            \[\leadsto \frac{60}{z - t} \cdot \color{blue}{x} \]
          8. lower-/.f6427.4

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

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

        if -1.74999999999999991e192 < x < 1.24999999999999992e-89

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

        if 1.24999999999999992e-89 < x < 1.89999999999999989e102

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-*.f6449.8

            \[\leadsto 120 \cdot \color{blue}{a} \]
        4. Applied rewrites49.8%

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

        if 1.89999999999999989e102 < x

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

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

            \[\leadsto 60 \cdot \frac{x}{\color{blue}{z - t}} \]
          3. lower--.f6427.4

            \[\leadsto 60 \cdot \frac{x}{z - \color{blue}{t}} \]
        4. Applied rewrites27.4%

          \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

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

            \[\leadsto 60 \cdot \frac{x}{\color{blue}{z - t}} \]
          3. associate-*r/N/A

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

            \[\leadsto \frac{60 \cdot x}{\color{blue}{z - t}} \]
          5. lower-*.f6427.3

            \[\leadsto \frac{60 \cdot x}{\color{blue}{z} - t} \]
        6. Applied rewrites27.3%

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

      Alternative 13: 59.3% accurate, 0.4× speedup?

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

        1. Initial program 99.4%

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

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

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

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

            \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z} - t} \]
          4. lower--.f6451.6

            \[\leadsto 60 \cdot \frac{x - y}{z - \color{blue}{t}} \]
        4. Applied rewrites51.6%

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

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

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

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

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

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

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

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

            \[\leadsto -60 \cdot \frac{x - y}{t} \]
          4. associate-*r/N/A

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

            \[\leadsto \frac{\left(\mathsf{neg}\left(60\right)\right) \cdot \left(x - y\right)}{t} \]
          6. distribute-lft-neg-outN/A

            \[\leadsto \frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{t} \]
          7. lower-/.f64N/A

            \[\leadsto \frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{t} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\mathsf{neg}\left(\left(x - y\right) \cdot 60\right)}{t} \]
          9. distribute-lft-neg-inN/A

            \[\leadsto \frac{\left(\mathsf{neg}\left(\left(x - y\right)\right)\right) \cdot 60}{t} \]
          10. lower-*.f64N/A

            \[\leadsto \frac{\left(\mathsf{neg}\left(\left(x - y\right)\right)\right) \cdot 60}{t} \]
          11. sub-negate-revN/A

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

            \[\leadsto \frac{\left(y - x\right) \cdot 60}{t} \]
        9. Applied rewrites29.1%

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

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

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-*.f6449.8

            \[\leadsto 120 \cdot \color{blue}{a} \]
        4. Applied rewrites49.8%

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

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

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

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

            \[\leadsto 60 \cdot \frac{x}{\color{blue}{z - t}} \]
          3. lower--.f6427.4

            \[\leadsto 60 \cdot \frac{x}{z - \color{blue}{t}} \]
        4. Applied rewrites27.4%

          \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

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

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

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

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

            \[\leadsto \left(60 \cdot \frac{1}{z - t}\right) \cdot \color{blue}{x} \]
          6. mult-flip-revN/A

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

            \[\leadsto \frac{60}{z - t} \cdot \color{blue}{x} \]
          8. lower-/.f6427.4

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

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

      Alternative 14: 59.2% accurate, 0.4× speedup?

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

        1. Initial program 99.4%

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

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

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

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

            \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z} - t} \]
          4. lower--.f6451.6

            \[\leadsto 60 \cdot \frac{x - y}{z - \color{blue}{t}} \]
        4. Applied rewrites51.6%

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

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

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

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

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

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

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

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

            \[\leadsto -60 \cdot \frac{x - y}{t} \]
          4. associate-*r/N/A

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

            \[\leadsto \frac{\left(\mathsf{neg}\left(60\right)\right) \cdot \left(x - y\right)}{t} \]
          6. distribute-lft-neg-outN/A

            \[\leadsto \frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{t} \]
          7. lower-/.f64N/A

            \[\leadsto \frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{t} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\mathsf{neg}\left(\left(x - y\right) \cdot 60\right)}{t} \]
          9. distribute-lft-neg-inN/A

            \[\leadsto \frac{\left(\mathsf{neg}\left(\left(x - y\right)\right)\right) \cdot 60}{t} \]
          10. lower-*.f64N/A

            \[\leadsto \frac{\left(\mathsf{neg}\left(\left(x - y\right)\right)\right) \cdot 60}{t} \]
          11. sub-negate-revN/A

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

            \[\leadsto \frac{\left(y - x\right) \cdot 60}{t} \]
        9. Applied rewrites29.1%

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

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

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-*.f6449.8

            \[\leadsto 120 \cdot \color{blue}{a} \]
        4. Applied rewrites49.8%

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

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

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

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

            \[\leadsto 60 \cdot \frac{x}{\color{blue}{z - t}} \]
          3. lower--.f6427.4

            \[\leadsto 60 \cdot \frac{x}{z - \color{blue}{t}} \]
        4. Applied rewrites27.4%

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

      Alternative 15: 58.4% accurate, 0.4× speedup?

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

        1. Initial program 99.4%

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

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

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

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

            \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z} - t} \]
          4. lower--.f6451.6

            \[\leadsto 60 \cdot \frac{x - y}{z - \color{blue}{t}} \]
        4. Applied rewrites51.6%

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

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

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

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

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

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

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

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

            \[\leadsto -60 \cdot \frac{x - y}{t} \]
          4. associate-*r/N/A

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

            \[\leadsto \frac{\left(\mathsf{neg}\left(60\right)\right) \cdot \left(x - y\right)}{t} \]
          6. distribute-lft-neg-outN/A

            \[\leadsto \frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{t} \]
          7. lower-/.f64N/A

            \[\leadsto \frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{t} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\mathsf{neg}\left(\left(x - y\right) \cdot 60\right)}{t} \]
          9. distribute-lft-neg-inN/A

            \[\leadsto \frac{\left(\mathsf{neg}\left(\left(x - y\right)\right)\right) \cdot 60}{t} \]
          10. lower-*.f64N/A

            \[\leadsto \frac{\left(\mathsf{neg}\left(\left(x - y\right)\right)\right) \cdot 60}{t} \]
          11. sub-negate-revN/A

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

            \[\leadsto \frac{\left(y - x\right) \cdot 60}{t} \]
        9. Applied rewrites29.1%

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

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

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-*.f6449.8

            \[\leadsto 120 \cdot \color{blue}{a} \]
        4. Applied rewrites49.8%

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

      Alternative 16: 58.2% accurate, 0.4× speedup?

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

        1. Initial program 99.4%

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

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

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

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

            \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z} - t} \]
          4. lower--.f6451.6

            \[\leadsto 60 \cdot \frac{x - y}{z - \color{blue}{t}} \]
        4. Applied rewrites51.6%

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{x - y}{t} \cdot -60 \]
          5. mult-flipN/A

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

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

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

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

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

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

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

            \[\leadsto \frac{-60}{t} \cdot \left(x - y\right) \]
        9. Applied rewrites29.2%

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

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

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-*.f6449.8

            \[\leadsto 120 \cdot \color{blue}{a} \]
        4. Applied rewrites49.8%

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

      Alternative 17: 58.2% accurate, 0.4× speedup?

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

        1. Initial program 99.4%

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

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

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

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

            \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z} - t} \]
          4. lower--.f6451.6

            \[\leadsto 60 \cdot \frac{x - y}{z - \color{blue}{t}} \]
        4. Applied rewrites51.6%

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

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

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

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

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

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

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

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-*.f6449.8

            \[\leadsto 120 \cdot \color{blue}{a} \]
        4. Applied rewrites49.8%

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

      Alternative 18: 57.2% accurate, 1.0× speedup?

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

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-*.f6449.8

            \[\leadsto 120 \cdot \color{blue}{a} \]
        4. Applied rewrites49.8%

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

        if -2.4e-78 < a < 4.1999999999999997e-52

        1. Initial program 99.4%

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

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

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

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

            \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z} - t} \]
          4. lower--.f6451.6

            \[\leadsto 60 \cdot \frac{x - y}{z - \color{blue}{t}} \]
        4. Applied rewrites51.6%

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

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

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

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

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

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

          \[\leadsto -60 \cdot \color{blue}{\frac{y}{z - t}} \]
        9. Step-by-step derivation
          1. lower-*.f64N/A

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

            \[\leadsto -60 \cdot \frac{y}{z - \color{blue}{t}} \]
          3. lower--.f6427.0

            \[\leadsto -60 \cdot \frac{y}{z - t} \]
        10. Applied rewrites27.0%

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

      Alternative 19: 54.2% accurate, 0.5× speedup?

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

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-fma.f64N/A

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

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

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

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

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

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

            \[\leadsto 60 \cdot \frac{x}{\color{blue}{z}} \]
          2. lower-/.f6416.1

            \[\leadsto 60 \cdot \frac{x}{z} \]
        7. Applied rewrites16.1%

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

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

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-*.f6449.8

            \[\leadsto 120 \cdot \color{blue}{a} \]
        4. Applied rewrites49.8%

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

      Alternative 20: 54.2% accurate, 0.5× speedup?

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

        1. Initial program 99.4%

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

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

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

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

            \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z} - t} \]
          4. lower--.f6451.6

            \[\leadsto 60 \cdot \frac{x - y}{z - \color{blue}{t}} \]
        4. Applied rewrites51.6%

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

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

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

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

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

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

          \[\leadsto 60 \cdot \frac{y}{\color{blue}{t}} \]
        9. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto 60 \cdot \frac{y}{t} \]
          2. lower-/.f6416.1

            \[\leadsto 60 \cdot \frac{y}{t} \]
        10. Applied rewrites16.1%

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

        if -3.99999999999999992e186 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.00000000000000001e160

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-*.f6449.8

            \[\leadsto 120 \cdot \color{blue}{a} \]
        4. Applied rewrites49.8%

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

      Alternative 21: 53.7% accurate, 0.5× speedup?

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

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

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

            \[\leadsto 60 \cdot \frac{x}{\color{blue}{z - t}} \]
          3. lower--.f6427.4

            \[\leadsto 60 \cdot \frac{x}{z - \color{blue}{t}} \]
        4. Applied rewrites27.4%

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

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

            \[\leadsto -60 \cdot \frac{x}{\color{blue}{t}} \]
          2. lower-/.f6416.6

            \[\leadsto -60 \cdot \frac{x}{t} \]
        7. Applied rewrites16.6%

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

        if -4.99999999999999992e156 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.00000000000000013e193

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-*.f6449.8

            \[\leadsto 120 \cdot \color{blue}{a} \]
        4. Applied rewrites49.8%

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

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

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

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

            \[\leadsto 60 \cdot \frac{x}{\color{blue}{z - t}} \]
          3. lower--.f6427.4

            \[\leadsto 60 \cdot \frac{x}{z - \color{blue}{t}} \]
        4. Applied rewrites27.4%

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

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

            \[\leadsto -60 \cdot \frac{x}{\color{blue}{t}} \]
          2. lower-/.f6416.6

            \[\leadsto -60 \cdot \frac{x}{t} \]
        7. Applied rewrites16.6%

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

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

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

            \[\leadsto \frac{x}{t} \cdot -60 \]
          4. mult-flipN/A

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

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

            \[\leadsto \left(\frac{1}{t} \cdot -60\right) \cdot x \]
          7. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{t} \cdot -60\right) \cdot x \]
          8. associate-*l/N/A

            \[\leadsto \frac{1 \cdot -60}{t} \cdot x \]
          9. metadata-evalN/A

            \[\leadsto \frac{-60}{t} \cdot x \]
          10. lower-/.f6416.6

            \[\leadsto \frac{-60}{t} \cdot x \]
        9. Applied rewrites16.6%

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

      Alternative 22: 53.4% accurate, 0.5× speedup?

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

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

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

            \[\leadsto 60 \cdot \frac{x}{\color{blue}{z - t}} \]
          3. lower--.f6427.4

            \[\leadsto 60 \cdot \frac{x}{z - \color{blue}{t}} \]
        4. Applied rewrites27.4%

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

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

            \[\leadsto -60 \cdot \frac{x}{\color{blue}{t}} \]
          2. lower-/.f6416.6

            \[\leadsto -60 \cdot \frac{x}{t} \]
        7. Applied rewrites16.6%

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

        if -4.99999999999999992e156 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.00000000000000013e193

        1. Initial program 99.4%

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

          \[\leadsto \color{blue}{120 \cdot a} \]
        3. Step-by-step derivation
          1. lower-*.f6449.8

            \[\leadsto 120 \cdot \color{blue}{a} \]
        4. Applied rewrites49.8%

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

      Alternative 23: 49.8% accurate, 4.6× 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. Taylor expanded in z around inf

        \[\leadsto \color{blue}{120 \cdot a} \]
      3. Step-by-step derivation
        1. lower-*.f6449.8

          \[\leadsto 120 \cdot \color{blue}{a} \]
      4. Applied rewrites49.8%

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

      Reproduce

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