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

Percentage Accurate: 99.4% → 99.4%
Time: 4.5s
Alternatives: 16
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 16 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.4% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 84.7% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.8000000000000002e25

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

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

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

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

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

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

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

    if -2.8000000000000002e25 < y < 2.1e50

    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 \frac{60 \cdot \left(x - y\right)}{z - t} + \color{blue}{a \cdot 120} \]
      2. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.1e50 < y

      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 \frac{60 \cdot \left(x - y\right)}{z - t} + \color{blue}{a \cdot 120} \]
        2. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 84.2% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{x - y}{t}, -60, 120 \cdot a\right)\\ \mathbf{if}\;t \leq -2.5 \cdot 10^{-24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{-21}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (fma (/ (- x y) t) -60.0 (* 120.0 a))))
       (if (<= t -2.5e-24)
         t_1
         (if (<= t 9.2e-21) (fma (/ (- x y) z) 60.0 (* 120.0 a)) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = fma(((x - y) / t), -60.0, (120.0 * a));
    	double tmp;
    	if (t <= -2.5e-24) {
    		tmp = t_1;
    	} else if (t <= 9.2e-21) {
    		tmp = fma(((x - y) / z), 60.0, (120.0 * a));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = fma(Float64(Float64(x - y) / t), -60.0, Float64(120.0 * a))
    	tmp = 0.0
    	if (t <= -2.5e-24)
    		tmp = t_1;
    	elseif (t <= 9.2e-21)
    		tmp = fma(Float64(Float64(x - y) / z), 60.0, Float64(120.0 * a));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.5e-24], t$95$1, If[LessEqual[t, 9.2e-21], N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(\frac{x - y}{t}, -60, 120 \cdot a\right)\\
    \mathbf{if}\;t \leq -2.5 \cdot 10^{-24}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 9.2 \cdot 10^{-21}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < -2.4999999999999999e-24 or 9.19999999999999998e-21 < 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. *-commutativeN/A

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

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

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

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

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

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

      if -2.4999999999999999e-24 < t < 9.19999999999999998e-21

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

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

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

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

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

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

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

    Alternative 4: 79.2% accurate, 0.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x - y\right) \cdot \frac{60}{z - t}\\ t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_2 \leq -7 \cdot 10^{-51}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10000000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{z - t}, -60, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (* (- x y) (/ 60.0 (- z t)))) (t_2 (/ (* 60.0 (- x y)) (- z t))))
       (if (<= t_2 -7e-51)
         t_1
         (if (<= t_2 10000000000.0) (fma (/ y (- z t)) -60.0 (* 120.0 a)) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = (x - y) * (60.0 / (z - t));
    	double t_2 = (60.0 * (x - y)) / (z - t);
    	double tmp;
    	if (t_2 <= -7e-51) {
    		tmp = t_1;
    	} else if (t_2 <= 10000000000.0) {
    		tmp = fma((y / (z - t)), -60.0, (120.0 * a));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))
    	t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
    	tmp = 0.0
    	if (t_2 <= -7e-51)
    		tmp = t_1;
    	elseif (t_2 <= 10000000000.0)
    		tmp = fma(Float64(y / Float64(z - t)), -60.0, Float64(120.0 * a));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -7e-51], t$95$1, If[LessEqual[t$95$2, 10000000000.0], N[(N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(x - y\right) \cdot \frac{60}{z - t}\\
    t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
    \mathbf{if}\;t\_2 \leq -7 \cdot 10^{-51}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_2 \leq 10000000000:\\
    \;\;\;\;\mathsf{fma}\left(\frac{y}{z - t}, -60, 120 \cdot a\right)\\
    
    \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)) < -6.9999999999999995e-51 or 1e10 < (/.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. Step-by-step derivation
        1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -6.9999999999999995e-51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1e10

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

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

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

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

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

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

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

    Alternative 5: 74.1% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -6.9999999999999995e-51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.0000000000000002e-56

      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-*.f6451.0

          \[\leadsto 120 \cdot \color{blue}{a} \]
      4. Applied rewrites51.0%

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

    Alternative 6: 67.4% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.55000000000000013e-24 < t < 2.6999999999999999e-305

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{y}{z}, -60, 120 \cdot a\right) \]
        2. Step-by-step derivation
          1. lift-*.f64N/A

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

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

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

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

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

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

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

        if 2.6999999999999999e-305 < t < 7.2e-12

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

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

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

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

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

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

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

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

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

        Alternative 7: 63.0% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -2.55000000000000013e-24 < t < -1.59999999999999989e-271

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{y}{z}, -60, 120 \cdot a\right) \]
            2. Step-by-step derivation
              1. lift-*.f64N/A

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

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

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

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

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

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

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

            if -1.59999999999999989e-271 < t < 1.14999999999999995e-12

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 8: 60.3% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -2.9999999999999999e-193 < t < 1.14999999999999995e-12

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 9: 58.9% accurate, 0.4× speedup?

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

            1. Initial program 99.4%

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

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

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

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

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

                \[\leadsto \frac{y}{z - t} \cdot -60 \]
            4. Applied rewrites26.2%

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

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

            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-*.f6451.0

                \[\leadsto 120 \cdot \color{blue}{a} \]
            4. Applied rewrites51.0%

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

            if 1e10 < (/.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. *-commutativeN/A

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

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

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

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

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

          Alternative 10: 58.8% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            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-*.f6451.0

                \[\leadsto 120 \cdot \color{blue}{a} \]
            4. Applied rewrites51.0%

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

            if 1e10 < (/.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -5e21 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.0000000000000001e215

            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-*.f6451.0

                \[\leadsto 120 \cdot \color{blue}{a} \]
            4. Applied rewrites51.0%

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

            if 5.0000000000000001e215 < (/.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\left(x - y\right) \cdot 60}{z} \]
            9. Applied rewrites28.4%

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

          Alternative 12: 57.1% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -5e21 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.0000000000000001e215

            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-*.f6451.0

                \[\leadsto 120 \cdot \color{blue}{a} \]
            4. Applied rewrites51.0%

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

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

            1. Initial program 99.4%

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

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

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

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

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

                \[\leadsto \frac{y}{z - t} \cdot -60 \]
            4. Applied rewrites26.2%

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

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

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

              if -9.99999999999999921e80 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.0000000000000002e230

              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-*.f6451.0

                  \[\leadsto 120 \cdot \color{blue}{a} \]
              4. Applied rewrites51.0%

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

              if 2.0000000000000002e230 < (/.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. *-commutativeN/A

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x - y}{z}, 60, 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -1.99999999999999997e157 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.0000000000000002e230

              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-*.f6451.0

                  \[\leadsto 120 \cdot \color{blue}{a} \]
              4. Applied rewrites51.0%

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

              if 2.0000000000000002e230 < (/.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. *-commutativeN/A

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x - y}{z}, 60, 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. *-commutativeN/A

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

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

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

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

            Alternative 15: 54.1% accurate, 0.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

              if -1.99999999999999997e157 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000017e169

              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-*.f6451.0

                  \[\leadsto 120 \cdot \color{blue}{a} \]
              4. Applied rewrites51.0%

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

            Alternative 16: 51.0% 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-*.f6451.0

                \[\leadsto 120 \cdot \color{blue}{a} \]
            4. Applied rewrites51.0%

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

            Reproduce

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