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

Percentage Accurate: 99.2% → 99.8%
Time: 8.5s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 99.2% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 60.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-60 \cdot \left(y - x\right)}{z}\\ t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+93}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+118}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+185}:\\ \;\;\;\;x \cdot \frac{-60}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* -60.0 (- y x)) z)) (t_2 (/ (* 60.0 (- x y)) (- z t))))
   (if (<= t_2 -5e+93)
     t_1
     (if (<= t_2 5e+118)
       (* 120.0 a)
       (if (<= t_2 5e+185) (* x (/ -60.0 t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (-60.0 * (y - x)) / z;
	double t_2 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_2 <= -5e+93) {
		tmp = t_1;
	} else if (t_2 <= 5e+118) {
		tmp = 120.0 * a;
	} else if (t_2 <= 5e+185) {
		tmp = x * (-60.0 / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((-60.0d0) * (y - x)) / z
    t_2 = (60.0d0 * (x - y)) / (z - t)
    if (t_2 <= (-5d+93)) then
        tmp = t_1
    else if (t_2 <= 5d+118) then
        tmp = 120.0d0 * a
    else if (t_2 <= 5d+185) then
        tmp = x * ((-60.0d0) / t)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (-60.0 * (y - x)) / z;
	double t_2 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_2 <= -5e+93) {
		tmp = t_1;
	} else if (t_2 <= 5e+118) {
		tmp = 120.0 * a;
	} else if (t_2 <= 5e+185) {
		tmp = x * (-60.0 / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (-60.0 * (y - x)) / z
	t_2 = (60.0 * (x - y)) / (z - t)
	tmp = 0
	if t_2 <= -5e+93:
		tmp = t_1
	elif t_2 <= 5e+118:
		tmp = 120.0 * a
	elif t_2 <= 5e+185:
		tmp = x * (-60.0 / t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(-60.0 * Float64(y - x)) / z)
	t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
	tmp = 0.0
	if (t_2 <= -5e+93)
		tmp = t_1;
	elseif (t_2 <= 5e+118)
		tmp = Float64(120.0 * a);
	elseif (t_2 <= 5e+185)
		tmp = Float64(x * Float64(-60.0 / t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (-60.0 * (y - x)) / z;
	t_2 = (60.0 * (x - y)) / (z - t);
	tmp = 0.0;
	if (t_2 <= -5e+93)
		tmp = t_1;
	elseif (t_2 <= 5e+118)
		tmp = 120.0 * a;
	elseif (t_2 <= 5e+185)
		tmp = x * (-60.0 / t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(-60.0 * N[(y - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+93], t$95$1, If[LessEqual[t$95$2, 5e+118], N[(120.0 * a), $MachinePrecision], If[LessEqual[t$95$2, 5e+185], N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+118}:\\
\;\;\;\;120 \cdot a\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+185}:\\
\;\;\;\;x \cdot \frac{-60}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000001e93 or 4.9999999999999999e185 < (/.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 a around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -5.0000000000000001e93 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999972e118

          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-*.f6462.3

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

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

          if 4.99999999999999972e118 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.9999999999999999e185

          1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

            Alternative 3: 54.9% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

                  if -4.9999999999999998e216 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999972e118

                  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-*.f6458.1

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

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

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

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

                  1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

                    if -1.0000000000000001e97 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999972e118

                    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-*.f6461.3

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

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

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

                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 5: 54.9% accurate, 0.4× speedup?

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

                        1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

                          if -4.9999999999999998e216 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999972e118

                          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-*.f6458.1

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

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

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

                          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 6: 84.3% accurate, 0.7× speedup?

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

                              1. Initial program 99.9%

                                \[\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 \color{blue}{\frac{x - y}{z} \cdot 60} + 120 \cdot a \]
                                2. lower-fma.f64N/A

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

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

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

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

                                \[\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}{\left(60 \cdot \frac{x}{z} + 120 \cdot a\right)} \]
                              7. Step-by-step derivation
                                1. Applied rewrites95.6%

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

                                if -7.49999999999999959e68 < z < -2.0000000000000001e-83

                                1. Initial program 99.8%

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

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

                                    \[\leadsto \frac{\color{blue}{60 \cdot x}}{z - t} + a \cdot 120 \]
                                5. Applied rewrites86.8%

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

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

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

                                    \[\leadsto \color{blue}{a \cdot 120} + \frac{60 \cdot x}{z - t} \]
                                  4. lower-fma.f6486.8

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

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

                                if -2.0000000000000001e-83 < z < 4.69999999999999986e-4

                                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 0

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

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

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

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

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

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

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

                                if 4.69999999999999986e-4 < z

                                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 \color{blue}{\frac{x - y}{z} \cdot 60} + 120 \cdot a \]
                                  2. lower-fma.f64N/A

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

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

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

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

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

                              Alternative 7: 73.7% accurate, 0.8× speedup?

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

                                1. Initial program 100.0%

                                  \[\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 \color{blue}{\frac{x - y}{z} \cdot 60} + 120 \cdot a \]
                                  2. lower-fma.f64N/A

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

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

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

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

                                  \[\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 rewrites89.2%

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

                                  if -4.0000000000000002e152 < a < -5.0000000000000002e-23

                                  1. Initial program 99.7%

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

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

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

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

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

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

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

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

                                    \[\leadsto 60 \cdot \frac{y}{t} + \color{blue}{120 \cdot a} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites73.9%

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

                                    if -5.0000000000000002e-23 < a < 2.09999999999999995e42

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if 2.09999999999999995e42 < a

                                          1. Initial program 100.0%

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

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

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

                                        Alternative 8: 88.7% accurate, 0.8× speedup?

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

                                          1. Initial program 99.8%

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

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

                                              \[\leadsto \frac{\color{blue}{60 \cdot x}}{z - t} + a \cdot 120 \]
                                          5. Applied rewrites89.8%

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

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

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

                                              \[\leadsto \color{blue}{a \cdot 120} + \frac{60 \cdot x}{z - t} \]
                                            4. lower-fma.f6489.8

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

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

                                          if -9e7 < x < 4.45000000000000002e61

                                          1. Initial program 99.9%

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

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

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

                                            \[\leadsto \frac{\color{blue}{-60 \cdot y}}{z - t} + a \cdot 120 \]
                                        3. Recombined 2 regimes into one program.
                                        4. Final simplification93.3%

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

                                        Alternative 9: 83.5% accurate, 0.8× speedup?

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

                                          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 \color{blue}{\frac{x - y}{z} \cdot 60} + 120 \cdot a \]
                                            2. lower-fma.f64N/A

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

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

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

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

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

                                          if -1.75e31 < z < 4.69999999999999986e-4

                                          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 0

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

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

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

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

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

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

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

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

                                        Alternative 10: 83.2% accurate, 0.8× speedup?

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

                                          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 \color{blue}{\frac{x - y}{z} \cdot 60} + 120 \cdot a \]
                                            2. lower-fma.f64N/A

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

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

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

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

                                            \[\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}{\left(60 \cdot \frac{x}{z} + 120 \cdot a\right)} \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites86.8%

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

                                            if -1.75e31 < z < 4.69999999999999986e-4

                                            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 0

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

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

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

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

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

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

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

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

                                          Alternative 11: 73.7% accurate, 0.9× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -4.3 \cdot 10^{+98} \lor \neg \left(a \leq 2.1 \cdot 10^{+42}\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 -4.3e+98) (not (<= a 2.1e+42)))
                                             (* 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 <= -4.3e+98) || !(a <= 2.1e+42)) {
                                          		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 <= (-4.3d+98)) .or. (.not. (a <= 2.1d+42))) 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 <= -4.3e+98) || !(a <= 2.1e+42)) {
                                          		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 <= -4.3e+98) or not (a <= 2.1e+42):
                                          		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 <= -4.3e+98) || !(a <= 2.1e+42))
                                          		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 <= -4.3e+98) || ~((a <= 2.1e+42)))
                                          		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, -4.3e+98], N[Not[LessEqual[a, 2.1e+42]], $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 -4.3 \cdot 10^{+98} \lor \neg \left(a \leq 2.1 \cdot 10^{+42}\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 < -4.3000000000000001e98 or 2.09999999999999995e42 < a

                                            1. Initial program 100.0%

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

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

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

                                            if -4.3000000000000001e98 < a < 2.09999999999999995e42

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                Alternative 12: 73.6% accurate, 0.9× speedup?

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

                                                  1. Initial program 99.9%

                                                    \[\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 \color{blue}{\frac{x - y}{z} \cdot 60} + 120 \cdot a \]
                                                    2. lower-fma.f64N/A

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

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

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

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

                                                    \[\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}{\left(60 \cdot \frac{x}{z} + 120 \cdot a\right)} \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites80.2%

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

                                                    if -6.09999999999999998e41 < a < 2.09999999999999995e42

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if 2.09999999999999995e42 < a

                                                          1. Initial program 100.0%

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

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

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

                                                        Alternative 13: 73.6% accurate, 0.9× speedup?

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

                                                          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 0

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

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

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

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

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

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

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

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

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

                                                            if -5.0000000000000002e-23 < a < 2.09999999999999995e42

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  if 2.09999999999999995e42 < a

                                                                  1. Initial program 100.0%

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

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

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

                                                                Alternative 14: 59.5% accurate, 1.0× speedup?

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

                                                                  1. Initial program 99.9%

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

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

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

                                                                  if -7.59999999999999989e-112 < a < 9.4999999999999996e-82

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    \[\leadsto \left(x - y\right) \cdot \frac{-60}{\color{blue}{t}} \]
                                                                  7. Step-by-step derivation
                                                                    1. Applied rewrites62.9%

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

                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.6 \cdot 10^{-112} \lor \neg \left(a \leq 9.5 \cdot 10^{-82}\right):\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\ \end{array} \]
                                                                  10. Add Preprocessing

                                                                  Alternative 15: 59.7% accurate, 1.0× speedup?

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

                                                                    1. Initial program 99.9%

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

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

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

                                                                    if -7.5e-103 < a < 8.60000000000000037e-82

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.5 \cdot 10^{-103} \lor \neg \left(a \leq 8.6 \cdot 10^{-82}\right):\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z - t} \cdot -60\\ \end{array} \]
                                                                      6. Add Preprocessing

                                                                      Alternative 16: 51.2% 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.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-*.f6446.4

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

                                                                        \[\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 2025006 
                                                                      (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)))