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

Percentage Accurate: 99.4% → 99.8%
Time: 6.0s
Alternatives: 20
Speedup: 1.1×

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 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 -1 \cdot 10^{+102} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+90}\right):\\ \;\;\;\;\frac{60}{z - t} \cdot x\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
   (if (or (<= t_1 -1e+102) (not (<= t_1 2e+90)))
     (* (/ 60.0 (- z t)) x)
     (* 120.0 a))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if ((t_1 <= -1e+102) || !(t_1 <= 2e+90)) {
		tmp = (60.0 / (z - t)) * x;
	} else {
		tmp = 120.0 * a;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (60.0d0 * (x - y)) / (z - t)
    if ((t_1 <= (-1d+102)) .or. (.not. (t_1 <= 2d+90))) then
        tmp = (60.0d0 / (z - t)) * x
    else
        tmp = 120.0d0 * a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if ((t_1 <= -1e+102) || !(t_1 <= 2e+90)) {
		tmp = (60.0 / (z - t)) * x;
	} else {
		tmp = 120.0 * a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (60.0 * (x - y)) / (z - t)
	tmp = 0
	if (t_1 <= -1e+102) or not (t_1 <= 2e+90):
		tmp = (60.0 / (z - t)) * x
	else:
		tmp = 120.0 * a
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
	tmp = 0.0
	if ((t_1 <= -1e+102) || !(t_1 <= 2e+90))
		tmp = Float64(Float64(60.0 / Float64(z - t)) * x);
	else
		tmp = Float64(120.0 * a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (60.0 * (x - y)) / (z - t);
	tmp = 0.0;
	if ((t_1 <= -1e+102) || ~((t_1 <= 2e+90)))
		tmp = (60.0 / (z - t)) * x;
	else
		tmp = 120.0 * a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+102], N[Not[LessEqual[t$95$1, 2e+90]], $MachinePrecision]], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;120 \cdot a\\


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

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -9.99999999999999977e101 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.99999999999999993e90

      1. Initial program 99.8%

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

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

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

        \[\leadsto \color{blue}{120 \cdot a} \]
    12. Recombined 2 regimes into one program.
    13. Final simplification64.8%

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

    Alternative 3: 61.5% accurate, 0.4× speedup?

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

      1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -9.99999999999999977e101 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000003e170

      1. Initial program 99.8%

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

        \[\leadsto \color{blue}{120 \cdot a} \]
      4. Step-by-step derivation
        1. lower-*.f6464.6

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

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

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

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

      1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

        if -9.99999999999999977e101 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.99999999999999993e90

        1. Initial program 99.8%

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

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

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

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

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

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{60}{z - t} \cdot x \]
        11. Step-by-step derivation
          1. Applied rewrites57.7%

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

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

          1. Initial program 97.4%

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

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

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

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

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

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

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

          if -9.99999999999999977e101 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.99999999999999993e90

          1. Initial program 99.8%

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

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

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

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

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

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{60}{z - t} \cdot x \]
          11. Step-by-step derivation
            1. Applied rewrites57.7%

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

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

            1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 99.8%

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

              \[\leadsto \color{blue}{120 \cdot a} \]
            4. Step-by-step derivation
              1. lower-*.f6468.0

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

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

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

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

            1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(x - y\right) \cdot \frac{\color{blue}{60}}{z} \]
                7. lower-/.f6446.8

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

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

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

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

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

                1. Initial program 99.8%

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

                  \[\leadsto \color{blue}{120 \cdot a} \]
                4. Step-by-step derivation
                  1. lower-*.f6468.0

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

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

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

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 8: 72.6% accurate, 0.8× speedup?

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

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -5.99999999999999992e84 < a < -7.2000000000000002e-19 or 6.39999999999999964e-28 < a

                1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -7.2000000000000002e-19 < a < 6.39999999999999964e-28

                  1. Initial program 99.7%

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot 60}{z - t}} \]
                8. Recombined 3 regimes into one program.
                9. Final simplification80.1%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{+84}:\\ \;\;\;\;\mathsf{fma}\left(-y, \frac{-60}{t}, 120 \cdot a\right)\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{-19} \lor \neg \left(a \leq 6.4 \cdot 10^{-28}\right):\\ \;\;\;\;\mathsf{fma}\left(a, 120, \frac{x}{z} \cdot 60\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z - t}\\ \end{array} \]
                10. Add Preprocessing

                Alternative 9: 89.5% accurate, 0.8× speedup?

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

                  1. Initial program 99.0%

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

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

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

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

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

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

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

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

                  if -8.4999999999999998e32 < x < 1.69999999999999988e42

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 10: 82.8% accurate, 0.8× speedup?

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

                  1. Initial program 99.2%

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

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

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

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

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

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

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

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

                  if -1.24999999999999988e-22 < a < 5.4999999999999997e-98

                  1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 11: 58.7% accurate, 0.8× speedup?

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

                  1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

                    if -1.22e101 < x < -3.29999999999999999e-141

                    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

                    if -3.29999999999999999e-141 < x < 2.90000000000000005e115

                    1. Initial program 99.8%

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

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

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

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

                    if 2.90000000000000005e115 < x

                    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 12: 59.5% accurate, 0.8× speedup?

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

                      1. Initial program 99.2%

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

                        \[\leadsto \color{blue}{120 \cdot a} \]
                      4. Step-by-step derivation
                        1. lower-*.f6469.5

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

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

                      if -5.7999999999999999e-61 < a < -8.20000000000000008e-158

                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -8.20000000000000008e-158 < a < 7.79999999999999943e-98

                      1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(x - y\right) \cdot \frac{\color{blue}{60}}{z} \]
                          7. lower-/.f6456.6

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

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

                      Alternative 13: 89.5% accurate, 0.8× speedup?

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

                        1. Initial program 98.3%

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

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

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

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

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

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

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

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

                        if -8.4999999999999998e32 < x < 1.69999999999999988e42

                        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 1.69999999999999988e42 < x

                        1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 14: 72.7% accurate, 0.9× speedup?

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

                          1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -7.2000000000000002e-19 < a < 6.39999999999999964e-28

                            1. Initial program 99.7%

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

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

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

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

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

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

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

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

                              \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot 60}{z - t}} \]
                          8. Recombined 2 regimes into one program.
                          9. Final simplification78.0%

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

                          Alternative 15: 75.2% accurate, 0.9× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -7.8 \cdot 10^{-19} \lor \neg \left(a \leq 7.2 \cdot 10^{-28}\right):\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z - t}\\ \end{array} \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (if (or (<= a -7.8e-19) (not (<= a 7.2e-28)))
                             (* 120.0 a)
                             (/ (* (- x y) 60.0) (- z t))))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if ((a <= -7.8e-19) || !(a <= 7.2e-28)) {
                          		tmp = 120.0 * a;
                          	} else {
                          		tmp = ((x - y) * 60.0) / (z - t);
                          	}
                          	return tmp;
                          }
                          
                          module fmin_fmax_functions
                              implicit none
                              private
                              public fmax
                              public fmin
                          
                              interface fmax
                                  module procedure fmax88
                                  module procedure fmax44
                                  module procedure fmax84
                                  module procedure fmax48
                              end interface
                              interface fmin
                                  module procedure fmin88
                                  module procedure fmin44
                                  module procedure fmin84
                                  module procedure fmin48
                              end interface
                          contains
                              real(8) function fmax88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmax44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmax84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmax48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                              end function
                              real(8) function fmin88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmin44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmin84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmin48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                              end function
                          end module
                          
                          real(8) function code(x, y, z, t, a)
                          use fmin_fmax_functions
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8), intent (in) :: t
                              real(8), intent (in) :: a
                              real(8) :: tmp
                              if ((a <= (-7.8d-19)) .or. (.not. (a <= 7.2d-28))) then
                                  tmp = 120.0d0 * a
                              else
                                  tmp = ((x - y) * 60.0d0) / (z - t)
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if ((a <= -7.8e-19) || !(a <= 7.2e-28)) {
                          		tmp = 120.0 * a;
                          	} else {
                          		tmp = ((x - y) * 60.0) / (z - t);
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a):
                          	tmp = 0
                          	if (a <= -7.8e-19) or not (a <= 7.2e-28):
                          		tmp = 120.0 * a
                          	else:
                          		tmp = ((x - y) * 60.0) / (z - t)
                          	return tmp
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if ((a <= -7.8e-19) || !(a <= 7.2e-28))
                          		tmp = Float64(120.0 * a);
                          	else
                          		tmp = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t));
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a)
                          	tmp = 0.0;
                          	if ((a <= -7.8e-19) || ~((a <= 7.2e-28)))
                          		tmp = 120.0 * a;
                          	else
                          		tmp = ((x - y) * 60.0) / (z - t);
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.8e-19], N[Not[LessEqual[a, 7.2e-28]], $MachinePrecision]], N[(120.0 * a), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;a \leq -7.8 \cdot 10^{-19} \lor \neg \left(a \leq 7.2 \cdot 10^{-28}\right):\\
                          \;\;\;\;120 \cdot a\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z - t}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if a < -7.7999999999999999e-19 or 7.1999999999999997e-28 < a

                            1. Initial program 99.1%

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

                              \[\leadsto \color{blue}{120 \cdot a} \]
                            4. Step-by-step derivation
                              1. lower-*.f6473.6

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

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

                            if -7.7999999999999999e-19 < a < 7.1999999999999997e-28

                            1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

                          Alternative 16: 75.3% accurate, 0.9× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -7.8 \cdot 10^{-19} \lor \neg \left(a \leq 7.2 \cdot 10^{-28}\right):\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \end{array} \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (if (or (<= a -7.8e-19) (not (<= a 7.2e-28)))
                             (* 120.0 a)
                             (* (- x y) (/ 60.0 (- z t)))))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if ((a <= -7.8e-19) || !(a <= 7.2e-28)) {
                          		tmp = 120.0 * a;
                          	} else {
                          		tmp = (x - y) * (60.0 / (z - t));
                          	}
                          	return tmp;
                          }
                          
                          module fmin_fmax_functions
                              implicit none
                              private
                              public fmax
                              public fmin
                          
                              interface fmax
                                  module procedure fmax88
                                  module procedure fmax44
                                  module procedure fmax84
                                  module procedure fmax48
                              end interface
                              interface fmin
                                  module procedure fmin88
                                  module procedure fmin44
                                  module procedure fmin84
                                  module procedure fmin48
                              end interface
                          contains
                              real(8) function fmax88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmax44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmax84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmax48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                              end function
                              real(8) function fmin88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmin44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmin84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmin48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                              end function
                          end module
                          
                          real(8) function code(x, y, z, t, a)
                          use fmin_fmax_functions
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8), intent (in) :: t
                              real(8), intent (in) :: a
                              real(8) :: tmp
                              if ((a <= (-7.8d-19)) .or. (.not. (a <= 7.2d-28))) then
                                  tmp = 120.0d0 * a
                              else
                                  tmp = (x - y) * (60.0d0 / (z - t))
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if ((a <= -7.8e-19) || !(a <= 7.2e-28)) {
                          		tmp = 120.0 * a;
                          	} else {
                          		tmp = (x - y) * (60.0 / (z - t));
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a):
                          	tmp = 0
                          	if (a <= -7.8e-19) or not (a <= 7.2e-28):
                          		tmp = 120.0 * a
                          	else:
                          		tmp = (x - y) * (60.0 / (z - t))
                          	return tmp
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if ((a <= -7.8e-19) || !(a <= 7.2e-28))
                          		tmp = Float64(120.0 * a);
                          	else
                          		tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)));
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a)
                          	tmp = 0.0;
                          	if ((a <= -7.8e-19) || ~((a <= 7.2e-28)))
                          		tmp = 120.0 * a;
                          	else
                          		tmp = (x - y) * (60.0 / (z - t));
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.8e-19], N[Not[LessEqual[a, 7.2e-28]], $MachinePrecision]], N[(120.0 * a), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;a \leq -7.8 \cdot 10^{-19} \lor \neg \left(a \leq 7.2 \cdot 10^{-28}\right):\\
                          \;\;\;\;120 \cdot a\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if a < -7.7999999999999999e-19 or 7.1999999999999997e-28 < a

                            1. Initial program 99.1%

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

                              \[\leadsto \color{blue}{120 \cdot a} \]
                            4. Step-by-step derivation
                              1. lower-*.f6473.6

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

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

                            if -7.7999999999999999e-19 < a < 7.1999999999999997e-28

                            1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 17: 72.4% accurate, 0.9× speedup?

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

                            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if -7.2000000000000002e-19 < a < 6.39999999999999964e-28

                              1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

                              if 6.39999999999999964e-28 < a

                              1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(a, 120, \frac{x}{z} \cdot 60\right) \]
                                3. Applied rewrites82.6%

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

                              Alternative 18: 59.5% accurate, 1.0× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.55 \cdot 10^{-59} \lor \neg \left(a \leq 7.8 \cdot 10^{-98}\right):\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y}{z} \cdot 60\\ \end{array} \end{array} \]
                              (FPCore (x y z t a)
                               :precision binary64
                               (if (or (<= a -1.55e-59) (not (<= a 7.8e-98)))
                                 (* 120.0 a)
                                 (* (/ (- x y) z) 60.0)))
                              double code(double x, double y, double z, double t, double a) {
                              	double tmp;
                              	if ((a <= -1.55e-59) || !(a <= 7.8e-98)) {
                              		tmp = 120.0 * a;
                              	} else {
                              		tmp = ((x - y) / z) * 60.0;
                              	}
                              	return tmp;
                              }
                              
                              module fmin_fmax_functions
                                  implicit none
                                  private
                                  public fmax
                                  public fmin
                              
                                  interface fmax
                                      module procedure fmax88
                                      module procedure fmax44
                                      module procedure fmax84
                                      module procedure fmax48
                                  end interface
                                  interface fmin
                                      module procedure fmin88
                                      module procedure fmin44
                                      module procedure fmin84
                                      module procedure fmin48
                                  end interface
                              contains
                                  real(8) function fmax88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmax44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmax84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmax48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmin44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmin48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                  end function
                              end module
                              
                              real(8) function code(x, y, z, t, a)
                              use fmin_fmax_functions
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  real(8), intent (in) :: z
                                  real(8), intent (in) :: t
                                  real(8), intent (in) :: a
                                  real(8) :: tmp
                                  if ((a <= (-1.55d-59)) .or. (.not. (a <= 7.8d-98))) then
                                      tmp = 120.0d0 * a
                                  else
                                      tmp = ((x - y) / z) * 60.0d0
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y, double z, double t, double a) {
                              	double tmp;
                              	if ((a <= -1.55e-59) || !(a <= 7.8e-98)) {
                              		tmp = 120.0 * a;
                              	} else {
                              		tmp = ((x - y) / z) * 60.0;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a):
                              	tmp = 0
                              	if (a <= -1.55e-59) or not (a <= 7.8e-98):
                              		tmp = 120.0 * a
                              	else:
                              		tmp = ((x - y) / z) * 60.0
                              	return tmp
                              
                              function code(x, y, z, t, a)
                              	tmp = 0.0
                              	if ((a <= -1.55e-59) || !(a <= 7.8e-98))
                              		tmp = Float64(120.0 * a);
                              	else
                              		tmp = Float64(Float64(Float64(x - y) / z) * 60.0);
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t, a)
                              	tmp = 0.0;
                              	if ((a <= -1.55e-59) || ~((a <= 7.8e-98)))
                              		tmp = 120.0 * a;
                              	else
                              		tmp = ((x - y) / z) * 60.0;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.55e-59], N[Not[LessEqual[a, 7.8e-98]], $MachinePrecision]], N[(120.0 * a), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * 60.0), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;a \leq -1.55 \cdot 10^{-59} \lor \neg \left(a \leq 7.8 \cdot 10^{-98}\right):\\
                              \;\;\;\;120 \cdot a\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{x - y}{z} \cdot 60\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if a < -1.55e-59 or 7.79999999999999943e-98 < a

                                1. Initial program 99.2%

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

                                  \[\leadsto \color{blue}{120 \cdot a} \]
                                4. Step-by-step derivation
                                  1. lower-*.f6469.9

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

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

                                if -1.55e-59 < a < 7.79999999999999943e-98

                                1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 19: 99.5% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 20: 51.7% accurate, 5.2× speedup?

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

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

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

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

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

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

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

                              Reproduce

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