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

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

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(a, 120, \left(x - y\right) \cdot \frac{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(x - y) * Float64(60.0 / Float64(z - t))))
end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(a, 120, \left(x - y\right) \cdot \frac{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{-14}:\\
\;\;\;\;\frac{60 \cdot x}{z - t} + a \cdot 120\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.9999999999999998e-14

    1. Initial program 99.3%

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

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

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

      if -2.9999999999999998e-14 < x < 5.6e104

      1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{-60 \cdot \frac{y}{z - t}}\right) \]
      5. Step-by-step derivation
        1. associate-*r/N/A

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

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

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

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

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

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

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

      if 5.6e104 < x

      1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto 60 \cdot \frac{x - y}{z - t} \]
        2. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 83.3% accurate, 0.8× speedup?

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

      1. Initial program 99.0%

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

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

          \[\leadsto \frac{x - y}{z - t} \cdot \color{blue}{60} \]
        2. associate-*l/N/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--.f6464.8

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

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

      if -1.44999999999999994e101 < x < 5.6e104

      1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{-60 \cdot \frac{y}{z - t}}\right) \]
      5. Step-by-step derivation
        1. associate-*r/N/A

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

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

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

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

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

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

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

      if 5.6e104 < x

      1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto 60 \cdot \frac{x - y}{z - t} \]
        2. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 81.8% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{if}\;x \leq -1.45 \cdot 10^{+101}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{+104}:\\ \;\;\;\;\mathsf{fma}\left(a, 120, \frac{y}{z - t} \cdot -60\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)))))
       (if (<= x -1.45e+101)
         t_1
         (if (<= x 5.6e+104) (fma a 120.0 (* (/ y (- z t)) -60.0)) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = (x - y) * (60.0 / (z - t));
    	double tmp;
    	if (x <= -1.45e+101) {
    		tmp = t_1;
    	} else if (x <= 5.6e+104) {
    		tmp = fma(a, 120.0, ((y / (z - t)) * -60.0));
    	} 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)))
    	tmp = 0.0
    	if (x <= -1.45e+101)
    		tmp = t_1;
    	elseif (x <= 5.6e+104)
    		tmp = fma(a, 120.0, Float64(Float64(y / Float64(z - t)) * -60.0));
    	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]}, If[LessEqual[x, -1.45e+101], t$95$1, If[LessEqual[x, 5.6e+104], N[(a * 120.0 + N[(N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] * -60.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(x - y\right) \cdot \frac{60}{z - t}\\
    \mathbf{if}\;x \leq -1.45 \cdot 10^{+101}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;x \leq 5.6 \cdot 10^{+104}:\\
    \;\;\;\;\mathsf{fma}\left(a, 120, \frac{y}{z - t} \cdot -60\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -1.44999999999999994e101 or 5.6e104 < x

      1. Initial program 99.0%

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

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

          \[\leadsto \frac{x - y}{z - t} \cdot \color{blue}{60} \]
        2. associate-*l/N/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--.f6466.4

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

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

      if -1.44999999999999994e101 < x < 5.6e104

      1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{-60 \cdot \frac{y}{z - t}}\right) \]
      5. Step-by-step derivation
        1. associate-*r/N/A

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

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

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

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

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

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

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

    Alternative 5: 81.7% accurate, 0.8× speedup?

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

      1. Initial program 99.4%

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

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
      3. Step-by-step derivation
        1. *-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-*.f6484.8

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

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

      if -2.54999999999999995e-52 < z < 4.1e16

      1. Initial program 99.5%

        \[\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-*.f6481.7

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

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

    Alternative 6: 74.5% accurate, 0.9× speedup?

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

      1. Initial program 99.3%

        \[\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-*.f6474.8

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

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

      if -3.4999999999999999e-18 < a < 2.6999999999999999e-5

      1. Initial program 99.4%

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

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

          \[\leadsto \frac{x - y}{z - t} \cdot \color{blue}{60} \]
        2. associate-*l/N/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--.f6476.3

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

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

      if 2.6999999999999999e-5 < a

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 7: 65.9% accurate, 0.9× speedup?

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

          1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -6.5000000000000001e-19 < z < 2.39999999999999983e-164

              1. Initial program 99.6%

                \[\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-*.f6485.4

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x - y}{t}, -60, 120 \cdot a\right)} \]
              5. Taylor expanded in x 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-*.f6463.5

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

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

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

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

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

                  \[\leadsto 60 \cdot \frac{y}{t} + 120 \cdot a \]
                5. +-commutativeN/A

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

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

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

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

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

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

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

            Alternative 8: 60.8% accurate, 0.3× speedup?

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

              1. Initial program 95.9%

                \[\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-*.f6466.2

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

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

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

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

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

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

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

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

              if -9.9999999999999994e252 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.9999999999999999e45 or 4.9999999999999999e267 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

              1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto 60 \cdot \frac{x - y}{z - t} \]
                2. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -1.9999999999999999e45 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.99999999999999995e88

                1. Initial program 99.8%

                  \[\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-*.f6468.6

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

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

                if 9.99999999999999995e88 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.9999999999999999e267

                1. Initial program 99.7%

                  \[\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-*.f6453.4

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{-60 \cdot \left(x - y\right)}{t} \]
                9. Step-by-step derivation
                  1. lower-*.f64N/A

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

                    \[\leadsto \frac{-60 \cdot \left(x - y\right)}{t} \]
                10. Applied rewrites38.3%

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

              Alternative 9: 60.3% accurate, 0.9× speedup?

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

                1. Initial program 99.0%

                  \[\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--.f6455.3

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

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

                if -1.35999999999999998e101 < x < 5.7999999999999997e104

                1. Initial program 99.6%

                  \[\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-*.f6466.1

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x - y}{t}, -60, 120 \cdot a\right)} \]
                5. Taylor expanded in x 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-*.f6463.5

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

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

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

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

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

                    \[\leadsto 60 \cdot \frac{y}{t} + 120 \cdot a \]
                  5. +-commutativeN/A

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

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

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

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

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

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

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

              Alternative 10: 59.7% accurate, 0.4× speedup?

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

                1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

                if -4.9999999999999997e32 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.99999999999999995e88

                1. Initial program 99.8%

                  \[\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-*.f6468.9

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

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

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

                1. Initial program 98.8%

                  \[\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-*.f6456.3

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{-60 \cdot \left(x - y\right)}{t} \]
                9. Step-by-step derivation
                  1. lower-*.f64N/A

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

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

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

              Alternative 11: 59.6% accurate, 0.4× speedup?

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

                1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

                if -4.9999999999999997e32 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.99999999999999995e88

                1. Initial program 99.8%

                  \[\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-*.f6468.9

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

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

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

                1. Initial program 96.6%

                  \[\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-*.f6464.0

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

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

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

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

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

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

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

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

                1. Initial program 99.8%

                  \[\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-*.f6460.0

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

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

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

                1. Initial program 98.3%

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

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

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

                  \[\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-/.f6426.9

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

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

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

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

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

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

                    \[\leadsto \frac{-60 \cdot x}{t} \]
                  6. lower-*.f6426.6

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

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

              Alternative 13: 54.7% accurate, 0.5× speedup?

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

                1. Initial program 96.6%

                  \[\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-*.f6464.0

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

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

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

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

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

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

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

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

                1. Initial program 99.8%

                  \[\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-*.f6460.0

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

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

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

                1. Initial program 98.3%

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

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

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

                  \[\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-/.f6426.9

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

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

              Alternative 14: 52.6% accurate, 0.8× speedup?

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

                1. Initial program 99.5%

                  \[\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-*.f6455.6

                    \[\leadsto 120 \cdot \color{blue}{a} \]
                4. Applied rewrites55.6%

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

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

                1. Initial program 98.3%

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

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

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

                  \[\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-/.f6426.9

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

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

              Alternative 15: 50.9% 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-*.f6450.9

                  \[\leadsto 120 \cdot \color{blue}{a} \]
              4. Applied rewrites50.9%

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

              Reproduce

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